bug调整
This commit is contained in:
@@ -22,19 +22,20 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="报表类型">
|
||||
<el-select
|
||||
:disabled="true"
|
||||
v-model="reportForm"
|
||||
:popper-append-to-body="false"
|
||||
placeholder="请选择报表类型"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in reportFormList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-input readonly type='text' value='分析报表'></el-input>
|
||||
<!-- <el-select-->
|
||||
<!-- :disabled="true"-->
|
||||
<!-- v-model="reportForm"-->
|
||||
<!-- :popper-append-to-body="false"-->
|
||||
<!-- placeholder="请选择报表类型"-->
|
||||
<!-- >-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in reportFormList"-->
|
||||
<!-- :key="item.value"-->
|
||||
<!-- :label="item.label"-->
|
||||
<!-- :value="item.value"-->
|
||||
<!-- ></el-option>-->
|
||||
<!-- </el-select>-->
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<el-input v-model="tableStore.table.params.crmName" maxlength="32" show-word-limit clearable placeholder="请输入客户名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="报表编号">
|
||||
<el-input v-model="tableStore.table.params.reportNumber" clearable placeholder="请输入报表编号" />
|
||||
<el-input v-model="tableStore.table.params.reportNumber" clearable placeholder="请输入报表编号" maxlength="12" show-word-limit />
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
@@ -46,7 +46,7 @@ import TableHeader from '@/components/table/header/index.vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { exportModel } from '@/api/process-boot/reportForms'
|
||||
import { genFileId, ElMessage } from 'element-plus'
|
||||
import { genFileId, ElMessage, ElNotification } from 'element-plus'
|
||||
import type { UploadProps, UploadUserFile } from 'element-plus'
|
||||
defineOptions({
|
||||
// name: 'harmonic-boot/report/word'
|
||||
@@ -114,17 +114,24 @@ const exportEvent = () => {
|
||||
form.append('file', uploadList.value?.raw ||'')
|
||||
|
||||
exportModel(form).then((res: any) => {
|
||||
let blob = new Blob([res], {
|
||||
type: "application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8",
|
||||
})
|
||||
// createObjectURL(blob); //创建下载的链接
|
||||
const url = window.URL.createObjectURL(blob)
|
||||
const link = document.createElement('a') // 创建a标签
|
||||
link.href = url
|
||||
link.download = dotList.value.name // 设置下载的文件名
|
||||
document.body.appendChild(link)
|
||||
link.click() //执行下载
|
||||
document.body.removeChild(link)
|
||||
if(res.size == 79){
|
||||
ElNotification({
|
||||
type: 'error',
|
||||
message: '包含特殊字符,请注意修改!'
|
||||
})
|
||||
}else{
|
||||
let blob = new Blob([res], {
|
||||
type: "application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8",
|
||||
})
|
||||
// createObjectURL(blob); //创建下载的链接
|
||||
const url = window.URL.createObjectURL(blob)
|
||||
const link = document.createElement('a') // 创建a标签
|
||||
link.href = url
|
||||
link.download = dotList.value.name // 设置下载的文件名
|
||||
document.body.appendChild(link)
|
||||
link.click() //执行下载
|
||||
document.body.removeChild(link)
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user