Commit 70c8abff authored by 姬鋆屾's avatar 姬鋆屾

tui

parent 2e3965a1
...@@ -280,7 +280,15 @@ export default { ...@@ -280,7 +280,15 @@ export default {
changedate(val) { changedate(val) {
if (this.form.startTime && this.form.endTime) { if (this.form.startTime && this.form.endTime) {
if (this.form.endTime.valueOf() > this.form.startTime.valueOf()) { if (this.form.endTime.valueOf() > this.form.startTime.valueOf()) {
this.form.duration = getSec(this.form.startTime, this.form.endTime); // this.form.duration = getSec(this.form.startTime, this.form.endTime);
this.$post("/attendance/getTimeCount", {
startTime: this.form.startTime,
endTime: this.form.endTime,
}).then((res) => {
if (res.code == 1) {
this.form.duration = res.data * 3600;
}
});
} else { } else {
this.$message.closeAll(); this.$message.closeAll();
this.$message.error("结束日期需大于请假日期"); this.$message.error("结束日期需大于请假日期");
......
...@@ -147,7 +147,7 @@ export default { ...@@ -147,7 +147,7 @@ export default {
return ( return (
(row.sourceDingTime ? row.sourceDingTime : "--") + (row.sourceDingTime ? row.sourceDingTime : "--") +
(row.duration (row.duration
? "" + (row.duration / 60 / 60 / 9).toFixed(2) + "" + "" ? "" + (row.duration / 60 / 60 / 8).toFixed(2) + "" + ""
: "(--)") : "(--)")
); );
}, },
......
...@@ -18,9 +18,7 @@ ...@@ -18,9 +18,7 @@
</div> </div>
<div> <div>
出勤率 出勤率
<span class="num">{{ <span class="num">{{ attendStatInfo.attPercentage }}</span>
attendStatInfo.attPercentage
}}</span>
</div> </div>
</div> </div>
...@@ -34,7 +32,7 @@ ...@@ -34,7 +32,7 @@
</div> </div>
<div> <div>
缺卡 缺卡
<span class="num">{{attendStatInfo.lackOfCards }}</span> <span class="num">{{ attendStatInfo.lackOfCards }}</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -129,13 +127,14 @@ ...@@ -129,13 +127,14 @@
<el-checkbox <el-checkbox
v-for="(item, index) in setcolum" v-for="(item, index) in setcolum"
:key="index" :key="index"
:label="item.label" :label="item.prop"
> >
{{ item.label }}
</el-checkbox> </el-checkbox>
</el-checkbox-group> </el-checkbox-group>
<div class="mt20" style="text-align:right"> <div class="mt20" style="text-align:right">
<el-button>取消</el-button> <el-button @click="handleCancel">取消</el-button>
<el-button type="primary">确定</el-button> <el-button type="primary" @click="handleSubmit">确定</el-button>
</div> </div>
</el-dialog> </el-dialog>
<!-- 上传 --> <!-- 上传 -->
...@@ -207,17 +206,25 @@ export default { ...@@ -207,17 +206,25 @@ export default {
}, },
}, },
created() { created() {
this.$post("/attendance/record/stat", {}).then((res) => { this.$post("/attendance/record/stat", {}).then((res) => {
if (res.code === 1) { if (res.code === 1) {
this.attendStatInfo = res.data; this.attendStatInfo = res.data;
} }
}); });
this.initalArr = this.config.columns; this.initalArr = this.config.columns;
}, },
methods: { methods: {
// 表格设置弹窗取消操作
handleCancel() {
this.checkList = [];
this.isdialog = false;
},
// 表格设置提交操作
handleSubmit() {
this.doExport();
this.isdialog = false;
},
// 表格接收数据后 // 表格接收数据后
afterRender(data) { afterRender(data) {
let addobjArr = []; let addobjArr = [];
...@@ -335,7 +342,9 @@ export default { ...@@ -335,7 +342,9 @@ export default {
if (this.selection.length > 0) { if (this.selection.length > 0) {
params["idList"] = this.selection; params["idList"] = this.selection;
} }
if (this.checkList.length > 0) {
params["properties"] = this.checkList;
}
this.$download( this.$download(
"/attendance/record/exportExcel", "/attendance/record/exportExcel",
{ {
...@@ -343,7 +352,10 @@ export default { ...@@ -343,7 +352,10 @@ export default {
}, },
{ type: "excel" } { type: "excel" }
) )
.then(() => (this.isExport = false)) .then(() => {
this.isExport = false;
this.checkList = [];
})
.catch((error) => { .catch((error) => {
this.isExport = false; this.isExport = false;
this.$message.error(error.message); this.$message.error(error.message);
...@@ -354,6 +366,7 @@ export default { ...@@ -354,6 +366,7 @@ export default {
this.setcolum = this.config.columns.filter( this.setcolum = this.config.columns.filter(
(item) => item.label && item.prop (item) => item.label && item.prop
); );
console.log(this.setcolum);
}, },
renderTable(tableData) { renderTable(tableData) {
return ( return (
...@@ -498,10 +511,10 @@ export default { ...@@ -498,10 +511,10 @@ export default {
{ label: "员工工号", prop: "workNum" }, { label: "员工工号", prop: "workNum" },
{ {
label: "考勤组", label: "考勤组",
prop: "attendanceGroupName" prop: "attendanceGroupName",
}, },
{ label: "部门", prop: "deptName" }, { label: "部门", prop: "deptName" },
{ label: "职位", prop: "positionName"}, { label: "职位", prop: "positionName" },
{ label: "班次", prop: "classId", formatter: this.formatter }, { label: "班次", prop: "classId", formatter: this.formatter },
{ {
label: "签到结果", label: "签到结果",
...@@ -521,9 +534,6 @@ export default { ...@@ -521,9 +534,6 @@ export default {
width: 120, width: 120,
prop: "subColumns", prop: "subColumns",
formatter: (row) => { formatter: (row) => {
let widthsize = this.columnSet.reduce((pre, cur) => { let widthsize = this.columnSet.reduce((pre, cur) => {
return pre + Number(cur.width); return pre + Number(cur.width);
}, 50); }, 50);
...@@ -556,7 +566,7 @@ export default { ...@@ -556,7 +566,7 @@ export default {
exportList: [], //导出记录 exportList: [], //导出记录
baseUrl: process.env.VUE_APP_API_BASE_URL + "/", baseUrl: process.env.VUE_APP_API_BASE_URL + "/",
initalArr: [], initalArr: [],
attendStatInfo:{} attendStatInfo: {},
}; };
}, },
}; };
......
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