|
|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<basic-container>
|
|
|
|
|
|
- <basic-card title="LOGO设置">
|
|
|
+ <basic-card title="LOGO设置" v-loading="tenantLoading">
|
|
|
<avue-form :option="logoOption" v-model="logoForm" style="width: 100%; margin: 0;" @submit="handleSubmitLogo"></avue-form>
|
|
|
</basic-card>
|
|
|
|
|
|
@@ -29,12 +29,12 @@
|
|
|
|
|
|
</basic-card>
|
|
|
|
|
|
- <basic-card title="高企证书上传">
|
|
|
+ <basic-card title="高企证书上传" v-loading="compBasicLoading">
|
|
|
<el-button type="primary" plain size="small" @click="handleLastYearData(2)" style="margin-bottom: 12px;">读取上年度数据</el-button>
|
|
|
<avue-form :option="picOption" v-model="picForm" style="width: 100%; margin: 0;" @submit="handleHighTecChange"></avue-form>
|
|
|
</basic-card>
|
|
|
|
|
|
- <basic-card title="出勤时间设置">
|
|
|
+ <basic-card title="出勤时间设置" v-loading="compBasicLoading">
|
|
|
<el-button type="primary" plain size="small" @click="handleLastYearData(1)" style="margin-bottom: 12px;">读取上年度数据</el-button>
|
|
|
<avue-form :option="attendOption" v-model="attendForm" @submit="handleSubmitAtten" style="width: 600px; margin: 0;"></avue-form>
|
|
|
</basic-card>
|
|
|
@@ -132,11 +132,14 @@ export default {
|
|
|
precision: 1,
|
|
|
}
|
|
|
]
|
|
|
- }
|
|
|
+ },
|
|
|
+
|
|
|
+ tenantLoading: false,
|
|
|
+ compBasicLoading: false,
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapGetters(["userInfo"]),
|
|
|
+ ...mapGetters(["userInfo", 'pageYear']),
|
|
|
},
|
|
|
watch: {
|
|
|
yearAndMonth(newVal) {
|
|
|
@@ -146,6 +149,11 @@ export default {
|
|
|
mounted() {
|
|
|
this.getTenantDetailFunc(this.userInfo.tenant_id);
|
|
|
},
|
|
|
+ activated() {
|
|
|
+ if (this.yearAndMonth != this.pageYear) {
|
|
|
+ this.yearAndMonth = this.pageYear;
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
/**
|
|
|
* 读取上年度高企证书或出勤信息
|
|
|
@@ -166,10 +174,14 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
getTenantDetailFunc(tenantId) {
|
|
|
+ this.tenantLoading = true;
|
|
|
getTenantDetail(tenantId).then(({ data }) => {
|
|
|
+ this.tenantLoading = false;
|
|
|
if (data.code == 200) {
|
|
|
this.logoForm = data.data;
|
|
|
}
|
|
|
+ }).catch(() => {
|
|
|
+ this.tenantLoading = false;
|
|
|
});
|
|
|
},
|
|
|
handleSubmitLogo(form, done) {
|
|
|
@@ -184,7 +196,9 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
getAttenDetailFunc(yearAndMonth) {
|
|
|
+ this.compBasicLoading = true;
|
|
|
getAttenDetail(yearAndMonth).then(({ data }) => {
|
|
|
+ this.compBasicLoading = false;
|
|
|
if (data.code == 200) {
|
|
|
if (Object.keys(data.data).length) {
|
|
|
const _data = data.data;
|
|
|
@@ -195,6 +209,8 @@ export default {
|
|
|
this.attendForm = { id: undefined, workHours: undefined };
|
|
|
}
|
|
|
}
|
|
|
+ }).catch(() => {
|
|
|
+ this.compBasicLoading = false;
|
|
|
})
|
|
|
},
|
|
|
handleHighTecChange(form, done) {
|