|
|
|
|
@ -4,8 +4,25 @@ import {replenishExcelGab} from "@/api/data/petitionComplaint";
|
|
|
|
|
import feedback from "@/utils/feedback"; |
|
|
|
|
let fileList = ref([]) |
|
|
|
|
let loading =ref(false) |
|
|
|
|
const dialogTitle = ref("公安部信访集访导入") |
|
|
|
|
|
|
|
|
|
const {replenishType} = defineProps({ |
|
|
|
|
replenishType:{ |
|
|
|
|
type: String, |
|
|
|
|
defalut: 1 |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
const emit=defineEmits(['success','close']) |
|
|
|
|
//监听导入类型 |
|
|
|
|
watch(()=>replenishType,()=>{ |
|
|
|
|
fileList.value=[] |
|
|
|
|
if (replenishType == 1){ |
|
|
|
|
dialogTitle.value='公安部信访集访导入' |
|
|
|
|
}else{ |
|
|
|
|
dialogTitle.value='公安部信访领导接访导入' |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 上传文件 |
|
|
|
|
* */ |
|
|
|
|
@ -15,7 +32,7 @@ const handleNext = async ()=>{
|
|
|
|
|
formData.append("file", fileList.value[fileList.value.length - 1].raw); |
|
|
|
|
loading.value = true; |
|
|
|
|
try { |
|
|
|
|
const res = await replenishExcelGab(formData); |
|
|
|
|
await replenishExcelGab(formData); |
|
|
|
|
feedback.msgSuccess("操作成功"); |
|
|
|
|
emit("success") |
|
|
|
|
} catch (e) { |
|
|
|
|
@ -29,7 +46,7 @@ const handleNext = async ()=>{
|
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
|
<!--公安部数据补充--> |
|
|
|
|
<el-dialog title="公安部信访投诉补充导入" width="80vw" ref="dialogRef" top="8vh"> |
|
|
|
|
<el-dialog :title="dialogTitler" width="80vw" ref="dialogRef" top="8vh"> |
|
|
|
|
<div v-loading="loading"> |
|
|
|
|
<el-upload |
|
|
|
|
drag |
|
|
|
|
@ -59,15 +76,15 @@ const handleNext = async ()=>{
|
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</el-upload> |
|
|
|
|
<!-- <div class="mt-20">--> |
|
|
|
|
<!-- <span>文件模板</span>--> |
|
|
|
|
<!-- <a--> |
|
|
|
|
<!-- class="link"--> |
|
|
|
|
<!-- :href="`${BASE_PATH}/templates/公安信访投诉数据导入模板.xls`"--> |
|
|
|
|
<!-- target="__blank"--> |
|
|
|
|
<!-- >公安信访投诉数据导入模板.xls 下载</a--> |
|
|
|
|
<!-- >--> |
|
|
|
|
<!-- </div>--> |
|
|
|
|
<div class="mt-20"> |
|
|
|
|
<span>文件模板</span> |
|
|
|
|
<a |
|
|
|
|
class="link" |
|
|
|
|
:href="`${BASE_PATH}/templates/${dialogTitle}模板.xlsx`" |
|
|
|
|
target="__blank" |
|
|
|
|
>{{dialogTitle}}模板.xlsx 下载</a |
|
|
|
|
> |
|
|
|
|
</div> |
|
|
|
|
<footer class="flex end mt-20 v-center"> |
|
|
|
|
<el-button type="primary" |
|
|
|
|
size="large" |
|
|
|
|
|