修改日志

This commit is contained in:
guanj
2026-01-12 14:49:21 +08:00
parent 77617412dd
commit 379951699d
4 changed files with 141 additions and 129 deletions

View File

@@ -10,7 +10,7 @@
</TableHeader>
<div :key="key">
<Table ref="tableRef" :height="'49vh'"></Table>
<Table ref="tableRef" :height="'calc(50vh - 100px)'"></Table>
</div>
</el-dialog>
</template>

View File

@@ -153,7 +153,7 @@ const typeOptions = ref([
{ label: 'cp95值', value: 4 }
])
onMounted(() => {
datePickerRef.value.setTheDate(5)
datePickerRef.value.setTheDate(4)
init()
})
const height: any = ref(mainHeight(200, 1))

View File

@@ -43,7 +43,9 @@
<el-button icon="el-icon-Upload" type="primary" class="mr10 ml10">上传接线图</el-button>
</template>
</el-upload>
<el-button icon="el-icon-Download" type="primary" @click="exportEvent" :loading="loading">生成</el-button>
<el-button icon="el-icon-Download" type="primary" @click="exportEvent" :loading="loading">
生成
</el-button>
</template>
</TableHeader>
<div class="box">
@@ -107,10 +109,10 @@ const handleNodeClick = (data: any, node: any) => {
}
// 上传
const choose = (files: any) => {
const isJPG = files.raw.type === 'image/jpg'
const isJPG = files.raw.type === 'image/jpeg'
const isPNG = files.raw.type === 'image/png'
if (!isJPG && !isPNG) {
ElMessage.warning('上传文件只能是 JPG/PNG 格式!')
ElMessage.warning('上传文件只能是 jpg/png 格式!')
return false
}
@@ -146,22 +148,24 @@ const exportEvent = () => {
} else {
loading.value = true
ElMessage('生成报告中...')
exportModel(form).then((res: any) => {
let blob = new Blob([res], {
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8'
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 + dayjs().format('YYYYMMDD') // 设置下载的文件名
document.body.appendChild(link)
link.click() //执行下载
document.body.removeChild(link)
loading.value = false
})
.catch((err: any) => {
loading.value = false
})
// createObjectURL(blob); //创建下载的链接
const url = window.URL.createObjectURL(blob)
const link = document.createElement('a') // 创建a标签
link.href = url
link.download = dotList.value.name+ dayjs().format('YYYYMMDD') // 设置下载的文件名
document.body.appendChild(link)
link.click() //执行下载
document.body.removeChild(link)
loading.value =false
}).catch((err: any) => {
loading.value =false
})
}
}
</script>