2024年7月15日 新增等待框
This commit is contained in:
parent
dea186b4d4
commit
975cdf4ec2
|
@ -64,7 +64,9 @@
|
||||||
<span>温馨提示:点击导入后选择数据模板进行导入!</span>
|
<span>温馨提示:点击导入后选择数据模板进行导入!</span>
|
||||||
</a-col>
|
</a-col>
|
||||||
<span style="text-align: center;">
|
<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>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="current == 2" style="padding: 20px;text-align: center;line-height: 100px;">
|
<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数据
|
//注册table数据
|
||||||
const { onImportXls } = useListPage({
|
const { onImportXls } = useListPage({
|
||||||
importConfig: {
|
importConfig: {
|
||||||
url: getImportUrl,
|
url: getImportUrl,
|
||||||
success: handleSuccess
|
success: handleSuccess
|
||||||
|
@ -126,6 +128,8 @@ const formData = reactive<Record<string, any>>({
|
||||||
|
|
||||||
|
|
||||||
const current = ref<number>(0);
|
const current = ref<number>(0);
|
||||||
|
const uploadButtonSpinning = ref<boolean>(false);
|
||||||
|
|
||||||
const next = () => {
|
const next = () => {
|
||||||
current.value++;
|
current.value++;
|
||||||
};
|
};
|
||||||
|
@ -149,6 +153,7 @@ const validatorRules = {
|
||||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||||
//上传完成回调
|
//上传完成回调
|
||||||
function handleSuccess(){
|
function handleSuccess(){
|
||||||
|
uploadButtonSpinning.value = false;
|
||||||
current.value++;
|
current.value++;
|
||||||
console.log("参数--------》",{id:formData.id})
|
console.log("参数--------》",{id:formData.id})
|
||||||
defHttp.get({url:'/blStuAnswer/blStuAnswer/createWord',params:{id:formData.id}}).then(res=>{
|
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({
|
defineExpose({
|
||||||
add,
|
add,
|
||||||
edit,
|
edit,
|
||||||
|
|
|
@ -64,7 +64,9 @@
|
||||||
<span>温馨提示:点击导入后选择数据模板进行导入!</span>
|
<span>温馨提示:点击导入后选择数据模板进行导入!</span>
|
||||||
</a-col>
|
</a-col>
|
||||||
<span style="text-align: center;">
|
<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>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="current == 2" style="padding: 20px;text-align: center;line-height: 100px;">
|
<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 current = ref<number>(0);
|
||||||
|
const uploadButtonSpinning = ref<boolean>(false);
|
||||||
const next = () => {
|
const next = () => {
|
||||||
current.value++;
|
current.value++;
|
||||||
};
|
};
|
||||||
|
@ -149,6 +152,7 @@ const validatorRules = {
|
||||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||||
//上传完成回调
|
//上传完成回调
|
||||||
function handleSuccess(){
|
function handleSuccess(){
|
||||||
|
uploadButtonSpinning.value = false;
|
||||||
current.value++;
|
current.value++;
|
||||||
console.log("参数--------》",{id:formData.id})
|
console.log("参数--------》",{id:formData.id})
|
||||||
defHttp.get({url:'/blTeacherAnswer/blTeacherAnswer/createWord',params:{id:formData.id}}).then(res=>{
|
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({
|
defineExpose({
|
||||||
add,
|
add,
|
||||||
edit,
|
edit,
|
||||||
|
|
Loading…
Reference in New Issue