微调
This commit is contained in:
@@ -41,6 +41,7 @@ if (VITE_FLAG) {
|
|||||||
xls: currentRoute.value.href?.split('?')[1].split('.')[1] == 'xls' ? true : false
|
xls: currentRoute.value.href?.split('?')[1].split('.')[1] == 'xls' ? true : false
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
console.log('🚀 ~ urlKey:', urlKey)
|
||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
const previewUrl = await previewFile(currentRoute.value?.href?.split('?')[1])
|
const previewUrl = await previewFile(currentRoute.value?.href?.split('?')[1])
|
||||||
url.value = previewUrl
|
url.value = previewUrl
|
||||||
|
|||||||
@@ -232,6 +232,16 @@ const onResetForm = () => {
|
|||||||
//时间重置成默认值
|
//时间重置成默认值
|
||||||
datePickerRef.value?.setTheDate(3)
|
datePickerRef.value?.setTheDate(3)
|
||||||
|
|
||||||
|
if(props.showTimeAll){
|
||||||
|
timeAll.value = false
|
||||||
|
delete tableStore.table.params.searchBeginTime
|
||||||
|
delete tableStore.table.params.searchEndTime
|
||||||
|
delete tableStore.table.params.startTime
|
||||||
|
delete tableStore.table.params.endTime
|
||||||
|
delete tableStore.table.params.timeFlag
|
||||||
|
delete tableStore.table.params.interval
|
||||||
|
}
|
||||||
|
|
||||||
if (props.datePicker && timeAll.value) {
|
if (props.datePicker && timeAll.value) {
|
||||||
tableStore.table.params.searchBeginTime = datePickerRef.value.timeValue[0]
|
tableStore.table.params.searchBeginTime = datePickerRef.value.timeValue[0]
|
||||||
tableStore.table.params.searchEndTime = datePickerRef.value.timeValue[1]
|
tableStore.table.params.searchEndTime = datePickerRef.value.timeValue[1]
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="layout-logo">
|
<div class="layout-logo">
|
||||||
<img v-if="!config.layout.menuCollapse" class="logo-img" :src="getTheme.logoUrl" />
|
<img v-if="!config.layout.menuCollapse && getTheme && getTheme.logoUrl" class="logo-img" :src="getTheme.logoUrl" />
|
||||||
<!-- <div-->
|
<!-- <div-->
|
||||||
<!-- v-if="!config.layout.menuCollapse"-->
|
<!-- v-if="!config.layout.menuCollapse"-->
|
||||||
<!-- :style="{ color: config.getColorVal('menuActiveColor') }"-->
|
<!-- :style="{ color: config.getColorVal('menuActiveColor') }"-->
|
||||||
@@ -28,7 +28,9 @@ import { Session } from '@/utils/storage'
|
|||||||
import { setNavTabsWidth } from '@/utils/layout'
|
import { setNavTabsWidth } from '@/utils/layout'
|
||||||
|
|
||||||
const config = useConfig()
|
const config = useConfig()
|
||||||
const getTheme = JSON.parse(window.localStorage.getItem('getTheme') as string)
|
const getTheme = window.localStorage.getItem('getTheme')
|
||||||
|
? JSON.parse(window.localStorage.getItem('getTheme') as string)
|
||||||
|
: null
|
||||||
const onMenuCollapse = function () {
|
const onMenuCollapse = function () {
|
||||||
if (config.layout.shrink && !config.layout.menuCollapse) {
|
if (config.layout.shrink && !config.layout.menuCollapse) {
|
||||||
closeShade()
|
closeShade()
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<span class="nav-bar-title">
|
<span class="nav-bar-title">
|
||||||
{{ getTheme.name }}
|
{{ getTheme?.name || '' }}
|
||||||
<span style="font-size: 14px">({{ Version || 'v1.0.0' }})</span>
|
<span style="font-size: 14px">({{ Version || 'v1.0.0' }})</span>
|
||||||
<!-- <span style="font-size: 14px;" v-if="Version?.versionName">
|
<!-- <span style="font-size: 14px;" v-if="Version?.versionName">
|
||||||
({{ Version?.versionName }})
|
({{ Version?.versionName }})
|
||||||
@@ -28,7 +28,9 @@ import { getLastData } from '@/api/systerm'
|
|||||||
|
|
||||||
const Version: any = ref(null)
|
const Version: any = ref(null)
|
||||||
const config = useConfig()
|
const config = useConfig()
|
||||||
const getTheme = JSON.parse(window.localStorage.getItem('getTheme') as string)
|
const getTheme = window.localStorage.getItem('getTheme')
|
||||||
|
? JSON.parse(window.localStorage.getItem('getTheme') as string)
|
||||||
|
: { name: '' }
|
||||||
const VITE_FLAG = import.meta.env.VITE_NAME == 'hainan'
|
const VITE_FLAG = import.meta.env.VITE_NAME == 'hainan'
|
||||||
const onMenuCollapse = () => {
|
const onMenuCollapse = () => {
|
||||||
showShade('ba-aside-menu-shade', () => {
|
showShade('ba-aside-menu-shade', () => {
|
||||||
@@ -43,7 +45,7 @@ onMounted(() => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
document.title = getTheme.name
|
document.title = getTheme?.name || ''
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { downloadFile } from '@/api/system-boot/file'
|
import { downloadFile } from '@/api/system-boot/file'
|
||||||
// 下载文件
|
// 下载文件
|
||||||
export const download = (urls: string) => {
|
export const download = (urls: string) => {
|
||||||
console.log('下载', urls)
|
//console.log('下载', urls)
|
||||||
|
|
||||||
downloadFile({ filePath: urls })
|
downloadFile({ filePath: urls })
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
@@ -21,9 +21,9 @@ export const download = (urls: string) => {
|
|||||||
}
|
}
|
||||||
return mimeMap[ext] || ''
|
return mimeMap[ext] || ''
|
||||||
}
|
}
|
||||||
|
|
||||||
const blob = new Blob([res], { type: getFileType(urls) })
|
const blob = new Blob([res], { type: getFileType(urls) })
|
||||||
|
|
||||||
// 2. 提取文件名并保留原生后缀(核心修复点)
|
// 2. 提取文件名并保留原生后缀(核心修复点)
|
||||||
const fileName = urls.split('/').at(-1) || '下载文件' // 先提取URL最后一段(文件名)
|
const fileName = urls.split('/').at(-1) || '下载文件' // 先提取URL最后一段(文件名)
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ function removeLastDotSuffix(str: string) {
|
|||||||
|
|
||||||
// 预览文件
|
// 预览文件
|
||||||
export const previewFile = async (urls: any) => {
|
export const previewFile = async (urls: any) => {
|
||||||
console.log('预览', urls)
|
//console.log('预览', urls)
|
||||||
let url = ''
|
let url = ''
|
||||||
|
|
||||||
await downloadFile({ filePath: decodeURI(urls) })
|
await downloadFile({ filePath: decodeURI(urls) })
|
||||||
@@ -85,6 +85,6 @@ export const previewFile = async (urls: any) => {
|
|||||||
console.error('下载失败:', err)
|
console.error('下载失败:', err)
|
||||||
// 可添加错误提示(如Toast)
|
// 可添加错误提示(如Toast)
|
||||||
})
|
})
|
||||||
console.log('url', url)
|
//console.log('url', url)
|
||||||
return url
|
return url
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -133,6 +133,7 @@ const list: any = ref({
|
|||||||
alarmThreshold: ''
|
alarmThreshold: ''
|
||||||
})
|
})
|
||||||
const level: any = ref(dictData.state.area[0]?.level)
|
const level: any = ref(dictData.state.area[0]?.level)
|
||||||
|
console.log('level', level)
|
||||||
const flag: any = ref('')
|
const flag: any = ref('')
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/onlineMonitor/list',
|
url: '/supervision-boot/onlineMonitor/list',
|
||||||
@@ -364,7 +365,7 @@ tableStore.table.params.dataType = '1'
|
|||||||
tableStore.table.params.deptId = dictData.state.area[0].id
|
tableStore.table.params.deptId = dictData.state.area[0].id
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
TableHeaderRef.value.setDatePicker([{ label: '月', value: 3 }])
|
TableHeaderRef.value.setDatePicker([{ label: '月份', value: 3 }])
|
||||||
|
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<el-tab-pane :label="VITE_FLAG ? '现场测试' : '计划实施问题'" name="3" v-if="tabList.includes('3')">
|
<el-tab-pane :label="VITE_FLAG ? '现场测试' : '计划实施问题'" name="3" v-if="tabList.includes('3')">
|
||||||
<testQuestions v-if="activeName == '3'" />
|
<testQuestions v-if="activeName == '3'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="试运行评估" name="4" v-if="tabList.includes('4')">
|
<el-tab-pane label="试运行评估问题" name="4" v-if="tabList.includes('4')">
|
||||||
<testRun v-if="activeName == '4'" />
|
<testRun v-if="activeName == '4'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<!-- <el-tabs v-model="activeName" type="border-card">
|
<!-- <el-tabs v-model="activeName" type="border-card">
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ import { useDictData } from '@/stores/dictData'
|
|||||||
import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||||
import { deleteWarningLeaflet } from '@/api/supervision-boot/delete/index'
|
import { deleteWarningLeaflet } from '@/api/supervision-boot/delete/index'
|
||||||
import detail from '@/views/pqs/supervise/harmonicSurvey/test/detail.vue'
|
import detail from '@/views/pqs/supervise/harmonicSurvey/test/detail.vue'
|
||||||
|
import {download} from '@/utils/fileDownLoad'
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
|
|
||||||
const statusSelect = [
|
const statusSelect = [
|
||||||
@@ -237,8 +238,6 @@ const tableStore = new TableStore({
|
|||||||
return !(row.problemType == 2 || row.problemType == 4)
|
return !(row.problemType == 2 || row.problemType == 4)
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
if (row.problemType == 2) {
|
if (row.problemType == 2) {
|
||||||
@@ -271,7 +270,9 @@ const tableStore = new TableStore({
|
|||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
if (row.problemType == 2) {
|
if (row.problemType == 2) {
|
||||||
window.open(row.filePath)
|
|
||||||
|
//window.open(row.filePath)
|
||||||
|
download('/' + row.absFilePath)
|
||||||
} else {
|
} else {
|
||||||
if (row.problemPath == null) {
|
if (row.problemPath == null) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
@@ -280,6 +281,7 @@ const tableStore = new TableStore({
|
|||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
getFileNameAndFilePath({ filePath: '/' + row.problemPath }).then(res => {
|
getFileNameAndFilePath({ filePath: '/' + row.problemPath }).then(res => {
|
||||||
|
|
||||||
window.open(res.data.url)
|
window.open(res.data.url)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,6 +32,10 @@ import { cancelFeedback, getById } from '@/api/supervision-boot/leaflet'
|
|||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { deleteWarningLeaflet } from '@/api/supervision-boot/delete/index'
|
import { deleteWarningLeaflet } from '@/api/supervision-boot/delete/index'
|
||||||
|
import {download} from '@/utils/fileDownLoad'
|
||||||
|
|
||||||
|
import { getFileNameAndFilePath, downloadFile } from '@/api/system-boot/file'
|
||||||
|
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
//获取登陆用户姓名和部门
|
//获取登陆用户姓名和部门
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
@@ -155,7 +159,7 @@ const tableStore = new TableStore({
|
|||||||
|
|
||||||
click: row => {
|
click: row => {
|
||||||
const match = row.filePath.match(/excelreport(\/[^?#]*)/)
|
const match = row.filePath.match(/excelreport(\/[^?#]*)/)
|
||||||
|
|
||||||
window.open(window.location.origin + '/#/previewFile?' + match[1])
|
window.open(window.location.origin + '/#/previewFile?' + match[1])
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -169,7 +173,15 @@ const tableStore = new TableStore({
|
|||||||
return row.problemType != 2
|
return row.problemType != 2
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
window.open(row.filePath)
|
|
||||||
|
//window.open(row.filePath)
|
||||||
|
// const match = row.filePath.match(/excelreport(\/[^?#]*)/)
|
||||||
|
// const decodedPath = decodeURI(match[1]) // 解码URL中的中文字符
|
||||||
|
//download('/' + row.absFilePath)
|
||||||
|
|
||||||
|
//download('/supervision/微服务系统测试页面功能-20251224合并版本.docx')
|
||||||
|
download('/onlineReport/电能[预]2025年18号-张家口地市 电能质量技术监督预警单.docx')
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
@@ -315,6 +327,11 @@ const tableStore = new TableStore({
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
tableStore.table.params.status = ''
|
tableStore.table.params.status = ''
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
|
|||||||
@@ -92,8 +92,10 @@ const getInfo = async () => {
|
|||||||
|
|
||||||
const getFileData = async () => {
|
const getFileData = async () => {
|
||||||
//如果有问题附件
|
//如果有问题附件
|
||||||
|
console.log('000',detailData.value)
|
||||||
if (detailData.value.problemPath) {
|
if (detailData.value.problemPath) {
|
||||||
await getFileNameAndFilePath({ filePath: detailData.value.problemPath }).then(res => {
|
await getFileNameAndFilePath({ filePath: detailData.value.problemPath }).then(res => {
|
||||||
|
console.log(res.data)
|
||||||
detailData.value.keyName = res.data.name
|
detailData.value.keyName = res.data.name
|
||||||
detailData.value.problemPath = res.data.url
|
detailData.value.problemPath = res.data.url
|
||||||
detailData.value.problemName = res.data.fileName
|
detailData.value.problemName = res.data.fileName
|
||||||
|
|||||||
@@ -89,105 +89,140 @@ const handleExceed: UploadProps['onExceed'] = files => {
|
|||||||
/**
|
/**
|
||||||
* 提交用户表单数据
|
* 提交用户表单数据
|
||||||
*/
|
*/
|
||||||
|
// const submit = async () => {
|
||||||
|
// if (form.file) {
|
||||||
|
// formRef.value.validate(async (valid: any) => {
|
||||||
|
// if (valid) {
|
||||||
|
// let data = new FormData()
|
||||||
|
// data.append('file', form.file)
|
||||||
|
// console.log(title.value)
|
||||||
|
// if (title.value === '导入干扰源用户') {
|
||||||
|
// await importSensitiveReportData(data)
|
||||||
|
// .then(res => handleImportResponse(title.value, res))
|
||||||
|
// .finally(() => {
|
||||||
|
// tableStore.index()
|
||||||
|
// eventDataUploadVisible.value = false
|
||||||
|
// })
|
||||||
|
// } else {
|
||||||
|
// await importSensitiveUserData(data)
|
||||||
|
// .then(res => handleImportResponse(title.value, res))
|
||||||
|
// .finally(() => {
|
||||||
|
// tableStore.index()
|
||||||
|
// eventDataUploadVisible.value = false
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// // if (title.value == '导入干扰源用户') {
|
||||||
|
// // await importSensitiveReportData(data)
|
||||||
|
// // .then((res: any) => {
|
||||||
|
// // if (res.type === 'application/json') {
|
||||||
|
// // // 说明是普通对象数据,读取信息
|
||||||
|
// // const fileReader = new FileReader()
|
||||||
|
// // fileReader.onloadend = () => {
|
||||||
|
// // try {
|
||||||
|
// // const jsonData = JSON.parse(fileReader.result)
|
||||||
|
// // // 后台信息
|
||||||
|
// // if (jsonData.code === 'A0000') {
|
||||||
|
// // ElMessage.success('导入成功')
|
||||||
|
// // } else {
|
||||||
|
// // ElMessage.error('导入失败,请查看下载附件!')
|
||||||
|
// // }
|
||||||
|
// // } catch (err) {
|
||||||
|
// // console.log(err)
|
||||||
|
// // }
|
||||||
|
// // }
|
||||||
|
// // fileReader.readAsText(res)
|
||||||
|
// // } else {
|
||||||
|
// // ElMessage.error('导入失败,请查看下载附件!')
|
||||||
|
// // let blob = new Blob([res], {
|
||||||
|
// // type: 'application/vnd.ms-excel'
|
||||||
|
// // })
|
||||||
|
// // const url = window.URL.createObjectURL(blob)
|
||||||
|
// // const link = document.createElement('a')
|
||||||
|
// // link.href = url
|
||||||
|
// // link.download = '干扰源用户失败列表'
|
||||||
|
// // document.body.appendChild(link)
|
||||||
|
// // link.click()
|
||||||
|
// // link.remove()
|
||||||
|
// // }
|
||||||
|
// // })
|
||||||
|
// // .finally(() => {
|
||||||
|
// // tableStore.index()
|
||||||
|
// // eventDataUploadVisible.value = false
|
||||||
|
// // })
|
||||||
|
// // } else {
|
||||||
|
// // await importSensitiveUserData(data)
|
||||||
|
// // .then((res: any) => {
|
||||||
|
// // if (res.type === 'application/json') {
|
||||||
|
// // // 说明是普通对象数据,读取信息
|
||||||
|
// // const fileReader = new FileReader()
|
||||||
|
// // fileReader.onloadend = () => {
|
||||||
|
// // try {
|
||||||
|
// // const jsonData = JSON.parse(fileReader.result)
|
||||||
|
// // // 后台信息
|
||||||
|
// // if (jsonData.code === 'A0000') {
|
||||||
|
// // ElMessage.success('导入成功')
|
||||||
|
// // } else {
|
||||||
|
// // ElMessage.error('导入失败,请查看下载附件!')
|
||||||
|
// // }
|
||||||
|
// // } catch (err) {
|
||||||
|
// // console.log(err)
|
||||||
|
// // }
|
||||||
|
// // }
|
||||||
|
// // fileReader.readAsText(res)
|
||||||
|
// // } else {
|
||||||
|
// // ElMessage.error('导入失败,请查看下载附件!')
|
||||||
|
// // let blob = new Blob([res], {
|
||||||
|
// // type: 'application/vnd.ms-excel'
|
||||||
|
// // })
|
||||||
|
// // const url = window.URL.createObjectURL(blob)
|
||||||
|
// // const link = document.createElement('a')
|
||||||
|
// // link.href = url
|
||||||
|
// // link.download = '敏感及重要用户失败列表'
|
||||||
|
// // document.body.appendChild(link)
|
||||||
|
// // link.click()
|
||||||
|
// // link.remove()
|
||||||
|
// // }
|
||||||
|
// // })
|
||||||
|
// // .finally(() => {
|
||||||
|
// // tableStore.index()
|
||||||
|
// // eventDataUploadVisible.value = false
|
||||||
|
// // })
|
||||||
|
// // }
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// } else {
|
||||||
|
// ElMessage.error('请选择数据文件')
|
||||||
|
// }
|
||||||
|
// }
|
||||||
const submit = async () => {
|
const submit = async () => {
|
||||||
if (form.file) {
|
if (form.file) {
|
||||||
formRef.value.validate(async (valid: any) => {
|
formRef.value.validate(async (valid: any) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let data = new FormData()
|
let data = new FormData()
|
||||||
data.append('file', form.file)
|
data.append('file', form.file)
|
||||||
if (title.value === '导入干扰源用户') {
|
|
||||||
await importSensitiveReportData(data)
|
try {
|
||||||
.then(res => handleImportResponse(title.value, res))
|
if (title.value === '导入干扰源用户') {
|
||||||
.finally(() => {
|
await importSensitiveReportData(data)
|
||||||
tableStore.index()
|
.then(res => handleImportResponse(title.value, res))
|
||||||
eventDataUploadVisible.value = false
|
.catch(() => {
|
||||||
})
|
// 处理请求失败的情况
|
||||||
} else {
|
ElMessage.error('导入失败,请查看下载附件!')
|
||||||
await importSensitiveUserData(data)
|
})
|
||||||
.then(res => handleImportResponse(title.value, res))
|
} else {
|
||||||
.finally(() => {
|
await importSensitiveUserData(data)
|
||||||
tableStore.index()
|
.then(res => handleImportResponse(title.value, res))
|
||||||
eventDataUploadVisible.value = false
|
.catch(() => {
|
||||||
})
|
// 处理请求失败的情况
|
||||||
|
ElMessage.error('导入失败,请查看下载附件!')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
// 无论成功失败都重新启用按钮并关闭窗口
|
||||||
|
tableStore.index()
|
||||||
|
eventDataUploadVisible.value = false
|
||||||
}
|
}
|
||||||
// if (title.value == '导入干扰源用户') {
|
}
|
||||||
// await importSensitiveReportData(data)
|
|
||||||
// .then((res: any) => {
|
|
||||||
// if (res.type === 'application/json') {
|
|
||||||
// // 说明是普通对象数据,读取信息
|
|
||||||
// const fileReader = new FileReader()
|
|
||||||
// fileReader.onloadend = () => {
|
|
||||||
// try {
|
|
||||||
// const jsonData = JSON.parse(fileReader.result)
|
|
||||||
// // 后台信息
|
|
||||||
// if (jsonData.code === 'A0000') {
|
|
||||||
// ElMessage.success('导入成功')
|
|
||||||
// } else {
|
|
||||||
// ElMessage.error('导入失败,请查看下载附件!')
|
|
||||||
// }
|
|
||||||
// } catch (err) {
|
|
||||||
// console.log(err)
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// fileReader.readAsText(res)
|
|
||||||
// } else {
|
|
||||||
// ElMessage.error('导入失败,请查看下载附件!')
|
|
||||||
// let blob = new Blob([res], {
|
|
||||||
// type: 'application/vnd.ms-excel'
|
|
||||||
// })
|
|
||||||
// const url = window.URL.createObjectURL(blob)
|
|
||||||
// const link = document.createElement('a')
|
|
||||||
// link.href = url
|
|
||||||
// link.download = '干扰源用户失败列表'
|
|
||||||
// document.body.appendChild(link)
|
|
||||||
// link.click()
|
|
||||||
// link.remove()
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// .finally(() => {
|
|
||||||
// tableStore.index()
|
|
||||||
// eventDataUploadVisible.value = false
|
|
||||||
// })
|
|
||||||
// } else {
|
|
||||||
// await importSensitiveUserData(data)
|
|
||||||
// .then((res: any) => {
|
|
||||||
// if (res.type === 'application/json') {
|
|
||||||
// // 说明是普通对象数据,读取信息
|
|
||||||
// const fileReader = new FileReader()
|
|
||||||
// fileReader.onloadend = () => {
|
|
||||||
// try {
|
|
||||||
// const jsonData = JSON.parse(fileReader.result)
|
|
||||||
// // 后台信息
|
|
||||||
// if (jsonData.code === 'A0000') {
|
|
||||||
// ElMessage.success('导入成功')
|
|
||||||
// } else {
|
|
||||||
// ElMessage.error('导入失败,请查看下载附件!')
|
|
||||||
// }
|
|
||||||
// } catch (err) {
|
|
||||||
// console.log(err)
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// fileReader.readAsText(res)
|
|
||||||
// } else {
|
|
||||||
// ElMessage.error('导入失败,请查看下载附件!')
|
|
||||||
// let blob = new Blob([res], {
|
|
||||||
// type: 'application/vnd.ms-excel'
|
|
||||||
// })
|
|
||||||
// const url = window.URL.createObjectURL(blob)
|
|
||||||
// const link = document.createElement('a')
|
|
||||||
// link.href = url
|
|
||||||
// link.download = '敏感及重要用户失败列表'
|
|
||||||
// document.body.appendChild(link)
|
|
||||||
// link.click()
|
|
||||||
// link.remove()
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// .finally(() => {
|
|
||||||
// tableStore.index()
|
|
||||||
// eventDataUploadVisible.value = false
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
ElMessage.error('请选择数据文件')
|
ElMessage.error('请选择数据文件')
|
||||||
|
|||||||
@@ -367,11 +367,11 @@ const terminalModelList = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: '1',
|
id: '1',
|
||||||
name: '虚拟终端'
|
name: '实际终端'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: '2',
|
id: '2',
|
||||||
name: '虚拟终端'
|
name: '离线'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
//定义通讯状态下拉框数据
|
//定义通讯状态下拉框数据
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
></vxe-table-column>
|
></vxe-table-column>
|
||||||
<vxe-table-column field="lineName" title="监测点" align="center"></vxe-table-column>
|
<vxe-table-column field="lineName" title="监测点" align="center"></vxe-table-column>
|
||||||
<vxe-table-column field="voltageId" title="电压等级(kV)" align="center"></vxe-table-column>
|
<vxe-table-column field="voltageId" title="电压等级(kV)" align="center"></vxe-table-column>
|
||||||
<vxe-table-column field="featureAmplitude" title="暂降幅值(%)" align="center" width="140">
|
<vxe-table-column field="featureAmplitude" title="暂降(骤升)幅值(%)" align="center" width="140">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<span>{{ (row.featureAmplitude * 100).toFixed(2) }}</span>
|
<span>{{ (row.featureAmplitude * 100).toFixed(2) }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
<vxe-table-column field="subName" :show-overflow="true" title="变电站" align="center"></vxe-table-column>
|
<vxe-table-column field="subName" :show-overflow="true" title="变电站" align="center"></vxe-table-column>
|
||||||
<vxe-table-column field="lineName" title="监测点" align="center"></vxe-table-column>
|
<vxe-table-column field="lineName" title="监测点" align="center"></vxe-table-column>
|
||||||
<vxe-table-column field="voltageId" title="电压等级(kV)" align="center"></vxe-table-column>
|
<vxe-table-column field="voltageId" title="电压等级(kV)" align="center"></vxe-table-column>
|
||||||
<vxe-table-column field="featureAmplitude" title="暂降幅值(%)" align="center" width="140">
|
<vxe-table-column field="featureAmplitude" title="暂降(骤升)幅值(%)" align="center" width="140">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<span>{{ (row.featureAmplitude * 100).toFixed(2) }}</span>
|
<span>{{ (row.featureAmplitude * 100).toFixed(2) }}</span>
|
||||||
</template>
|
</template>
|
||||||
@@ -236,7 +236,7 @@ const exportEvent = () => {
|
|||||||
pageSize: tableStore.table.total
|
pageSize: tableStore.table.total
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
tableRef.value.getRef().exportData({
|
tableRef.value.getRef().exportData({
|
||||||
filename: '暂降聚合展示', // 文件名字
|
filename: '暂态聚合展示', // 文件名字
|
||||||
sheetName: 'Sheet1',
|
sheetName: 'Sheet1',
|
||||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||||
useStyle: true,
|
useStyle: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user