Compare commits
7 Commits
06764c073a
...
2025-12
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fd09e24cf0 | ||
|
|
2a11891988 | ||
|
|
e7d90c3a73 | ||
|
|
72b1f39814 | ||
|
|
38028b5cb0 | ||
|
|
409999b37b | ||
|
|
0fc7b528d4 |
@@ -7,8 +7,20 @@ const SYSTEM_PREFIX = '/system-boot'
|
|||||||
* @param file
|
* @param file
|
||||||
*/
|
*/
|
||||||
export const uploadFile = (file: any, path: string) => {
|
export const uploadFile = (file: any, path: string) => {
|
||||||
|
const regex = /\[|\]/g
|
||||||
|
// 替换规则:[ 换成 (,] 换成 )
|
||||||
|
|
||||||
|
const newFile = new File(
|
||||||
|
[file], // 原文件的二进制内容
|
||||||
|
file.name.replace(regex, match => (match === '[' ? '(' : ')')), // 新的文件名
|
||||||
|
{
|
||||||
|
type: file.type, // 复用原文件的MIME类型
|
||||||
|
lastModified: file.lastModified // 复用最后修改时间
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
let form = new FormData()
|
let form = new FormData()
|
||||||
form.append('file', file)
|
form.append('file', newFile)
|
||||||
form.append('path', path)
|
form.append('path', path)
|
||||||
return createAxios({
|
return createAxios({
|
||||||
url: SYSTEM_PREFIX + '/file/upload',
|
url: SYSTEM_PREFIX + '/file/upload',
|
||||||
|
|||||||
@@ -35,20 +35,22 @@ const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
|
|||||||
const url = ref('')
|
const url = ref('')
|
||||||
const excelOptions = ref({})
|
const excelOptions = ref({})
|
||||||
const urlKey = currentRoute.value?.href?.split('?')[1]
|
const urlKey = currentRoute.value?.href?.split('?')[1]
|
||||||
// if (VITE_FLAG) {
|
|
||||||
// url.value = '/api-docx/excelreport' + currentRoute.value?.href?.split('?')[1]
|
if (VITE_FLAG) {
|
||||||
// excelOptions.value = ref({
|
url.value = '/api-docx/excelreport' + currentRoute.value?.href?.split('?')[1]
|
||||||
// xls: currentRoute.value.href?.split('?')[1].split('.')[1] == 'xls' ? true : false
|
excelOptions.value = ref({
|
||||||
// })
|
xls: currentRoute.value.href?.split('?')[1].split('.')[1] == 'xls' ? true : false
|
||||||
// } else {
|
})
|
||||||
|
} else {
|
||||||
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
|
||||||
excelOptions.value = ref({
|
excelOptions.value = ref({
|
||||||
xls: currentRoute.value.href?.split('?')[1].split('.')[1] == 'xls' ? true : false
|
xls: currentRoute.value.href?.split('?')[1].split('.')[1] == 'xls' ? true : false
|
||||||
})
|
})
|
||||||
}, 0)
|
}, 0)
|
||||||
// }
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 从路由参数获取文件路径
|
// 从路由参数获取文件路径
|
||||||
|
|||||||
@@ -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) => {
|
||||||
@@ -53,11 +53,12 @@ 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 = ''
|
||||||
|
//console.log('urls', decodeURI(urls))
|
||||||
await downloadFile({ filePath: decodeURI(urls) })
|
await downloadFile({ filePath: decodeURI(urls) })
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
|
|
||||||
// 1. 确定文件MIME类型(优化:用更简洁的方式)
|
// 1. 确定文件MIME类型(优化:用更简洁的方式)
|
||||||
const getFileType = (url: string) => {
|
const getFileType = (url: string) => {
|
||||||
const ext = url.split('.').pop()?.toLowerCase() || ''
|
const ext = url.split('.').pop()?.toLowerCase() || ''
|
||||||
@@ -85,6 +86,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
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -231,14 +231,14 @@ const init = () => {
|
|||||||
},
|
},
|
||||||
backgroundColor: 'rgba(0,0,0,0.55)',
|
backgroundColor: 'rgba(0,0,0,0.55)',
|
||||||
formatter: function (params: any) {
|
formatter: function (params: any) {
|
||||||
//console.log(params)
|
console.log(params)
|
||||||
let msg = ''
|
let msg = ''
|
||||||
msg += params[0].name + '<br/>'
|
msg += params[0].name
|
||||||
for (let i in params) {
|
for (let i in params) {
|
||||||
if (params[i].data == 3.14159) {
|
if (params[i].data == 3.14159) {
|
||||||
msg +=params[i].marker + ': 暂无数据<br/>'
|
msg += '(' + params[i].seriesName + ')' + '<br/>' + params[i].marker + ': 暂无数据<br/>'
|
||||||
} else {
|
} else {
|
||||||
msg += params[i].marker + ': ' + params[i].data + '<br/>'
|
msg += '(' + params[i].seriesName + ')' + '<br/>' + params[i].marker + ': ' + params[i].data + '<br/>'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return msg
|
return msg
|
||||||
|
|||||||
@@ -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 = [
|
||||||
@@ -233,18 +234,18 @@ const tableStore = new TableStore({
|
|||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
if (VITE_FLAG) {
|
// if (VITE_FLAG) {
|
||||||
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) {
|
|
||||||
const match = row.filePath.match(/excelreport(\/[^?#]*)/)
|
|
||||||
|
|
||||||
window.open(window.location.origin + '/#/previewFile?' + match[1])
|
if (row.problemType == 2) {
|
||||||
|
// const match = row.filePath.match(/excelreport(\/[^?#]*)/)
|
||||||
|
|
||||||
|
// window.open(window.location.origin + '/#/previewFile?' + match[1])
|
||||||
|
window.open(window.location.origin + '/#/previewFile?/' + row.absFilePath)
|
||||||
} else {
|
} else {
|
||||||
if (row.problemPath == null) {
|
if (row.problemPath == null) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
@@ -252,7 +253,8 @@ const tableStore = new TableStore({
|
|||||||
type: 'warning'
|
type: 'warning'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
window.open(window.location.origin + '/#/previewFile?/' + row.problemPath)
|
//window.open(window.location.origin + '/#/previewFile?/' + row.problemPath)
|
||||||
|
window.open(window.location.origin + '/#/previewFile?/' + row.absFilePath)
|
||||||
// getFileNameAndFilePath({ filePath: '/' + row.problemPath }).then(res => {
|
// getFileNameAndFilePath({ filePath: '/' + row.problemPath }).then(res => {
|
||||||
// // window.open(res.data.url)
|
// // window.open(res.data.url)
|
||||||
// })
|
// })
|
||||||
@@ -271,7 +273,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({
|
||||||
@@ -279,9 +283,11 @@ const tableStore = new TableStore({
|
|||||||
type: 'warning'
|
type: 'warning'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
getFileNameAndFilePath({ filePath: '/' + row.problemPath }).then(res => {
|
// getFileNameAndFilePath({ filePath: '/' + row.problemPath }).then(res => {
|
||||||
window.open(res.data.url)
|
|
||||||
})
|
// window.open(res.data.url)
|
||||||
|
// })
|
||||||
|
download('/' + row.absFilePath)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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()
|
||||||
@@ -147,16 +151,17 @@ const tableStore = new TableStore({
|
|||||||
icon: 'el-icon-EditPen',
|
icon: 'el-icon-EditPen',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
if (VITE_FLAG) {
|
// if (VITE_FLAG) {
|
||||||
return row.problemType != 2;
|
return row.problemType != 2;
|
||||||
}
|
// }
|
||||||
return true;
|
// return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
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])
|
||||||
|
window.open(window.location.origin + '/#/previewFile?/' + row.absFilePath)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -169,7 +174,16 @@ 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 +329,11 @@ const tableStore = new TableStore({
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
tableStore.table.params.status = ''
|
tableStore.table.params.status = ''
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
<el-descriptions-item :span="2" label="采取措施">
|
<el-descriptions-item :span="2" label="采取措施">
|
||||||
{{ detailData.takeStep }}
|
{{ detailData.takeStep }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item :span="2" label="处理成效报告">
|
<el-descriptions-item :span="2" label="反馈报告">
|
||||||
<el-icon class="elView" v-if="detailData?.reportName ">
|
<el-icon class="elView" v-if="detailData?.reportName ">
|
||||||
<View @click="openFile(detailData?.reportName)" />
|
<View @click="openFile(detailData?.reportName)" />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
@@ -51,6 +51,7 @@ import { Link, View } from '@element-plus/icons-vue'
|
|||||||
|
|
||||||
defineOptions({ name: 'technology/detail' })
|
defineOptions({ name: 'technology/detail' })
|
||||||
const openFile = (name: any) => {
|
const openFile = (name: any) => {
|
||||||
|
|
||||||
window.open(window.location.origin + '/#/previewFile?/supervision/' + name)
|
window.open(window.location.origin + '/#/previewFile?/supervision/' + name)
|
||||||
}
|
}
|
||||||
const { query } = useRoute() // 查询参数
|
const { query } = useRoute() // 查询参数
|
||||||
@@ -92,8 +93,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
|
||||||
|
|||||||
@@ -11,7 +11,8 @@
|
|||||||
:autosize="{ minRows: 2, maxRows: 6 }" readonly />
|
:autosize="{ minRows: 2, maxRows: 6 }" readonly />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="技术监督报告:" v-if="showFile1">
|
<!-- <el-form-item label="技术监督报告:" v-if="showFile1"> -->
|
||||||
|
<el-form-item label="技术监督报告:" v-if="false">
|
||||||
<el-icon class="elView" v-if="supervisionReportDetail?.supervisionReportName ">
|
<el-icon class="elView" v-if="supervisionReportDetail?.supervisionReportName ">
|
||||||
<View @click="openFile(supervisionReportDetail?.supervisionReportName)" />
|
<View @click="openFile(supervisionReportDetail?.supervisionReportName)" />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
@@ -104,7 +105,7 @@ const reportFilePath: any = ref('')
|
|||||||
//form表单校验规则
|
//form表单校验规则
|
||||||
const rules = {
|
const rules = {
|
||||||
takeStep: [{ required: true, message: '请输入采取的措施', trigger: 'blur' }],
|
takeStep: [{ required: true, message: '请输入采取的措施', trigger: 'blur' }],
|
||||||
reportPath: [{ required: true, message: '请上传处理成效报告', trigger: 'blur' }]
|
reportPath: [{ required: true, message: '请上传反馈报告', trigger: 'blur' }]
|
||||||
}
|
}
|
||||||
const resetForm = () => {
|
const resetForm = () => {
|
||||||
if (formRef.value) {
|
if (formRef.value) {
|
||||||
|
|||||||
@@ -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 () => {
|
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 {
|
||||||
|
|||||||
@@ -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