Commit 57a7202c by haojie

1

parent 2d76671e
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
> >
</div> </div>
</div> </div>
<CustomLoading v-show="loading_2"></CustomLoading>
</div> </div>
</div> </div>
<CustomLoading v-show="loading"></CustomLoading> <CustomLoading v-show="loading"></CustomLoading>
...@@ -41,6 +42,7 @@ import { FormExample2 } from '@/utils/api/Task'; ...@@ -41,6 +42,7 @@ import { FormExample2 } from '@/utils/api/Task';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import { show_message } from '@/utils/tdesign_tool'; import { show_message } from '@/utils/tdesign_tool';
const loading = ref(false); const loading = ref(false);
const loading_2 = ref(false);
const route = useRoute(); const route = useRoute();
const id = route.query.id; const id = route.query.id;
// el // el
...@@ -136,13 +138,22 @@ const onReset = () => { ...@@ -136,13 +138,22 @@ const onReset = () => {
const onSubmit = async () => { const onSubmit = async () => {
// 校验表单 // 校验表单
let params = FilterForm(AdminData.list); let params = FilterForm(AdminData.list);
if (!params) {
return;
}
try { try {
let res: any = await useSubmitImage(params); loading_2.value = true;
let res: any = await useSubmitImage({
scenario_id: scenario_id.value,
parameters: params,
});
if (res.code == 0) { if (res.code == 0) {
show_message('上传成功', 'success'); show_message('上传成功', 'success');
} }
loading_2.value = false;
} catch (e) { } catch (e) {
console.log(e); console.log(e);
loading_2.value = false;
} }
}; };
...@@ -173,6 +184,7 @@ onBeforeMount(async () => { ...@@ -173,6 +184,7 @@ onBeforeMount(async () => {
.generation-box { .generation-box {
width: 100%; width: 100%;
display: flex; display: flex;
position: relative;
.interaction-form { .interaction-form {
background: #2d2d2d; background: #2d2d2d;
border: 1px solid #565656; border: 1px solid #565656;
......
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