2024年7月15日 新增等待框

This commit is contained in:
bai 2024-07-15 22:32:16 +08:00
parent dea186b4d4
commit 975cdf4ec2
2 changed files with 22 additions and 3 deletions

View File

@ -64,7 +64,9 @@
<span>温馨提示点击导入后选择数据模板进行导入</span>
</a-col>
<span style="text-align: center;">
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls($event, { id: formData.id})">导入</j-upload-button>
<a-spin :spinning="uploadButtonSpinning">
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXlsPlus($event, { id: formData.id})">导入</j-upload-button>
</a-spin>
</span>
</div>
<div v-if="current == 2" style="padding: 20px;text-align: center;line-height: 100px;">
@ -114,7 +116,7 @@ const formData = reactive<Record<string, any>>({
//table
const { onImportXls } = useListPage({
const { onImportXls } = useListPage({
importConfig: {
url: getImportUrl,
success: handleSuccess
@ -126,6 +128,8 @@ const formData = reactive<Record<string, any>>({
const current = ref<number>(0);
const uploadButtonSpinning = ref<boolean>(false);
const next = () => {
current.value++;
};
@ -149,6 +153,7 @@ const validatorRules = {
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
//
function handleSuccess(){
uploadButtonSpinning.value = false;
current.value++;
console.log("参数--------》",{id:formData.id})
defHttp.get({url:'/blStuAnswer/blStuAnswer/createWord',params:{id:formData.id}}).then(res=>{
@ -244,6 +249,11 @@ async function submitForm() {
});
}
function onImportXlsPlus(...d) {
uploadButtonSpinning.value = true;
onImportXls(...d);
}
defineExpose({
add,
edit,

View File

@ -64,7 +64,9 @@
<span>温馨提示点击导入后选择数据模板进行导入</span>
</a-col>
<span style="text-align: center;">
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls($event, { id: formData.id})">导入</j-upload-button>
<a-spin :spinning="uploadButtonSpinning">
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXlsPlus($event, { id: formData.id})">导入</j-upload-button>
</a-spin>
</span>
</div>
<div v-if="current == 2" style="padding: 20px;text-align: center;line-height: 100px;">
@ -126,6 +128,7 @@ const formData = reactive<Record<string, any>>({
const current = ref<number>(0);
const uploadButtonSpinning = ref<boolean>(false);
const next = () => {
current.value++;
};
@ -149,6 +152,7 @@ const validatorRules = {
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
//
function handleSuccess(){
uploadButtonSpinning.value = false;
current.value++;
console.log("参数--------》",{id:formData.id})
defHttp.get({url:'/blTeacherAnswer/blTeacherAnswer/createWord',params:{id:formData.id}}).then(res=>{
@ -244,6 +248,11 @@ async function submitForm() {
});
}
function onImportXlsPlus(...d) {
uploadButtonSpinning.value = true;
onImportXls(...d);
}
defineExpose({
add,
edit,