测试问题修复
This commit is contained in:
parent
c842679e4e
commit
d209581d9b
|
|
@ -7,9 +7,9 @@ VITE_API_URL = '/proxyApi'
|
|||
# 开发环境接口地址
|
||||
# VITE_proxyTarget = 'http://10.40.92.74:8080' #盛旭
|
||||
|
||||
VITE_proxyTarget = 'http://192.168.0.234:28080' # 马帅
|
||||
# VITE_proxyTarget = 'http://192.168.0.234:28080' # 马帅
|
||||
# VITE_proxyTarget = 'http://192.168.2.122:28080' # 梁超
|
||||
# VITE_proxyTarget = 'http://36.33.26.201:17788/proxyApi' # 测试服务
|
||||
VITE_proxyTarget = 'http://36.33.26.201:17788/proxyApi' # 测试÷服务
|
||||
# VITE_proxyTarget = 'http://192.168.0.244:28580' # 测试服务
|
||||
# VITE_proxyTarget = 'http://192.168.2.75:28080' # 盛旭
|
||||
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@
|
|||
<div class="appearance">
|
||||
<!-- <div class="publicTitle">证书展示</div> -->
|
||||
<!-- <div class="certificate"> -->
|
||||
<!-- <el-row>
|
||||
<!-- <el-row>
|
||||
<el-col :span="2">
|
||||
<div>合格证:</div>
|
||||
</el-col>
|
||||
|
|
@ -197,7 +197,7 @@
|
|||
</div>
|
||||
</el-col>
|
||||
</el-row> -->
|
||||
<!-- <el-row>
|
||||
<!-- <el-row>
|
||||
<el-col :span="2">
|
||||
<div>检测证明:</div>
|
||||
</el-col>
|
||||
|
|
@ -233,16 +233,30 @@
|
|||
<el-table-column align="center" type="index" label="序号" width="80" />
|
||||
<el-table-column align="center" prop="qcTime" label="检测日期" />
|
||||
<el-table-column align="center" prop="maintenanceAlarmDay" label="有效期" />
|
||||
<el-table-column align="center" prop="fileInfo" label="检测证明">
|
||||
<template #default="row">
|
||||
<a
|
||||
<el-table-column align="center" prop="fileInfoList" label="检测证明">
|
||||
<template #default="scope">
|
||||
<span v-for="(item, index) in scope.row.fileInfoList" :key="index">
|
||||
<a
|
||||
:href="item.fileUrl"
|
||||
target="_blank"
|
||||
style="
|
||||
color: #00a288;
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
margin-right: 5px;
|
||||
"
|
||||
>查看</a
|
||||
>
|
||||
</span>
|
||||
<span v-if="!scope.row.fileInfoList.length">无检测证明</span>
|
||||
<!-- <a
|
||||
v-if="row.row.fileInfo && row.row.fileInfo.fileUrl"
|
||||
:href="row.row.fileInfo.fileUrl"
|
||||
target="_blank"
|
||||
style="color: #00a288; text-decoration: underline"
|
||||
>查看</a
|
||||
>
|
||||
<span v-else>无检测证明</span>
|
||||
<span v-else>无检测证明</span> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="comName" label="检测单位" />
|
||||
|
|
|
|||
|
|
@ -479,7 +479,10 @@ const lowerClassData = async () => {
|
|||
const getCompanyAddressListData = async () => {
|
||||
const res: any = await getCompanyListApi()
|
||||
const addressList = res.data.map((e: any) => {
|
||||
return { ...e, name: e.companyName, value: e.companyId, isChecked: false, index: 4 }
|
||||
// console.log('🚀 ~ addressList ~ e:', e)
|
||||
if (e.isShow) {
|
||||
return { ...e, name: e.companyName, value: e.companyId, isChecked: false, index: 4 }
|
||||
}
|
||||
})
|
||||
screenChooseList[4].list.push(...addressList)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -527,7 +527,7 @@ onMounted(async () => {
|
|||
margin-top: 10px;
|
||||
// padding: 0 10px;
|
||||
color: #000;
|
||||
height: 32px;
|
||||
min-height: 32px;
|
||||
line-height: 32px;
|
||||
text-align: center;
|
||||
padding: 2px 20px;
|
||||
|
|
|
|||
|
|
@ -350,7 +350,9 @@ const getCompanyAddressListData = async () => {
|
|||
return { ...e, name: e.areaName, value: e.areaCode, isChecked: false, index: 1 }
|
||||
})
|
||||
const companyList = res.data.map((e: any) => {
|
||||
return { ...e, name: e.companyName, value: e.companyId, isChecked: false, index: 2 }
|
||||
if (e.isShow) {
|
||||
return { ...e, name: e.companyName, value: e.companyId, isChecked: false, index: 2 }
|
||||
}
|
||||
})
|
||||
|
||||
screenChooseList[1].list.push(...addressList)
|
||||
|
|
|
|||
|
|
@ -951,12 +951,11 @@ const headerInfo = reactive({
|
|||
})
|
||||
// 文件上传前处理-上传大小
|
||||
const beforeUpload = (file: any) => {
|
||||
if (file.size / 1024 / 1024 > 2) {
|
||||
if (file.size / 1024 / 1024 > 10) {
|
||||
ElMessage({
|
||||
type: 'error',
|
||||
message: '上传文件大小不能超过5M!',
|
||||
message: '上传文件大小不能超过10M!',
|
||||
})
|
||||
// this.$message.error({ message: `上传文件大小不能超过5M!`,});
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
|
@ -1210,9 +1209,19 @@ const handleRemove = (file: any, row: any) => {
|
|||
const handleSuccess = (uploadFile: any, row: any) => {
|
||||
console.log('🚀 ~ handleSuccess ~ uploadFile:', uploadFile)
|
||||
if (uploadFile.code == 200) {
|
||||
let fileUrl = ''
|
||||
console.log('输出env.VITE_API_URL', import.meta.env.VITE_API_URL)
|
||||
if (import.meta.env.VITE_API_URL == '/proxyApi') {
|
||||
console.log('走入公司测试环境----------', uploadFile.data.url)
|
||||
fileUrl = uploadFile.data.url // 公司-测试环境
|
||||
} else {
|
||||
console.log('走入宏源测试环境----------', uploadFile.data.url)
|
||||
fileUrl = 'http://sgwpdm.ah.sgcc.com.cn/iws/ahbns/' + uploadFile.data.url // 宏源-测试环境
|
||||
}
|
||||
console.log('输出fileUrl----------', fileUrl)
|
||||
row.examinationPdf.push({
|
||||
fileName: uploadFile.data.name,
|
||||
fileUrl: uploadFile.data.url,
|
||||
fileUrl: fileUrl,
|
||||
})
|
||||
}
|
||||
console.log('🚀 ~ handleSuccess ~ row:', row)
|
||||
|
|
|
|||
|
|
@ -255,7 +255,8 @@
|
|||
<el-row :gutter="20">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="1" style="margin-bottom: 0" class="upload-tip">
|
||||
支持格式:.jpg、.png、.pdf、.doc、.docx 单个文件大小不能超过5M,最多可上传1个文件
|
||||
支持格式:.jpg、.png、.pdf、.doc、.docx
|
||||
单个文件大小不能超过10M,最多可上传1个文件
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -263,7 +264,7 @@
|
|||
<el-col :span="24">
|
||||
<el-form-item label="质检附件" prop="fileInfoList">
|
||||
<UploadComponentNew
|
||||
:maxSize="5"
|
||||
:maxSize="10"
|
||||
:max-limit="1"
|
||||
width="100px"
|
||||
height="100px"
|
||||
|
|
@ -387,6 +388,7 @@
|
|||
<el-table-column align="center" label="附件">
|
||||
<template #default="{ row }">
|
||||
<el-image
|
||||
v-if="row.url.includes('.jpg') || row.url.includes('.png')"
|
||||
style="width: 60px; height: 60px"
|
||||
:src="row.url"
|
||||
:zoom-rate="1.2"
|
||||
|
|
@ -398,6 +400,18 @@
|
|||
:z-index="9999999999"
|
||||
:preview-teleported="true"
|
||||
/>
|
||||
<span v-else>
|
||||
<a
|
||||
:href="row.url"
|
||||
target="_blank"
|
||||
style="
|
||||
color: #00a288;
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
"
|
||||
>查看</a
|
||||
>
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作" :width="80">
|
||||
|
|
@ -689,9 +703,19 @@ const onAddQualityRecord = (row: any) => {
|
|||
const onFileChange = (fileList: any) => {
|
||||
addOrEditForm.value.fileInfoTempList = []
|
||||
const fileListTemp = fileList.map((e: any) => {
|
||||
let fileUrl = ''
|
||||
console.log('输出env.VITE_API_URL', import.meta.env.VITE_API_URL)
|
||||
if (import.meta.env.VITE_API_URL == '/proxyApi') {
|
||||
console.log('走入公司测试环境----------', e.url)
|
||||
fileUrl = e.url // 公司-测试环境
|
||||
} else {
|
||||
console.log('走入宏源测试环境----------', e.url)
|
||||
fileUrl = 'http://sgwpdm.ah.sgcc.com.cn/iws/ahbns/uploads' + e.url // 宏源-测试环境
|
||||
}
|
||||
console.log('输出fileUrl----------', fileUrl)
|
||||
return {
|
||||
fileName: e.name,
|
||||
fileUrl: e.url,
|
||||
fileUrl: fileUrl,
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue