修改文件上传
This commit is contained in:
@@ -345,6 +345,91 @@
|
||||
</a>
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="入网设计方案审查报告" v-if="props.openType == 'sourcesOfInterference'">
|
||||
<el-icon class="elView" v-if="props.openType == 'sourcesOfInterference'">
|
||||
<View @click="openFile(form.NetReport[0]?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="form.NetReport[0]?.url">
|
||||
{{ form.NetReport[0]?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="治理工程验收报告" v-if="props.openType == 'sourcesOfInterference'">
|
||||
<el-icon class="elView" v-if="props.openType == 'sourcesOfInterference'">
|
||||
<View @click="openFile(form.governReport[0]?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="form.governReport[0]?.url">
|
||||
{{ form.governReport[0]?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="信息安全检测报告" v-if="props.openType == 'sourcesOfInterference'">
|
||||
<el-icon class="elView" v-if="props.openType == 'sourcesOfInterference'">
|
||||
<View @click="openFile(form.informationSecurityTestReport[0]?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="form.informationSecurityTestReport[0]?.url">
|
||||
{{ form.informationSecurityTestReport[0]?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="验收检验报告单" v-if="props.openType == 'sourcesOfInterference'">
|
||||
<el-icon class="elView" v-if="props.openType == 'sourcesOfInterference'">
|
||||
<View @click="openFile(form.acceptanceInspectionReportSingle[0]?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="form.acceptanceInspectionReportSingle[0]?.url">
|
||||
{{ form.acceptanceInspectionReportSingle[0]?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="验收检验报告" v-if="props.openType == 'sourcesOfInterference'">
|
||||
<el-icon class="elView" v-if="props.openType == 'sourcesOfInterference'">
|
||||
<View @click="openFile(form.acceptanceInspectionReport[0]?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="form.acceptanceInspectionReport[0]?.url">
|
||||
{{ form.acceptanceInspectionReport[0]?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="型式实验报告" v-if="props.openType == 'sourcesOfInterference'">
|
||||
<el-icon class="elView" v-if="props.openType == 'sourcesOfInterference'">
|
||||
<View @click="openFile(form.typeExperimentReport[0]?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="form.typeExperimentReport[0]?.url">
|
||||
{{ form.typeExperimentReport[0]?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="出厂检验报告" v-if="props.openType == 'sourcesOfInterference'">
|
||||
<el-icon class="elView" v-if="props.openType == 'sourcesOfInterference'">
|
||||
<View @click="openFile(form.factoryInspectionReport[0]?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="form.factoryInspectionReport[0]?.url">
|
||||
{{ form.factoryInspectionReport[0]?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="性能检测报告" v-if="props.openType == 'sourcesOfInterference'">
|
||||
<el-icon class="elView" v-if="props.openType == 'sourcesOfInterference'">
|
||||
<View @click="openFile(form.performanceTestReport[0]?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="form.performanceTestReport[0]?.url">
|
||||
{{ form.performanceTestReport[0]?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="主接线图" v-if="props.openType == 'sourcesOfInterference'">
|
||||
<el-icon class="elView" v-if="props.openType == 'sourcesOfInterference'">
|
||||
<View @click="openFile(form.mainWiringDiagram[0]?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="form.mainWiringDiagram[0]?.url">
|
||||
{{ form.mainWiringDiagram[0]?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="试运行报告" v-if="props.openType == 'sourcesOfInterference'">
|
||||
<el-icon class="elView" v-if="props.openType == 'sourcesOfInterference'">
|
||||
<View @click="openFile(form.runTheReport[0]?.name)" />
|
||||
</el-icon>
|
||||
<a target="_blank" :href="form.runTheReport[0]?.url">
|
||||
{{ form.runTheReport[0]?.name }}
|
||||
</a>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
@@ -360,6 +445,7 @@ import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||
import { Link, View } from '@element-plus/icons-vue'
|
||||
import PreviewFile from '@/components/PreviewFile/index.vue'
|
||||
import { getByDeptDevLine } from '@/api/supervision-boot/interfere/index'
|
||||
import { addOrUpdateFile, getFileById } from '@/api/supervision-boot/interfere/index'
|
||||
defineOptions({ name: 'BpmUserReportDetail' })
|
||||
|
||||
const { query } = useRoute() // 查询参数
|
||||
@@ -434,6 +520,18 @@ const userStateList = reactive([
|
||||
value: '3'
|
||||
}
|
||||
])
|
||||
const form: any = ref({
|
||||
NetReport: [], //入网设计方案审查报告:
|
||||
governReport: [], //治理工程验收报告
|
||||
informationSecurityTestReport: [], //信息安全检测报告
|
||||
acceptanceInspectionReportSingle: [], //信息安全检测报告
|
||||
acceptanceInspectionReport: [], //验收检验报告:
|
||||
typeExperimentReport: [], //型式实验报告
|
||||
factoryInspectionReport: [], //出厂检验报告:
|
||||
performanceTestReport: [], //性能检测报告
|
||||
mainWiringDiagram: [], //主接线图:
|
||||
runTheReport: [] //试运行报告
|
||||
})
|
||||
const dictData = useDictData()
|
||||
//字典获取所在地市
|
||||
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||
@@ -467,6 +565,9 @@ const getInfo = async () => {
|
||||
} finally {
|
||||
detailLoading.value = false
|
||||
}
|
||||
if (props.openType == 'sourcesOfInterference') {
|
||||
queryFiles()
|
||||
}
|
||||
}
|
||||
const proviteData = ref()
|
||||
//可研报告
|
||||
@@ -529,6 +630,14 @@ const preview = (val: any, url: any) => {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const queryFiles = (id: string) => {
|
||||
getFileById({ id: props.id }).then(res => {
|
||||
res.data.forEach((item: any) => {
|
||||
if (item.url.length > 0) getFileNamePaths(item.url, item.name)
|
||||
})
|
||||
})
|
||||
}
|
||||
//判断userType选择取用的对象
|
||||
const getProviteData = async () => {
|
||||
if (detailData.value.userType == '0' || detailData.value.userType == '1') {
|
||||
@@ -705,6 +814,17 @@ const getFileNamePath = async (val: any, pathName: any) => {
|
||||
}
|
||||
})
|
||||
}
|
||||
const getFileNamePaths = async (val: any, pathName: any) => {
|
||||
await getFileNameAndFilePath({ filePath: val }).then(res => {
|
||||
form.value[pathName] = [
|
||||
{
|
||||
name: res.data.fileName,
|
||||
url: res.data.url
|
||||
}
|
||||
]
|
||||
})
|
||||
}
|
||||
|
||||
defineExpose({ open: getInfo }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
watch(
|
||||
|
||||
Reference in New Issue
Block a user