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

tui

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