|
@ -62,6 +62,11 @@ |
|
|
<pointModal ref="pointModalRef" /> |
|
|
<pointModal ref="pointModalRef" /> |
|
|
</a-col> |
|
|
</a-col> |
|
|
</a-row> |
|
|
</a-row> |
|
|
|
|
|
<a-modal v-model:open="reportOpen" title="点位上报错误信息" :footer="null"> |
|
|
|
|
|
<div v-for="(item, index) in errorList" :key="index" style="margin-top: 10px"> |
|
|
|
|
|
{{ item }} |
|
|
|
|
|
</div> |
|
|
|
|
|
</a-modal> |
|
|
</PageWrapper> |
|
|
</PageWrapper> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
@ -76,6 +81,7 @@ |
|
|
import pointModal from './pointModal.vue'; |
|
|
import pointModal from './pointModal.vue'; |
|
|
import { downloadExcel } from '@/utils/file/download'; |
|
|
import { downloadExcel } from '@/utils/file/download'; |
|
|
import { message } from 'ant-design-vue'; |
|
|
import { message } from 'ant-design-vue'; |
|
|
|
|
|
|
|
|
defineOptions({ name: 'Point' }); |
|
|
defineOptions({ name: 'Point' }); |
|
|
|
|
|
|
|
|
const [registerTable, { getForm, reload }] = useTable({ |
|
|
const [registerTable, { getForm, reload }] = useTable({ |
|
@ -159,23 +165,30 @@ |
|
|
// message.success('导入成功'); |
|
|
// message.success('导入成功'); |
|
|
reload(); |
|
|
reload(); |
|
|
}; |
|
|
}; |
|
|
|
|
|
//批量上报点位 |
|
|
const batchLoading = ref(false); |
|
|
const batchLoading = ref(false); |
|
|
|
|
|
const reportOpen = ref(false); |
|
|
|
|
|
const errorList = ref<any[]>([]); |
|
|
const reportUpload = (file: any) => { |
|
|
const reportUpload = (file: any) => { |
|
|
console.log(file); |
|
|
console.log(file); |
|
|
const params = { |
|
|
const params = { |
|
|
file: file, |
|
|
file: file, |
|
|
}; |
|
|
}; |
|
|
batchLoading.value = true; |
|
|
batchLoading.value = true; |
|
|
|
|
|
errorList.value = []; |
|
|
uploadWorkOrderInfo(params).then((res) => { |
|
|
uploadWorkOrderInfo(params).then((res) => { |
|
|
batchLoading.value = false; |
|
|
batchLoading.value = false; |
|
|
console.log(res); |
|
|
console.log(res); |
|
|
res.forEach((i:any) => { |
|
|
res.forEach((i: any) => { |
|
|
if (i.includes('失败')) { |
|
|
if (i.includes('失败')) { |
|
|
message.error(i); |
|
|
errorList.value.push(i); |
|
|
} else { |
|
|
} else { |
|
|
message.success(i); |
|
|
message.success(i); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
if (errorList.value.length > 0) { |
|
|
|
|
|
reportOpen.value = true; |
|
|
|
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
return false; |
|
|
return false; |
|
|