parent
c56599e042
commit
192c917ab7
@ -0,0 +1,81 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<import-steps :active="activeStep"></import-steps>
|
||||||
|
<data-source-import
|
||||||
|
:dataSourceImportDisabled="dataSourceImportDisabled"
|
||||||
|
@nextStep="nextStep"
|
||||||
|
v-if="activeStep == 1 || activeStep == 0"
|
||||||
|
></data-source-import>
|
||||||
|
<template-import
|
||||||
|
:templateImportDisabled="templateImportDisabled"
|
||||||
|
@nextStep="nextStep"
|
||||||
|
v-if="activeStep == 1 || activeStep == 0"
|
||||||
|
></template-import>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import ImportSteps from "@/components/gmhExcel/ImportSteps";
|
||||||
|
import DataSourceImport from "@/components/gmhExcel/DataSourceImport";
|
||||||
|
import TemplateImport from "@/components/gmhExcel/TemplateImport";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: { ImportSteps, DataSourceImport, TemplateImport },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
activeStep: 0
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.test();
|
||||||
|
},
|
||||||
|
mounted() {},
|
||||||
|
methods: {
|
||||||
|
test() {
|
||||||
|
this.$axios
|
||||||
|
.get("/api/test/test")
|
||||||
|
.then(res => {
|
||||||
|
const { data } = res;
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
console.log(err);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
nextStep(val) {
|
||||||
|
this.activeStep = val;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
// 数据源导入disabled
|
||||||
|
dataSourceImportDisabled() {
|
||||||
|
return !(this.activeStep == 0);
|
||||||
|
},
|
||||||
|
// 模板导入disabled
|
||||||
|
templateImportDisabled() {
|
||||||
|
return !(this.activeStep == 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.table-s {
|
||||||
|
height: 400px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
.bottom-10 {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.top-10 {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
.left-10 {
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
.right-10 {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
.f-right {
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,34 @@
|
|||||||
|
import { Loading } from 'element-ui';
|
||||||
|
|
||||||
|
let loadingCount = 0;
|
||||||
|
let loading;
|
||||||
|
|
||||||
|
const startLoading = () => {
|
||||||
|
loading = Loading.service({
|
||||||
|
lock: true,
|
||||||
|
text: '拼命加载中...',//可以自定义文字
|
||||||
|
spinner: 'el-icon-loading',//自定义加载图标类名
|
||||||
|
background: 'rgba(0, 0, 0, 0.7)'//遮罩层背景色
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const endLoading = () => {
|
||||||
|
loading.close();
|
||||||
|
};
|
||||||
|
|
||||||
|
export const showLoading = () => {
|
||||||
|
if (loadingCount === 0) {
|
||||||
|
startLoading();
|
||||||
|
}
|
||||||
|
loadingCount += 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const hideLoading = () => {
|
||||||
|
if (loadingCount <= 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
loadingCount -= 1;
|
||||||
|
if (loadingCount === 0) {
|
||||||
|
endLoading();
|
||||||
|
}
|
||||||
|
};
|
Loading…
Reference in new issue