修改文件上传问题
This commit is contained in:
@@ -212,12 +212,21 @@
|
||||
})?.name
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="敏感电能质量指标" v-if="detailData.userType == 6">
|
||||
{{
|
||||
energyQualityIndexList.find(item => {
|
||||
return item.id == proviteData.energyQualityIndex
|
||||
})?.name
|
||||
}}
|
||||
<el-descriptions-item :span="2" label="电能质量设备检测报告">
|
||||
<el-icon class="elView" v-if="detailData?.checkUrl">
|
||||
<View @click="openFile(detailData?.checkUrl)" />
|
||||
</el-icon>
|
||||
<span class="aLoad" @click="download(detailData.checkUrl)" target="_blank">
|
||||
{{ detailData.checkUrl?.replace(/^.*?\/(.*?)\//, '') || '' }}
|
||||
</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item :span="2" label="电能质量评估报告">
|
||||
<el-icon class="elView" v-if="detailData?.assessUrl">
|
||||
<View @click="openFile(detailData?.assessUrl)" />
|
||||
</el-icon>
|
||||
<span class="aLoad" @click="download(detailData.assessUrl)" target="_blank">
|
||||
{{ detailData.assessUrl?.replace(/^.*?\/(.*?)\//, '') || '' }}
|
||||
</span>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
@@ -233,7 +242,7 @@ import { getDictTreeById } from '@/api/system-boot/dictTree'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||
import { Link, View } from '@element-plus/icons-vue'
|
||||
import PreviewFile from '@/components/PreviewFile/index.vue'
|
||||
import { download } from '@/utils/fileDownLoad'
|
||||
// import { addOrUpdateFile, getFileById } from '@/api/supervision-boot/interfere/index'
|
||||
defineOptions({ name: 'BpmUserReportDetail' })
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<TableHeader ref="TableHeaderRef">
|
||||
<TableHeader ref="TableHeaderRef" showExport>
|
||||
<template #select>
|
||||
<el-form-item label="项目名称">
|
||||
<el-input
|
||||
@@ -32,7 +32,7 @@
|
||||
<el-button icon="el-icon-Upload" type="primary" @click="importUserData">批量导入</el-button> -->
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
<Table ref="tableRef" @cell-click="cellClickEvent" />
|
||||
|
||||
<el-dialog title="详情" width="1000px" v-model="dialogShow" v-if="dialogShow">
|
||||
<DetailInfo :id="userId" :openType="'sourcesOfInterference'"></DetailInfo>
|
||||
@@ -58,6 +58,7 @@ import { downloadSensitiveReportTemplate } from '@/api/supervision-boot/userRepo
|
||||
import DetailInfo from './components/detail.vue'
|
||||
import { cancelFormData, getUserReportById } from '@/api/supervision-boot/interfere/index'
|
||||
import { deleteUserReport } from '@/api/device-boot/sensitiveLoadMange'
|
||||
import { download } from '@/utils/fileDownLoad'
|
||||
const addForms = ref()
|
||||
const dictData = useDictData()
|
||||
const sensitiveUserPopup = ref()
|
||||
@@ -89,7 +90,7 @@ const tableStore = new TableStore({
|
||||
}
|
||||
},
|
||||
{ field: 'city', title: '所在地市', minWidth: 80 },
|
||||
/* { field: 'substation', title: '厂站名称', minWidth: 100 },*/
|
||||
/* { field: 'substation', title: '厂站名称', minWidth: 100 },*/
|
||||
{ field: 'projectName', title: '项目名称', minWidth: 150 },
|
||||
{
|
||||
field: 'userType',
|
||||
@@ -104,10 +105,28 @@ const tableStore = new TableStore({
|
||||
// { field: 'responsibleDepartment', title: '归口管理部门', minWidth: 130 },
|
||||
{ field: 'ratePower', title: '装机容量(MW)', minWidth: 80 },
|
||||
{ field: 'stationId', title: '所属电站', minWidth: 100 },
|
||||
{ field: 'checkUrl', title: '电能质量设备检测报告', minWidth: 170 },
|
||||
{ field: 'assessUrl', title: '电能质量评估报告', minWidth: 170 },
|
||||
{
|
||||
field: 'checkUrl',
|
||||
title: '电能质量设备检测报告',
|
||||
minWidth: 170,
|
||||
render: 'customRender',
|
||||
customRender: props => {
|
||||
const val = props.renderValue?.replace(/^.*?\/(.*?)\//, '') || ''
|
||||
return val ? h('span', { style: { color: 'var(--el-color-primary)', cursor: 'pointer' } }, val) : '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'assessUrl',
|
||||
title: '电能质量评估报告',
|
||||
minWidth: 170,
|
||||
render: 'customRender',
|
||||
customRender: props => {
|
||||
const val = props.renderValue?.replace(/^.*?\/(.*?)\//, '') || ''
|
||||
return val ? h('span', { style: { color: 'var(--el-color-primary)', cursor: 'pointer' } }, val) : '/'
|
||||
}
|
||||
},
|
||||
|
||||
/* {
|
||||
/* {
|
||||
field: 'createBy',
|
||||
title: '创建人',
|
||||
minWidth: 80,
|
||||
@@ -116,9 +135,10 @@ const tableStore = new TableStore({
|
||||
}
|
||||
},*/
|
||||
{
|
||||
title: '操作',fixed: 'right',
|
||||
title: '操作',
|
||||
fixed: 'right',
|
||||
minWidth: 150,
|
||||
|
||||
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
@@ -141,7 +161,6 @@ const tableStore = new TableStore({
|
||||
disabled: row => {
|
||||
return !(row.status == 0)
|
||||
},
|
||||
|
||||
|
||||
click: row => {
|
||||
addForms.value.filterUsers([6])
|
||||
@@ -151,9 +170,7 @@ const tableStore = new TableStore({
|
||||
row: row
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -212,27 +229,13 @@ const deleteEven = () => {
|
||||
})
|
||||
}
|
||||
}
|
||||
/**取消流程操作*/
|
||||
const cancelLeave = async (row: any) => {
|
||||
// 二次确认
|
||||
const { value } = await ElMessageBox.prompt('请输入取消原因', '取消流程', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
inputType: 'textarea',
|
||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||
inputErrorMessage: '取消原因不能为空'
|
||||
})
|
||||
// 发起取消
|
||||
let data = {
|
||||
id: row.id,
|
||||
processInstanceId: row.processInstanceId,
|
||||
dataType: 1,
|
||||
reason: value
|
||||
// 点击行
|
||||
const cellClickEvent = ({ row, column }: any) => {
|
||||
if (column.field == 'checkUrl') {
|
||||
row.checkUrl ? download(row.checkUrl) : ''
|
||||
} else if (column.field == 'assessUrl') {
|
||||
row.assessUrl ? download(row.assessUrl) : ''
|
||||
}
|
||||
await cancelFormData(data)
|
||||
ElMessage.success('取消成功')
|
||||
// 加载数据
|
||||
tableStore.index()
|
||||
}
|
||||
|
||||
// 新增
|
||||
|
||||
Reference in New Issue
Block a user