This commit is contained in:
sjl
2025-12-19 10:56:30 +08:00
parent 909f43e257
commit d64d18f330
10 changed files with 85 additions and 81 deletions

View File

@@ -1,13 +1,11 @@
<template> <template>
<div style="overflow: auto; height: 100vh" v-if="flag"> <div style="overflow: auto; height: 100vh">
<vue-office-docx v-if="urlName.includes('.doc') || urlName.includes('.docx')" :src="url" /> <vue-office-docx v-if="url.includes('.doc') || url.includes('.docx')" :src="url" />
<vue-office-excel v-if="urlName.includes('.xls') || urlName.includes('.xlsx')" :src="url" :options="excelOptions" /> <vue-office-excel v-if="url.includes('.xls') || url.includes('.xlsx')" :src="url" :options="excelOptions" />
<!-- <vue-office-pdf v-if="urlName.includes('.pdf')" :src="url" /> --> <!-- <vue-office-pdf v-if="url.includes('.pdf')" :src="url" /> -->
<iframe v-if="urlName.includes('.pdf')" :src="url" style="width: 100%; height: 99%"></iframe> <iframe v-if="url.includes('.pdf')" :src="url" style="width: 100%; height: 99%"></iframe>
<img <img v-if="url.includes('.png') || url.includes('.jpg') || url.includes('.gif') || url.includes('.bmp')"
v-if="urlName.includes('.png') || urlName.includes('.jpg') || urlName.includes('.gif') || urlName.includes('.bmp')" :src="url" />
:src="url"
/>
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
@@ -26,50 +24,17 @@ const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
// const url = 'http://192.168.1.22:9009/excelreport' + currentRoute.value.href?.split('?')[1] // const url = 'http://192.168.1.22:9009/excelreport' + currentRoute.value.href?.split('?')[1]
const url = ref('') const url = ref('')
const excelOptions = ref({}) const excelOptions = ref({})
const urlName = ref('') if(VITE_FLAG){
const flag = ref(false) url.value = '/api-docx/excelreport' + currentRoute.value?.href?.split('?')[1]
const init = () => { excelOptions.value = ref({
flag.value = false xls: currentRoute.value.href?.split('?')[1].split('.')[1] == 'xls' ? true : false
let urls = currentRoute.value?.href?.split('?')[1]
urlName.value = urls
downloadFile({ filePath: urls }).then((res: any) => {
let blob = new Blob([res], {
type: urls.includes('.pdf')
? 'application/pdf'
: urls.includes('.zip')
? 'application/zip'
: urls.includes('.doc')
? 'application/msword'
: urls.includes('.docx')
? 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
: urls.includes('.xls')
? 'application/vnd.ms-excel'
: urls.includes('.xlsx')
? 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
: urls.includes('.png')
? 'image/png'
: urls.includes('.jpeg')
? 'image/jpeg'
: urls.includes('.jpg')
? 'image/jpg'
: ''
}) })
url.value = window.URL.createObjectURL(blob) }else{
flag.value = true //下载
})
}
// if(VITE_FLAG){
// url.value = '/api-docx/excelreport' + currentRoute.value?.href?.split('?')[1]
// excelOptions.value = ref({
// xls: currentRoute.value.href?.split('?')[1].split('.')[1] == 'xls' ? true : false
// })
// }else{
// //下载
// } }
onMounted(() => { onMounted(() => {
init()
console.log() console.log()
}) })
</script> </script>

View File

@@ -68,6 +68,7 @@ const open = (row: any) => {
dialogVisible.value = true dialogVisible.value = true
list.value = JSON.parse(JSON.stringify(row.row)) list.value = JSON.parse(JSON.stringify(row.row))
getFileNameAndFilePath({ filePath: row.row.reportPath }).then(res => { getFileNameAndFilePath({ filePath: row.row.reportPath }).then(res => {
list.value.keyName = res.data.name
list.value.reportPath = res.data.url list.value.reportPath = res.data.url
list.value.reportName = res.data.fileName list.value.reportName = res.data.fileName
}) })

View File

@@ -130,6 +130,7 @@ const submit = () => {
const open = (row: any) => { const open = (row: any) => {
dialogVisible.value = true dialogVisible.value = true
resetForm()
List.value = row.row List.value = row.row
title.value = row.text title.value = row.text

View File

@@ -47,7 +47,7 @@
></el-input> ></el-input>
</el-form-item> --> </el-form-item> -->
<el-form-item for="-" label="监测点:" prop="monitorNumber"> <el-form-item for="-" label="监测点:" prop="monitorNumber">
<el-select v-model="form.monitorNumber" clearable style="width: 100%" placeholder="请选择监测点"> <el-select v-model="form.monitorNumber" clearable filterable style="width: 100%" placeholder="请选择监测点">
<el-option v-for="item in minitorList" :key="item.id" :label="item.name" <el-option v-for="item in minitorList" :key="item.id" :label="item.name"
:value="item.id"></el-option> :value="item.id"></el-option>
</el-select> </el-select>

View File

@@ -300,6 +300,7 @@ const tableStore = new TableStore({
list.value.lineType = tableStore.table.params.lineType list.value.lineType = tableStore.table.params.lineType
list.value.alarmThreshold = tableStore.table.params.alarmThreshold list.value.alarmThreshold = tableStore.table.params.alarmThreshold
flag.value = level.value flag.value = level.value
console.log('flag',flag.value)
flagTime.value = tableStore.table.params.dataType == 0 ? true : false flagTime.value = tableStore.table.params.dataType == 0 ? true : false
}, },
loadCallback: () => { loadCallback: () => {

View File

@@ -234,7 +234,7 @@
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="可研报告"> <el-descriptions-item label="可研报告">
<span v-if="detailData.userType == 0 || detailData.userType == 1"> <span v-if="detailData.userType == 0 || detailData.userType == 1">
<el-icon class="elView" v-if="proviteData?.feasibilityReport?.name"> <el-icon class="elView" v-if="proviteData?.feasibilityReport?.name && VITE_FLAG">
<View @click="openFile(proviteData?.feasibilityReport?.name)" /> <View @click="openFile(proviteData?.feasibilityReport?.name)" />
</el-icon> </el-icon>
<a target="_blank" class="aLoad" @click="download(proviteData.feasibilityReport.keyName)" rel="nofollow"> <a target="_blank" class="aLoad" @click="download(proviteData.feasibilityReport.keyName)" rel="nofollow">
@@ -249,7 +249,7 @@
detailData.userType == 5 detailData.userType == 5
" "
> >
<el-icon class="elView" v-if="proviteData?.feasibilityReport?.name"> <el-icon class="elView" v-if="proviteData?.feasibilityReport?.name && VITE_FLAG">
<View @click="openFile(proviteData?.feasibilityReport?.name)" /> <View @click="openFile(proviteData?.feasibilityReport?.name)" />
</el-icon> </el-icon>
<a target="_blank" class="aLoad" @click="download(proviteData.feasibilityReport.keyName)"> <a target="_blank" class="aLoad" @click="download(proviteData.feasibilityReport.keyName)">
@@ -257,7 +257,7 @@
</a> </a>
</span> </span>
<span v-if="detailData.userType == 6"> <span v-if="detailData.userType == 6">
<el-icon class="elView" v-if="proviteData?.feasibilityReport?.name"> <el-icon class="elView" v-if="proviteData?.feasibilityReport?.name && VITE_FLAG">
<View @click="openFile(proviteData?.feasibilityReport?.name)" /> <View @click="openFile(proviteData?.feasibilityReport?.name)" />
</el-icon> </el-icon>
<a target="_blank" class="aLoad" @click="download(proviteData.feasibilityReport.keyName)"> <a target="_blank" class="aLoad" @click="download(proviteData.feasibilityReport.keyName)">
@@ -266,7 +266,7 @@
</span> </span>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="项目初步设计说明书"> <el-descriptions-item label="项目初步设计说明书">
<el-icon class="elView" v-if="proviteData?.preliminaryDesignDescription?.name"> <el-icon class="elView" v-if="proviteData?.preliminaryDesignDescription?.name && VITE_FLAG">
<View @click="openFile(proviteData?.preliminaryDesignDescription?.name)" /> <View @click="openFile(proviteData?.preliminaryDesignDescription?.name)" />
</el-icon> </el-icon>
@@ -275,7 +275,7 @@
</a> </a>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="预测评估报告"> <el-descriptions-item label="预测评估报告">
<el-icon class="elView" v-if="proviteData?.predictionEvaluationReport?.name"> <el-icon class="elView" v-if="proviteData?.predictionEvaluationReport?.name && VITE_FLAG">
<View @click="openFile(proviteData?.predictionEvaluationReport?.name)" /> <View @click="openFile(proviteData?.predictionEvaluationReport?.name)" />
</el-icon> </el-icon>
<a target="_blank" class="aLoad" @click="download(proviteData.predictionEvaluationReport.keyName)"> <a target="_blank" class="aLoad" @click="download(proviteData.predictionEvaluationReport.keyName)">
@@ -283,7 +283,7 @@
</a> </a>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="预测评估评审意见报告"> <el-descriptions-item label="预测评估评审意见报告">
<el-icon class="elView" v-if="proviteData?.predictionEvaluationReviewOpinions?.name"> <el-icon class="elView" v-if="proviteData?.predictionEvaluationReviewOpinions?.name && VITE_FLAG">
<View @click="openFile(proviteData?.predictionEvaluationReviewOpinions?.name)" /> <View @click="openFile(proviteData?.predictionEvaluationReviewOpinions?.name)" />
</el-icon> </el-icon>
<a target="_blank" class="aLoad" @click="download(proviteData.predictionEvaluationReviewOpinions.keyName)"> <a target="_blank" class="aLoad" @click="download(proviteData.predictionEvaluationReviewOpinions.keyName)">
@@ -294,14 +294,14 @@
label="用户接入变电站主接线示意图" label="用户接入变电站主接线示意图"
v-if="detailData.userType != 0 && detailData.userType != 1" v-if="detailData.userType != 0 && detailData.userType != 1"
> >
<el-icon class="elView" v-if="proviteData?.substationMainWiringDiagram?.name"> <el-icon class="elView" v-if="proviteData?.substationMainWiringDiagram?.name && VITE_FLAG">
<View @click="openFile(proviteData?.substationMainWiringDiagram?.name)" /> <View @click="openFile(proviteData?.substationMainWiringDiagram?.name)" />
</el-icon> </el-icon>
<a target="_blank" class="aLoad" @click="download(proviteData.substationMainWiringDiagram.keyName)"> <a target="_blank" class="aLoad" @click="download(proviteData.substationMainWiringDiagram.keyName)">
{{ proviteData?.substationMainWiringDiagram?.name }} {{ proviteData?.substationMainWiringDiagram?.name }}
</a> </a>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="主要敏感终端清单" v-if="detailData.userType == 6"> <el-descriptions-item label="主要敏感终端清单" v-if="detailData.userType == 6 && VITE_FLAG">
<el-icon class="elView" v-if="proviteData?.sensitiveDevices?.name"> <el-icon class="elView" v-if="proviteData?.sensitiveDevices?.name">
<View @click="openFile(proviteData?.sensitiveDevices?.name)" /> <View @click="openFile(proviteData?.sensitiveDevices?.name)" />
</el-icon> </el-icon>
@@ -310,7 +310,7 @@
</a> </a>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="抗扰度测试报告" v-if="detailData.userType == 6"> <el-descriptions-item label="抗扰度测试报告" v-if="detailData.userType == 6">
<el-icon class="elView" v-if="proviteData?.antiInterferenceReport?.name"> <el-icon class="elView" v-if="proviteData?.antiInterferenceReport?.name && VITE_FLAG">
<View @click="openFile(proviteData?.antiInterferenceReport?.name)" /> <View @click="openFile(proviteData?.antiInterferenceReport?.name)" />
</el-icon> </el-icon>
<a target="_blank" class="aLoad" @click="download(proviteData.antiInterferenceReport.keyName)"> <a target="_blank" class="aLoad" @click="download(proviteData.antiInterferenceReport.keyName)">
@@ -318,7 +318,7 @@
</a> </a>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="背景电能质量测试报告" v-if="detailData.userType == 6"> <el-descriptions-item label="背景电能质量测试报告" v-if="detailData.userType == 6">
<el-icon class="elView" v-if="proviteData?.powerQualityReport?.name"> <el-icon class="elView" v-if="proviteData?.powerQualityReport?.name && VITE_FLAG">
<View @click="openFile(proviteData?.powerQualityReport?.name)" /> <View @click="openFile(proviteData?.powerQualityReport?.name)" />
</el-icon> </el-icon>
<a target="_blank" class="aLoad" @click="download(proviteData.powerQualityReport.keyName)"> <a target="_blank" class="aLoad" @click="download(proviteData.powerQualityReport.keyName)">
@@ -329,7 +329,7 @@
label="其他附件" label="其他附件"
v-if="proviteData?.additionalAttachments && proviteData?.additionalAttachments?.url" v-if="proviteData?.additionalAttachments && proviteData?.additionalAttachments?.url"
> >
<el-icon class="elView" v-if="proviteData?.additionalAttachments?.name"> <el-icon class="elView" v-if="proviteData?.additionalAttachments?.name && VITE_FLAG">
<View @click="openFile(proviteData?.additionalAttachments?.name)" /> <View @click="openFile(proviteData?.additionalAttachments?.name)" />
</el-icon> </el-icon>
<a target="_blank" class="aLoad" @click="download(proviteData.additionalAttachments.keyName)" > <a target="_blank" class="aLoad" @click="download(proviteData.additionalAttachments.keyName)" >
@@ -339,7 +339,7 @@
<el-descriptions-item label="系统接入方案"> <el-descriptions-item label="系统接入方案">
<div v-for="item in netInReportList"> <div v-for="item in netInReportList">
<el-icon class="elView" v-if="item.name"> <el-icon class="elView" v-if="item.name && VITE_FLAG">
<View @click="openFile(item.name)" /> <View @click="openFile(item.name)" />
</el-icon> </el-icon>
<a target="_blank" class="aLoad" @click="download(item.keyName)"> <a target="_blank" class="aLoad" @click="download(item.keyName)">
@@ -349,7 +349,7 @@
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="治理验收报告"> <el-descriptions-item label="治理验收报告">
<div v-for="item in governReportList"> <div v-for="item in governReportList">
<el-icon class="elView" v-if="item.name"> <el-icon class="elView" v-if="item.name && VITE_FLAG">
<View @click="openFile(item.name)" /> <View @click="openFile(item.name)" />
</el-icon> </el-icon>
<a target="_blank" class="aLoad" @click="download(item.keyName)" > <a target="_blank" class="aLoad" @click="download(item.keyName)" >
@@ -358,7 +358,7 @@
</div> </div>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="信息安全检测报告" v-if="props.openType == 'sourcesOfInterference'"> <el-descriptions-item label="信息安全检测报告" v-if="props.openType == 'sourcesOfInterference'">
<el-icon class="elView" v-if="form.informationSecurityTestReport[0]?.name"> <el-icon class="elView" v-if="form.informationSecurityTestReport[0]?.name && VITE_FLAG">
<View @click="openFile(form.informationSecurityTestReport[0]?.name)" /> <View @click="openFile(form.informationSecurityTestReport[0]?.name)" />
</el-icon> </el-icon>
<a target="_blank" class="aLoad" @click="download(proviteData.predictionEvaluationReviewOpinions.keyName)" > <a target="_blank" class="aLoad" @click="download(proviteData.predictionEvaluationReviewOpinions.keyName)" >
@@ -367,7 +367,7 @@
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="入网设计方案审查报告" v-if="props.openType == 'sourcesOfInterference'"> <el-descriptions-item label="入网设计方案审查报告" v-if="props.openType == 'sourcesOfInterference'">
<div v-for="item in form.NetReport"> <div v-for="item in form.NetReport">
<el-icon class="elView" v-if="item.name"> <el-icon class="elView" v-if="item.name && VITE_FLAG">
<View @click="openFile(item.name)" /> <View @click="openFile(item.name)" />
</el-icon> </el-icon>
<a target="_blank" class="aLoad" @click="download(item.keyName)" > <a target="_blank" class="aLoad" @click="download(item.keyName)" >
@@ -377,7 +377,7 @@
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="治理工程验收报告" v-if="props.openType == 'sourcesOfInterference'"> <el-descriptions-item label="治理工程验收报告" v-if="props.openType == 'sourcesOfInterference'">
<div v-for="item in form.governReport"> <div v-for="item in form.governReport">
<el-icon class="elView" v-if="item.name"> <el-icon class="elView" v-if="item.name && VITE_FLAG">
<View @click="openFile(item.name)" /> <View @click="openFile(item.name)" />
</el-icon> </el-icon>
<a target="_blank" class="aLoad" @click="download(item.keyName)"> <a target="_blank" class="aLoad" @click="download(item.keyName)">
@@ -387,7 +387,7 @@
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="验收检验报告单" v-if="props.openType == 'sourcesOfInterference'"> <el-descriptions-item label="验收检验报告单" v-if="props.openType == 'sourcesOfInterference'">
<el-icon class="elView" v-if="form.acceptanceInspectionReportSingle[0]?.name"> <el-icon class="elView" v-if="form.acceptanceInspectionReportSingle[0]?.name && VITE_FLAG">
<View @click="openFile(form.acceptanceInspectionReportSingle[0]?.name)" /> <View @click="openFile(form.acceptanceInspectionReportSingle[0]?.name)" />
</el-icon> </el-icon>
<a target="_blank" class="aLoad" @click="download(form.acceptanceInspectionReportSingle[0]?.keyName)"> <a target="_blank" class="aLoad" @click="download(form.acceptanceInspectionReportSingle[0]?.keyName)">
@@ -396,7 +396,7 @@
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="验收检验报告" v-if="props.openType == 'sourcesOfInterference'"> <el-descriptions-item label="验收检验报告" v-if="props.openType == 'sourcesOfInterference'">
<el-icon class="elView" v-if="form.acceptanceInspectionReport[0]?.name"> <el-icon class="elView" v-if="form.acceptanceInspectionReport[0]?.name && VITE_FLAG">
<View @click="openFile(form.acceptanceInspectionReport[0]?.name)" /> <View @click="openFile(form.acceptanceInspectionReport[0]?.name)" />
</el-icon> </el-icon>
<a target="_blank" class="aLoad" @click="download(form.acceptanceInspectionReport[0]?.keyName )"> <a target="_blank" class="aLoad" @click="download(form.acceptanceInspectionReport[0]?.keyName )">
@@ -404,7 +404,7 @@
</a> </a>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="型式实验报告" v-if="props.openType == 'sourcesOfInterference'"> <el-descriptions-item label="型式实验报告" v-if="props.openType == 'sourcesOfInterference'">
<el-icon class="elView" v-if="form.typeExperimentReport[0]?.name"> <el-icon class="elView" v-if="form.typeExperimentReport[0]?.name && VITE_FLAG">
<View @click="openFile(form.typeExperimentReport[0]?.name)" /> <View @click="openFile(form.typeExperimentReport[0]?.name)" />
</el-icon> </el-icon>
<a target="_blank" class="aLoad" @click="download(form.typeExperimentReport[0]?.keyName)"> <a target="_blank" class="aLoad" @click="download(form.typeExperimentReport[0]?.keyName)">
@@ -413,7 +413,7 @@
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="出厂检验报告" v-if="props.openType == 'sourcesOfInterference'"> <el-descriptions-item label="出厂检验报告" v-if="props.openType == 'sourcesOfInterference'">
<el-icon class="elView" v-if="form.factoryInspectionReport[0]?.name"> <el-icon class="elView" v-if="form.factoryInspectionReport[0]?.name && VITE_FLAG">
<View @click="openFile(form.factoryInspectionReport[0]?.name)" /> <View @click="openFile(form.factoryInspectionReport[0]?.name)" />
</el-icon> </el-icon>
<a target="_blank" class="aLoad" @click="download(form.factoryInspectionReport[0]?.keyName)"> <a target="_blank" class="aLoad" @click="download(form.factoryInspectionReport[0]?.keyName)">
@@ -421,7 +421,7 @@
</a> </a>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="性能检测报告" v-if="props.openType == 'sourcesOfInterference'"> <el-descriptions-item label="性能检测报告" v-if="props.openType == 'sourcesOfInterference'">
<el-icon class="elView" v-if="form.performanceTestReport[0]?.name"> <el-icon class="elView" v-if="form.performanceTestReport[0]?.name && VITE_FLAG">
<View @click="openFile(form.performanceTestReport[0]?.name)" /> <View @click="openFile(form.performanceTestReport[0]?.name)" />
</el-icon> </el-icon>
<a target="_blank" class="aLoad" @click="download(form.performanceTestReport[0]?.keyName)"> <a target="_blank" class="aLoad" @click="download(form.performanceTestReport[0]?.keyName)">
@@ -429,7 +429,7 @@
</a> </a>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="主接线图" v-if="props.openType == 'sourcesOfInterference'"> <el-descriptions-item label="主接线图" v-if="props.openType == 'sourcesOfInterference'">
<el-icon class="elView" v-if="form.mainWiringDiagram[0]?.name"> <el-icon class="elView" v-if="form.mainWiringDiagram[0]?.name && VITE_FLAG">
<View @click="openFile(form.mainWiringDiagram[0]?.name)" /> <View @click="openFile(form.mainWiringDiagram[0]?.name)" />
</el-icon> </el-icon>
<a target="_blank" class="aLoad" @click="download(form.mainWiringDiagram[0]?.keyName)"> <a target="_blank" class="aLoad" @click="download(form.mainWiringDiagram[0]?.keyName)">
@@ -437,7 +437,7 @@
</a> </a>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="试运行报告" v-if="props.openType == 'sourcesOfInterference'"> <el-descriptions-item label="试运行报告" v-if="props.openType == 'sourcesOfInterference'">
<el-icon class="elView" v-if="form.runTheReport[0]?.name"> <el-icon class="elView" v-if="form.runTheReport[0]?.name && VITE_FLAG" >
<View @click="openFile(form.runTheReport[0]?.name)" /> <View @click="openFile(form.runTheReport[0]?.name)" />
</el-icon> </el-icon>
<a target="_blank" class="aLoad" @click="download(form.runTheReport[0]?.keyName)"> <a target="_blank" class="aLoad" @click="download(form.runTheReport[0]?.keyName)">
@@ -462,7 +462,7 @@ import { getByDeptDevLine } from '@/api/supervision-boot/interfere/index'
import { addOrUpdateFile, getFileById } from '@/api/supervision-boot/interfere/index' import { addOrUpdateFile, getFileById } from '@/api/supervision-boot/interfere/index'
import {download} from '@/utils/fileDownLoad' import {download} from '@/utils/fileDownLoad'
defineOptions({ name: 'BpmUserReportDetail' }) defineOptions({ name: 'BpmUserReportDetail' })
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
const { query } = useRoute() // 查询参数 const { query } = useRoute() // 查询参数
const props = defineProps({ const props = defineProps({

View File

@@ -65,6 +65,7 @@ const tableRef = ref()
const dialogVisible = ref(false) const dialogVisible = ref(false)
const detailId = ref('') const detailId = ref('')
const TableHeaderRef = ref() const TableHeaderRef = ref()
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
const tableStore = new TableStore({ const tableStore = new TableStore({
url: '/supervision-boot/warningLeaflet/alarmPageData', url: '/supervision-boot/warningLeaflet/alarmPageData',
publicHeight: 65, publicHeight: 65,
@@ -232,7 +233,12 @@ const tableStore = new TableStore({
icon: 'el-icon-EditPen', icon: 'el-icon-EditPen',
render: 'basicButton', render: 'basicButton',
disabled: row => { disabled: row => {
if (VITE_FLAG) {
return !(row.problemType == 2 || row.problemType == 4) return !(row.problemType == 2 || row.problemType == 4)
}
return true;
}, },
click: row => { click: row => {
if (row.problemType == 2) { if (row.problemType == 2) {

View File

@@ -1,5 +1,17 @@
<template> <template>
<TableHeader area datePicker nextFlag theCurrentTime showTimeAll ref="TableHeaderRef" showExport> <TableHeader area datePicker nextFlag theCurrentTime showTimeAll ref="TableHeaderRef" showExport>
<template #select>
<el-form-item label="流程状态">
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
<el-option
v-for="item in statusSelect"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
</template>
<template #operation> <template #operation>
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button> <el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
</template> </template>
@@ -27,6 +39,18 @@ const { push } = useRouter()
const tableRef = ref() const tableRef = ref()
const TableHeaderRef = ref() const TableHeaderRef = ref()
const feedbackPopup = ref() const feedbackPopup = ref()
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
const statusSelect = [
{ name: '待提交审批', id: 0 },
{ name: '审批中', id: 1 },
{ name: '审批通过', id: 2 },
{ name: '审批不通过', id: 3 },
{ name: '已取消', id: 4 },
{ name: '新增', id: 5 }
]
const tableStore = new TableStore({ const tableStore = new TableStore({
url: '/supervision-boot/warningLeaflet/warningPageData', url: '/supervision-boot/warningLeaflet/warningPageData',
publicHeight: 65, publicHeight: 65,
@@ -123,8 +147,12 @@ const tableStore = new TableStore({
icon: 'el-icon-EditPen', icon: 'el-icon-EditPen',
render: 'basicButton', render: 'basicButton',
disabled: row => { disabled: row => {
return row.problemType != 2 if (VITE_FLAG) {
return row.problemType != 2;
}
return true;
}, },
click: row => { click: row => {
const match = row.filePath.match(/excelreport(\/[^?#]*)/) const match = row.filePath.match(/excelreport(\/[^?#]*)/)
@@ -287,7 +315,7 @@ const tableStore = new TableStore({
}) })
} }
}) })
tableStore.table.params.status = ''
provide('tableStore', tableStore) provide('tableStore', tableStore)
onMounted(() => { onMounted(() => {

View File

@@ -58,7 +58,7 @@ import { ElMessage, genFileId, UploadProps, UploadRawFile } from 'element-plus'
import TableStore from '@/utils/tableStore' // 若不是列表页面弹框可删除 import TableStore from '@/utils/tableStore' // 若不是列表页面弹框可删除
import { getFileNameAndFilePath, uploadFile } from '@/api/system-boot/file' import { getFileNameAndFilePath, uploadFile } from '@/api/system-boot/file'
import { addFeedback, updateFeedback } from '@/api/supervision-boot/leaflet' import { addFeedback, updateFeedback } from '@/api/supervision-boot/leaflet'
import {download} from '@/utils/fileDownload' import {download} from '@/utils/fileDownLoad'
import { Link, View } from '@element-plus/icons-vue' import { Link, View } from '@element-plus/icons-vue'
const openFile = (name: any) => { const openFile = (name: any) => {
window.open(window.location.origin + '/#/previewFile?/supervision/' + name) window.open(window.location.origin + '/#/previewFile?/supervision/' + name)

View File

@@ -23,15 +23,17 @@ import { mainHeight } from '@/utils/layout'
const route = useRoute() const route = useRoute()
const id = ref('') const id = ref('')
const key = ref('') const key = ref('')
defineOptions({ // defineOptions({
name: 'supervision/supervision/manage' // name: 'supervision/supervision/manage'
}) // })
const tabList = ref(['3', '4']) const tabList = ref(['3', '4'])
const activeName: any = ref('3') const activeName: any = ref('3')
onMounted(() => { onMounted(() => {
let key = window.location.href.split('?')[0].slice(-1) let key = window.location.href.split('?')[0].slice(-1)
const isNumber = /^\d$/.test(key) const isNumber = /^\d$/.test(key)
if (isNumber) { if (isNumber) {
tabList.value = [key] tabList.value = [key]
activeName.value = key activeName.value = key
} }