Commit 0f0ecfe3 authored by 姬鋆屾's avatar 姬鋆屾

tui

parent 0220ab93
...@@ -121,6 +121,12 @@ ...@@ -121,6 +121,12 @@
</div> </div>
</div> </div>
</el-drawer> </el-drawer>
<div class="mask" v-if="progress">
<el-progress
:stroke-width="26"
:percentage="percent"
></el-progress>
</div>
</div> </div>
</template> </template>
...@@ -220,25 +226,26 @@ export default { ...@@ -220,25 +226,26 @@ export default {
}, },
/** 导出Excel */ /** 导出Excel */
doExport() { doExport() {
if(this.isExport==true) { if (this.isExport == true) {
this.$message.info("考勤数据正在导出中,请勿重复点击!") this.$message.info("考勤数据正在导出中,请勿重复点击!");
return false; return false;
} }
this.isExport = true; this.isExport = true;
this.progress = true;
let params = {}; let params = {};
for (let value of this.config.search) { for (let value of this.config.search) {
if (this.query[value.name]) { if (this.query[value.name]) {
params[value.name] = this.query[value.name]; params[value.name] = this.query[value.name];
} }
} }
this.percent = 75;
if (this.selection.length > 0) { if (this.selection.length > 0) {
params["idList"] = this.selection; params["idList"] = this.selection;
} }
let that=this; let that = this;
this.$download( this.$download(
"/attendance/record/hik/exportExcel", "/attendance/record/hik/exportExcel",
{ {
...@@ -247,10 +254,13 @@ export default { ...@@ -247,10 +254,13 @@ export default {
{ type: "excel" } { type: "excel" }
) )
.then(() => { .then(() => {
console.log("isExport222:",this.isExport) this.percent = 100;
that.isExport = false}) this.progress = false;
that.isExport = false;
})
.catch((error) => { .catch((error) => {
this.isExport = false; this.isExport = false;
this.progress = false;
this.$message.error(error.message); this.$message.error(error.message);
}); });
}, },
...@@ -273,7 +283,9 @@ export default { ...@@ -273,7 +283,9 @@ export default {
data() { data() {
return { return {
showBtn: false, showBtn: false,
isExport:false, progress: false,
isExport: false,
percent: 0,
upload: { upload: {
headers: { headers: {
Authorization: window.sessionStorage.getItem("token") || "", Authorization: window.sessionStorage.getItem("token") || "",
...@@ -373,6 +385,21 @@ export default { ...@@ -373,6 +385,21 @@ export default {
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.mask {
width: 100%;
height: 100vh;
position: fixed;
top: 0;
left: 0;
z-index: 99;
padding: 0 30%;
padding-top: 20%;
background: rgba(0, 0, 0, 0.6);
}
::v-deep .el-progress__text {
color: #409eff;
font-weight: 600;
}
.hisList { .hisList {
padding: 15px; padding: 15px;
.list { .list {
......
...@@ -179,6 +179,12 @@ ...@@ -179,6 +179,12 @@
<el-button @click="upload.open = false">取 消</el-button> <el-button @click="upload.open = false">取 消</el-button>
</div> </div>
</el-dialog> </el-dialog>
<div class="mask" v-if="progress">
<el-progress
:stroke-width="26"
:percentage="percent"
></el-progress>
</div>
</div> </div>
</template> </template>
...@@ -333,6 +339,7 @@ export default { ...@@ -333,6 +339,7 @@ export default {
/** 导出Excel */ /** 导出Excel */
doExport() { doExport() {
this.isExport = true; this.isExport = true;
this.progress = true;
let params = {}; let params = {};
for (let value of this.config.search) { for (let value of this.config.search) {
if (this.query[value.name]) { if (this.query[value.name]) {
...@@ -342,6 +349,7 @@ export default { ...@@ -342,6 +349,7 @@ export default {
if (this.selection.length > 0) { if (this.selection.length > 0) {
params["idList"] = this.selection; params["idList"] = this.selection;
} }
this.percent = 70;
if (this.checkList.length > 0) { if (this.checkList.length > 0) {
params["properties"] = this.checkList; params["properties"] = this.checkList;
} }
...@@ -353,10 +361,14 @@ export default { ...@@ -353,10 +361,14 @@ export default {
{ type: "excel" } { type: "excel" }
) )
.then(() => { .then(() => {
this.percent = 100;
this.progress = false;
this.isExport = false; this.isExport = false;
this.checkList = []; this.checkList = [];
}) })
.catch((error) => { .catch((error) => {
this.progress = false;
this.isExport = false; this.isExport = false;
this.$message.error(error.message); this.$message.error(error.message);
}); });
...@@ -407,6 +419,8 @@ export default { ...@@ -407,6 +419,8 @@ export default {
}, },
data() { data() {
return { return {
progress: false,
percent: 0,
upload: { upload: {
// 是否显示弹出层(员工关怀信息导入) // 是否显示弹出层(员工关怀信息导入)
open: false, open: false,
...@@ -578,6 +592,21 @@ export default { ...@@ -578,6 +592,21 @@ export default {
}; };
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.mask {
width: 100%;
height: 100vh;
position: fixed;
top: 0;
left: 0;
z-index: 99;
padding: 0 30%;
padding-top: 20%;
background: rgba(0, 0, 0, 0.6);
}
::v-deep .el-progress__text {
color: #409eff;
font-weight: 600;
}
.totalNum { .totalNum {
background: rgba(64, 158, 255, 0.2); background: rgba(64, 158, 255, 0.2);
padding: 15px; padding: 15px;
......
...@@ -13,6 +13,9 @@ ...@@ -13,6 +13,9 @@
</LayoutTable> </LayoutTable>
<dialog-show ref="dialogform" @ok="getData" /> <dialog-show ref="dialogform" @ok="getData" />
<div class="mask" v-if="progress">
<el-progress :stroke-width="26" :percentage="percent"></el-progress>
</div>
</div> </div>
</template> </template>
...@@ -31,6 +34,8 @@ export default { ...@@ -31,6 +34,8 @@ export default {
methods: { methods: {
/** 导出Excel */ /** 导出Excel */
doExport() { doExport() {
this.progress = true;
this.percent = 75;
this.isExport = true; this.isExport = true;
this.$download( this.$download(
"/staff/perform/summary/exportExcel", "/staff/perform/summary/exportExcel",
...@@ -40,9 +45,14 @@ export default { ...@@ -40,9 +45,14 @@ export default {
}, },
{ type: "excel" } { type: "excel" }
) )
.then(() => (this.isExport = false)) .then(() => {
this.percent = 100;
this.progress = false;
this.isExport = false;
})
.catch((error) => { .catch((error) => {
this.isExport = false; this.isExport = false;
this.progress = false;
this.$message.error(error.message); this.$message.error(error.message);
}); });
}, },
...@@ -62,6 +72,8 @@ export default { ...@@ -62,6 +72,8 @@ export default {
data() { data() {
return { return {
isExport: false, isExport: false,
progress: false,
percent: 0,
config: { config: {
isshowTabPane: true, isshowTabPane: true,
search: [ search: [
...@@ -167,3 +179,20 @@ export default { ...@@ -167,3 +179,20 @@ export default {
}, },
}; };
</script> </script>
<style lang="less" scoped>
.mask {
width: 100%;
height: 100vh;
position: fixed;
top: 0;
left: 0;
z-index: 99;
padding: 0 30%;
padding-top: 20%;
background: rgba(0, 0, 0, 0.6);
}
::v-deep .el-progress__text {
color: #409eff;
font-weight: 600;
}
</style>
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