Commit 2e3449eb authored by 廖旭伟's avatar 廖旭伟

Merge remote-tracking branch 'origin/master'

parents 8533dcbe 74db181f
......@@ -72,6 +72,7 @@ export default {
return;
}
this.tableData.loading = true;
this.$post(this.pageInfo.list, this.query, {
cancelToken: this.source.token,
})
......@@ -100,6 +101,7 @@ export default {
return;
}
this.tableData.loading = true;
return;
this.$post("/attendance/stat/summary", this.query, {
cancelToken: this.source.token,
})
......
......@@ -160,6 +160,13 @@
title="查询"
>查询</el-button
>
<el-button
icon="el-icon-tickets"
@click="resetTable"
v-if="visible"
title="重新汇总"
>重新汇总</el-button
>
<el-button
icon="el-icon-download"
......@@ -198,9 +205,59 @@ export default {
},
},
async created() {
console.log(this.$route);
this.$route.name == "attendance/stat/list"
? (this.visible = true)
: (this.visible = false);
this.initForm(this.$route.query);
},
methods: {
resetTable() {
let { path, query } = this.$route;
if (this.form.attendanceDateStart && this.form.attendanceDateEnd) {
let startValue = Date.parse(this.form.attendanceDateStart);
let endValue = Date.parse(this.form.attendanceDateEnd);
if (startValue > endValue) {
this.$message.error("查询-结束的日期需大于开始日期");
this.form.attendanceDateEnd = "";
return false;
}
}
if (this.form.startTime && this.form.endTime) {
let startValue = Date.parse(this.form.startTime);
let endValue = Date.parse(this.form.endTime);
if (startValue > endValue) {
this.$message.error("查询-结束的日期需大于开始日期");
this.form.endTime = "";
return false;
}
}
if (this.form.summaryTimeStart && this.form.summaryTimeEnd) {
let startValue = Date.parse(this.form.summaryTimeStart);
let endValue = Date.parse(this.form.summaryTimeEnd);
if (startValue > endValue) {
this.$message.error("查询-结束的日期需大于开始日期");
this.form.summaryTimeEnd = "";
return false;
}
} else {
this.form.summaryTimeStart = getFirstDay();
this.form.summaryTimeEnd = getLastDay();
}
let params = JSON.parse(JSON.stringify(this.form)); //不更改原始数据
let data = this.decode(params);
data.size = -1;
this.$post("/attendance/stat/summary", data).then((res) => {
if (res.code == 1) {
this.$message.success(res.msg);
} else {
this.$message.error(res.msg);
}
});
},
remoteMethod(query, searchType) {
if (query == "") {
console.log("查询参数为空!");
......@@ -403,6 +460,7 @@ export default {
// groupList: [],
},
remoteOptions: {},
visible: false,
};
},
};
......
......@@ -5,7 +5,7 @@
<el-col :span="6" :xs="12">
<el-card>
<div class="data_left">
<div class="title" style="margin-bottom:40px">今日数据洞察</div>
<div class="title" style="margin-bottom:40px">本月数据洞察</div>
<div class="cell1">
<div class="title">人事数据</div>
<div
......
......@@ -51,7 +51,7 @@
</el-time-picker>
</div>
<div>
<span>时段: </span>
<span>时段: </span>
<span>上班前签到</span>
<el-time-picker
size="mini"
......@@ -90,7 +90,7 @@
</el-time-picker>
</div>
<div>
<span>时段:</span>
<span>时段:</span>
<span>下班前签退</span>
<el-time-picker
size="mini"
......
......@@ -7,7 +7,7 @@
@handleClick="handleClick"
></tab-pane>
</div>
<div class="totalNum flex">
<!-- <div class="totalNum flex">
<div class="item flex">
<div>
需要打卡人数
......@@ -35,7 +35,7 @@
<span class="num">{{ attendStatInfo.lackOfCards }}</span>
</div>
</div>
</div>
</div> -->
<LayoutTable :data="tableData" :config="tableConfig" notDel notAdd>
<el-button
slot="table-head-left2"
......
......@@ -28,14 +28,14 @@
@click="setdialog"
>表格设置</el-button
>
<el-button
<!-- <el-button
slot="table-head-left2"
style="margin-left: 10px"
icon="el-icon-tickets"
size="mini"
@click="restTable"
>重新汇总</el-button
>
> -->
</LayoutTable>
<dialog-show ref="dialogform" @ok="getData" />
<!-- 表格设置 -->
......@@ -47,13 +47,14 @@
<el-checkbox
v-for="(item, index) in setcolum"
:key="index"
:label="item.label"
:label="item.prop"
>
{{ item.label }}
</el-checkbox>
</el-checkbox-group>
<div class="mt20" style="text-align:right">
<el-button>取消</el-button>
<el-button type="primary">确定</el-button>
<el-button @click="handleCancel">取消</el-button>
<el-button type="primary" @click="handleSubmit">确定</el-button>
</div>
</el-dialog>
<!-- 导出记录查看 -->
......@@ -100,14 +101,27 @@ export default {
this.initalArr = this.config.columns;
},
methods: {
// 表格设置弹窗取消操作
handleCancel() {
this.checkList = [];
this.isdialog = false;
},
// 表格设置提交操作
handleSubmit() {
this.doExport();
this.isdialog = false;
},
// 处理
handleArr(arr, currentTime) {
console.log(currentTime);
console.log(arr);
let index = arr.findIndex((item) => item.createTime == currentTime);
if (index > -1) {
console.log(arr[index].attendanceSummary);
return arr[index].attendanceSummary;
return arr[index].attendanceSummary ? (
<el-tag type={"danger"} size="mini">
{arr[index].attendanceSummary}
</el-tag>
) : (
"-"
);
} else {
return "-";
}
......@@ -172,6 +186,9 @@ export default {
this.setcolum = this.config.columns.filter(
(item) => item.label && item.prop
);
this.setcolum = this.setcolum.filter(
(val) => val.prop !== "attendanceStaffStatEntities"
);
},
lookexportHis() {
this.drawerhistory = true;
......@@ -188,6 +205,9 @@ export default {
if (this.selection.length > 0) {
params["idList"] = this.selection;
}
if (this.checkList.length > 0) {
params["properties"] = this.checkList;
}
this.$download(
"/attendance/stat/exportExcelExt",
{
......@@ -195,7 +215,10 @@ export default {
},
{ type: "excel" }
)
.then(() => (this.isExport = false))
.then(() => {
this.isExport = false;
this.checkList = [];
})
.catch((error) => {
this.isExport = false;
this.$message.error(error.message);
......@@ -321,7 +344,6 @@ export default {
label: "出勤率%",
prop: "attendanceRate",
formatter: (row) => {
console.log(row);
return row.attendanceRate
? (Number(row.attendanceRate) * 100).toFixed(2) + "%"
: "--";
......
......@@ -63,6 +63,14 @@ public class ApiLoginController extends BaseJsonBodyController {
JSONObject ret = new JSONObject();
JSONObject data = new JSONObject();
String loginName = loginForm.getLoginName();
String password = loginForm.getPassword();
String ip = super.getRequestIP(request);
if (StringUtils.isEmpty(loginName) || StringUtils.isEmpty(password)) {
ret.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE);
ret.put(KEY_RESULT_MSG, "未获取到用户信息,请重新登录");
return ret.toJSONString();
}
UserEntity userEntity = null;
try {
if (ObjectUtils.isEmpty(loginForm.getCode())) {
......@@ -73,7 +81,8 @@ public class ApiLoginController extends BaseJsonBodyController {
if (personRest.getCode() != YesNoEnum.YES.getValue()) {
throw new AppException(DING_AUTH_FAIL,String.format("获取钉钉用户异常,%s", personRest.getMsg()));
}
log.info(personRest.getData());
userEntity = userService.doLogin(loginName, password, ip);
if (!ObjectUtils.isEmpty(loginForm.getCode())) {
//更新绑定钉钉
userEntity.setDingUserId(loginForm.getCode());
......
......@@ -67,22 +67,10 @@ public class DingTalkLoginController extends BaseCRUDJsonBodyMappingController<U
@Autowired
private UserService userService;
@Autowired
private ValidCodeService validCodeService;
@Autowired
private ResourceService resourceService;
@Autowired
private MenuService menuService;
@Autowired
private ICacheService cacheService;
@Autowired
private IAuthTokenService authTokenService;
@Autowired
private StaffService staffService;
@Autowired
private DeptService deptService;
@Autowired
private IDingPersonService dingPersonService;
......@@ -104,7 +92,6 @@ public class DingTalkLoginController extends BaseCRUDJsonBodyMappingController<U
throw new AppException(String.format("获取钉钉用户异常,%s", personRest.getMsg()));
}
log.info(personRest.getData());
if (ObjectUtils.isEmpty(personRest.getData()))
throw new AppException(1012, "未找到响应的钉钉用户!");
//根据钉钉的用户查询系统绑定的用户,获取
......@@ -120,7 +107,7 @@ public class DingTalkLoginController extends BaseCRUDJsonBodyMappingController<U
data.put("userType", userEntity.getUserType());
userEntity.setLoginTime(System.currentTimeMillis());
userEntity.setToken(IdUtil.fastSimpleUUID());
userEntity.setExpireTime(DateUtils.addCurrDate(7).getTime());
userEntity.setExpireTime(DateUtils.addCurrDate(1).getTime());
String token = authTokenService.createToken(userEntity);
data.put("token", token);
ret.put(KEY_RESULT_DATA, data);
......
......@@ -144,6 +144,8 @@ public class AttendanceRecordErrorController extends BaseCRUDJsonBodyMappingCont
for (AttendanceRecordErrorEntity recordErrorEntity : entity.getRecordErrorEntities()) {
AttendanceRecordErrorEntity updateEntity = new AttendanceRecordErrorEntity();
updateEntity.setId(recordErrorEntity.getId());
updateEntity.setAttendanceGroupId(recordErrorEntity.getAttendanceGroupId());
updateEntity.setAttendanceGroupName(recordErrorEntity.getAttendanceGroupName());
updateEntity.setErrorDateTime(recordErrorEntity.getErrorDateTime());
updateEntity.setGoOffDateTime(recordErrorEntity.getGoOffDateTime());
updateEntity.setProcessStatus(entity.getProcessStatus());
......
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