Commit 3765abd6 authored by daniel's avatar daniel

fix(upload): 选号规则导入处理

parent fc76859c
......@@ -303,7 +303,7 @@
<h2 class="h3">赛事详情样式</h2>
</div>
<div class="card-body"
style="display: flex;flex-display:row;align-items: center"
style="display: flex;flex-direction: row;align-items: center"
id="style-select">
<img data-style="1"
class="${(cmpt.detailStyle==1||cmpt.detailStyle==null)?'active-style':''}"
......
......@@ -137,6 +137,7 @@
</n-upload>
<n-upload
:max="1"
:data="false"
@change="onChange($event,MARK_NO)"
v-model:file-list="fileList"
accept=".xlsx,.xls"
......@@ -600,11 +601,12 @@
const url = type === PLAYER ? PLAYERS_EXPORT_URL : MARK_NO_EXPORT_URL
window.location.href = url
}
// 文件上传成功
const onChange = async (file, type) => {
const onChange = async (fileEvent, type) => {
loading.value = true
const formData = new FormData();
formData.append('file', file.file);
formData.append('file', fileEvent.file.file);
formData.append('cmptId', getCId());
const url = type === PLAYER ? PLAYERS_IMPORT_URL : MARK_NO_IMPORT_URL
const [err, res] = await to(fetch(url, {
......
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