微调
This commit is contained in:
@@ -41,6 +41,7 @@ if (VITE_FLAG) {
|
||||
xls: currentRoute.value.href?.split('?')[1].split('.')[1] == 'xls' ? true : false
|
||||
})
|
||||
} else {
|
||||
console.log('🚀 ~ urlKey:', urlKey)
|
||||
setTimeout(async () => {
|
||||
const previewUrl = await previewFile(currentRoute.value?.href?.split('?')[1])
|
||||
url.value = previewUrl
|
||||
|
||||
@@ -232,6 +232,16 @@ const onResetForm = () => {
|
||||
//时间重置成默认值
|
||||
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) {
|
||||
tableStore.table.params.searchBeginTime = datePickerRef.value.timeValue[0]
|
||||
tableStore.table.params.searchEndTime = datePickerRef.value.timeValue[1]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<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-->
|
||||
<!-- v-if="!config.layout.menuCollapse"-->
|
||||
<!-- :style="{ color: config.getColorVal('menuActiveColor') }"-->
|
||||
@@ -28,7 +28,9 @@ import { Session } from '@/utils/storage'
|
||||
import { setNavTabsWidth } from '@/utils/layout'
|
||||
|
||||
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 () {
|
||||
if (config.layout.shrink && !config.layout.menuCollapse) {
|
||||
closeShade()
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/>
|
||||
</div>
|
||||
<span class="nav-bar-title">
|
||||
{{ getTheme.name }}
|
||||
{{ getTheme?.name || '' }}
|
||||
<span style="font-size: 14px">({{ Version || 'v1.0.0' }})</span>
|
||||
<!-- <span style="font-size: 14px;" v-if="Version?.versionName">
|
||||
({{ Version?.versionName }})
|
||||
@@ -28,7 +28,9 @@ import { getLastData } from '@/api/systerm'
|
||||
|
||||
const Version: any = ref(null)
|
||||
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 onMenuCollapse = () => {
|
||||
showShade('ba-aside-menu-shade', () => {
|
||||
@@ -43,7 +45,7 @@ onMounted(() => {
|
||||
})
|
||||
}
|
||||
|
||||
document.title = getTheme.name
|
||||
document.title = getTheme?.name || ''
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { downloadFile } from '@/api/system-boot/file'
|
||||
// 下载文件
|
||||
export const download = (urls: string) => {
|
||||
console.log('下载', urls)
|
||||
//console.log('下载', urls)
|
||||
|
||||
downloadFile({ filePath: urls })
|
||||
.then((res: any) => {
|
||||
@@ -53,7 +53,7 @@ function removeLastDotSuffix(str: string) {
|
||||
|
||||
// 预览文件
|
||||
export const previewFile = async (urls: any) => {
|
||||
console.log('预览', urls)
|
||||
//console.log('预览', urls)
|
||||
let url = ''
|
||||
|
||||
await downloadFile({ filePath: decodeURI(urls) })
|
||||
@@ -85,6 +85,6 @@ export const previewFile = async (urls: any) => {
|
||||
console.error('下载失败:', err)
|
||||
// 可添加错误提示(如Toast)
|
||||
})
|
||||
console.log('url', url)
|
||||
//console.log('url', url)
|
||||
return url
|
||||
}
|
||||
|
||||
@@ -133,6 +133,7 @@ const list: any = ref({
|
||||
alarmThreshold: ''
|
||||
})
|
||||
const level: any = ref(dictData.state.area[0]?.level)
|
||||
console.log('level', level)
|
||||
const flag: any = ref('')
|
||||
const tableStore = new TableStore({
|
||||
url: '/supervision-boot/onlineMonitor/list',
|
||||
@@ -364,7 +365,7 @@ tableStore.table.params.dataType = '1'
|
||||
tableStore.table.params.deptId = dictData.state.area[0].id
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
TableHeaderRef.value.setDatePicker([{ label: '月', value: 3 }])
|
||||
TableHeaderRef.value.setDatePicker([{ label: '月份', value: 3 }])
|
||||
|
||||
tableStore.index()
|
||||
setTimeout(() => {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<el-tab-pane :label="VITE_FLAG ? '现场测试' : '计划实施问题'" name="3" v-if="tabList.includes('3')">
|
||||
<testQuestions v-if="activeName == '3'" />
|
||||
</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'" />
|
||||
</el-tab-pane>
|
||||
<!-- <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 { deleteWarningLeaflet } from '@/api/supervision-boot/delete/index'
|
||||
import detail from '@/views/pqs/supervise/harmonicSurvey/test/detail.vue'
|
||||
import {download} from '@/utils/fileDownLoad'
|
||||
const dictData = useDictData()
|
||||
|
||||
const statusSelect = [
|
||||
@@ -237,8 +238,6 @@ const tableStore = new TableStore({
|
||||
return !(row.problemType == 2 || row.problemType == 4)
|
||||
}
|
||||
return true;
|
||||
|
||||
|
||||
},
|
||||
click: row => {
|
||||
if (row.problemType == 2) {
|
||||
@@ -271,7 +270,9 @@ const tableStore = new TableStore({
|
||||
},
|
||||
click: row => {
|
||||
if (row.problemType == 2) {
|
||||
window.open(row.filePath)
|
||||
|
||||
//window.open(row.filePath)
|
||||
download('/' + row.absFilePath)
|
||||
} else {
|
||||
if (row.problemPath == null) {
|
||||
ElMessage({
|
||||
@@ -280,6 +281,7 @@ const tableStore = new TableStore({
|
||||
})
|
||||
} else {
|
||||
getFileNameAndFilePath({ filePath: '/' + row.problemPath }).then(res => {
|
||||
|
||||
window.open(res.data.url)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -32,6 +32,10 @@ import { cancelFeedback, getById } from '@/api/supervision-boot/leaflet'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
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 adminInfo = useAdminInfo()
|
||||
@@ -169,7 +173,15 @@ const tableStore = new TableStore({
|
||||
return row.problemType != 2
|
||||
},
|
||||
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 = ''
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
|
||||
@@ -92,8 +92,10 @@ const getInfo = async () => {
|
||||
|
||||
const getFileData = async () => {
|
||||
//如果有问题附件
|
||||
console.log('000',detailData.value)
|
||||
if (detailData.value.problemPath) {
|
||||
await getFileNameAndFilePath({ filePath: detailData.value.problemPath }).then(res => {
|
||||
console.log(res.data)
|
||||
detailData.value.keyName = res.data.name
|
||||
detailData.value.problemPath = res.data.url
|
||||
detailData.value.problemName = res.data.fileName
|
||||
|
||||
@@ -89,104 +89,139 @@ 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 () => {
|
||||
if (form.file) {
|
||||
formRef.value.validate(async (valid: any) => {
|
||||
if (valid) {
|
||||
let data = new FormData()
|
||||
data.append('file', form.file)
|
||||
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
|
||||
})
|
||||
|
||||
try {
|
||||
if (title.value === '导入干扰源用户') {
|
||||
await importSensitiveReportData(data)
|
||||
.then(res => handleImportResponse(title.value, res))
|
||||
.catch(() => {
|
||||
// 处理请求失败的情况
|
||||
ElMessage.error('导入失败,请查看下载附件!')
|
||||
})
|
||||
} else {
|
||||
await importSensitiveUserData(data)
|
||||
.then(res => handleImportResponse(title.value, res))
|
||||
.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 {
|
||||
|
||||
@@ -367,11 +367,11 @@ const terminalModelList = [
|
||||
},
|
||||
{
|
||||
id: '1',
|
||||
name: '虚拟终端'
|
||||
name: '实际终端'
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
name: '虚拟终端'
|
||||
name: '离线'
|
||||
}
|
||||
]
|
||||
//定义通讯状态下拉框数据
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
></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="featureAmplitude" title="暂降幅值(%)" align="center" width="140">
|
||||
<vxe-table-column field="featureAmplitude" title="暂降(骤升)幅值(%)" align="center" width="140">
|
||||
<template #default="{ row }">
|
||||
<span>{{ (row.featureAmplitude * 100).toFixed(2) }}</span>
|
||||
</template>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<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="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 }">
|
||||
<span>{{ (row.featureAmplitude * 100).toFixed(2) }}</span>
|
||||
</template>
|
||||
@@ -236,7 +236,7 @@ const exportEvent = () => {
|
||||
pageSize: tableStore.table.total
|
||||
}).then(res => {
|
||||
tableRef.value.getRef().exportData({
|
||||
filename: '暂降聚合展示', // 文件名字
|
||||
filename: '暂态聚合展示', // 文件名字
|
||||
sheetName: 'Sheet1',
|
||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||
useStyle: true,
|
||||
|
||||
Reference in New Issue
Block a user