|
|
|
@ -533,7 +533,7 @@ |
|
|
|
</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" style="display: flex; align-items: flex-start;"> |
|
|
|
<el-form :inline="true" label-position="top" style="display: flex; align-items: flex-start;margin-right: 11px"> |
|
|
|
<el-form-item :label="'检验结论'"> |
|
|
|
<el-select v-if="detailData.submitFlag === 'Y'" v-model="detailData.inspectionResult" disabled style="width: 100px" placeholder="请选择"> |
|
|
|
<el-option label="合格" value="合格"></el-option> |
|
|
|
@ -570,9 +570,15 @@ |
|
|
|
<el-input v-if="detailData.submitFlag === 'Y'" v-model="detailData.disposalRemark" disabled style="width: 293px"></el-input> |
|
|
|
<el-input v-else v-model="detailData.disposalRemark" style="width: 293px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="' '" style="margin-left: auto;"> |
|
|
|
<el-button type="primary" @click="openItemOperationDialog">项目操作</el-button> |
|
|
|
<el-button type="success" @click="openTemplateImportDialog">模板导入</el-button> |
|
|
|
<el-form-item :label="' '" style="margin-left: auto;margin-top: -10px"> |
|
|
|
<el-button class="operation-btn item-operation-btn" @click="openItemOperationDialog"> |
|
|
|
<i class="el-icon-setting"></i> |
|
|
|
<span>项目导入</span> |
|
|
|
</el-button> |
|
|
|
<el-button class="operation-btn template-import-btn" @click="openTemplateImportDialog"> |
|
|
|
<i class="el-icon-download"></i> |
|
|
|
<span>模板导入</span> |
|
|
|
</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<!-- 展示列表 --> |
|
|
|
@ -589,7 +595,11 @@ |
|
|
|
min-width="90" |
|
|
|
label="操作"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button icon="el-icon-picture" type="primary" @click="uploadImageModal(scope.row)"></el-button> |
|
|
|
<el-button |
|
|
|
icon="el-icon-picture" |
|
|
|
:type="hasImage(scope.row) ? 'success' : 'primary'" |
|
|
|
@click="uploadImageModal(scope.row)"> |
|
|
|
</el-button> |
|
|
|
<el-button style="margin-left: 2px" icon="el-icon-s-platform" type="primary" :loading="loadFlag" @click="dataAcquisitionByItem(scope.row)"></el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
@ -3417,6 +3427,26 @@ |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 判断检验项目是否已上传图片 |
|
|
|
hasImage(row) { |
|
|
|
// 检查常见的图片字段:itemImageUrl, imgUrl, imagePath, itemImg, img_url等 |
|
|
|
const imageFields = ['itemImageUrl', 'imgUrl', 'imagePath', 'itemImg', 'img_url', 'image_url', 'imageUrl'] |
|
|
|
|
|
|
|
// 遍历检查是否有任何图片字段且有值 |
|
|
|
for (const field of imageFields) { |
|
|
|
if (row[field] && row[field].trim() !== '') { |
|
|
|
return true |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 也检查动态列配置中的图片列 |
|
|
|
const hasImageColumn = this.detailColumnList.some(col => { |
|
|
|
return col.columnImage && row[col.columnProp] && row[col.columnProp].trim() !== '' |
|
|
|
}) |
|
|
|
|
|
|
|
return hasImageColumn |
|
|
|
}, |
|
|
|
|
|
|
|
// 上传项目图片 |
|
|
|
uploadImageModal (row) { |
|
|
|
let currentData = { |
|
|
|
@ -5004,7 +5034,7 @@ |
|
|
|
} |
|
|
|
|
|
|
|
/deep/ .item-operation-dialog .el-dialog__header { |
|
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); |
|
|
|
background: linear-gradient(135deg, #9ac3d0 20%, #b6c7dd 80%); |
|
|
|
padding: 20px 24px; |
|
|
|
border-radius: 8px 8px 0 0; |
|
|
|
} |
|
|
|
@ -5081,8 +5111,8 @@ |
|
|
|
/* 面板头部 */ |
|
|
|
.panel-header { |
|
|
|
padding: 14px 16px; |
|
|
|
background: linear-gradient(135deg, #f5f7fa 0%, #e8eaf0 100%); |
|
|
|
border-bottom: 2px solid #dcdfe6; |
|
|
|
background: linear-gradient(135deg, #9ac3d0 20%, #b6c7dd 80%); |
|
|
|
border-bottom: 2px solid #9ac3d0; |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
gap: 8px; |
|
|
|
@ -5090,21 +5120,21 @@ |
|
|
|
|
|
|
|
.panel-header i { |
|
|
|
font-size: 18px; |
|
|
|
color: #606266; |
|
|
|
color: #ffffff; |
|
|
|
} |
|
|
|
|
|
|
|
.panel-title { |
|
|
|
font-size: 14px; |
|
|
|
font-weight: 600; |
|
|
|
color: #303133; |
|
|
|
color: #ffffff; |
|
|
|
letter-spacing: 0.5px; |
|
|
|
} |
|
|
|
|
|
|
|
.item-count { |
|
|
|
margin-left: auto; |
|
|
|
font-size: 12px; |
|
|
|
color: #909399; |
|
|
|
background: #ffffff; |
|
|
|
color: #ffffff; |
|
|
|
background: rgba(255, 255, 255, 0.25); |
|
|
|
padding: 2px 10px; |
|
|
|
border-radius: 12px; |
|
|
|
font-weight: 500; |
|
|
|
@ -5200,7 +5230,7 @@ |
|
|
|
} |
|
|
|
|
|
|
|
/deep/ .template-import-dialog .el-dialog__header { |
|
|
|
background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); |
|
|
|
background: linear-gradient(135deg, #9ac3d0 20%, #b6c7dd 80%); |
|
|
|
padding: 20px 24px; |
|
|
|
border-radius: 8px 8px 0 0; |
|
|
|
} |
|
|
|
@ -5246,11 +5276,11 @@ |
|
|
|
} |
|
|
|
|
|
|
|
.template-table /deep/ .el-table__body tr:hover > td { |
|
|
|
background-color: #f0fff4 !important; |
|
|
|
background-color: #f0f7ff !important; |
|
|
|
} |
|
|
|
|
|
|
|
.template-table /deep/ .el-table__row.current-row > td { |
|
|
|
background-color: #e6ffed !important; |
|
|
|
background-color: #e6f2ff !important; |
|
|
|
} |
|
|
|
|
|
|
|
.template-table /deep/ td { |
|
|
|
@ -5260,4 +5290,61 @@ |
|
|
|
.template-table /deep/ .el-table__body { |
|
|
|
font-size: 13px; |
|
|
|
} |
|
|
|
|
|
|
|
/* ==================== 按钮样式优化 ==================== */ |
|
|
|
.operation-btn { |
|
|
|
position: relative; |
|
|
|
padding: 8px 16px; |
|
|
|
border: none; |
|
|
|
border-radius: 4px; |
|
|
|
font-size: 13px; |
|
|
|
font-weight: 500; |
|
|
|
cursor: pointer; |
|
|
|
transition: all 0.3s ease; |
|
|
|
overflow: hidden; |
|
|
|
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); |
|
|
|
} |
|
|
|
|
|
|
|
.operation-btn:hover { |
|
|
|
transform: translateY(-1px); |
|
|
|
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15); |
|
|
|
} |
|
|
|
|
|
|
|
.operation-btn:active { |
|
|
|
transform: translateY(0); |
|
|
|
} |
|
|
|
|
|
|
|
.operation-btn i { |
|
|
|
margin-right: 4px; |
|
|
|
font-size: 13px; |
|
|
|
} |
|
|
|
|
|
|
|
.operation-btn span { |
|
|
|
position: relative; |
|
|
|
z-index: 1; |
|
|
|
} |
|
|
|
|
|
|
|
/* 项目操作按钮 */ |
|
|
|
.item-operation-btn { |
|
|
|
background: linear-gradient(135deg, #97a9f7 0%, #ac97df 100%); |
|
|
|
color: #ffffff; |
|
|
|
} |
|
|
|
|
|
|
|
.item-operation-btn:hover { |
|
|
|
background: linear-gradient(135deg, #97a9f7 0%, #ac97df 100%); |
|
|
|
color: #ffffff; |
|
|
|
} |
|
|
|
|
|
|
|
/* 模板导入按钮 */ |
|
|
|
.template-import-btn { |
|
|
|
background: linear-gradient(135deg, #97a9f7 0%, #ac97df 100%); |
|
|
|
color: #ffffff; |
|
|
|
margin-left: 10px; |
|
|
|
} |
|
|
|
|
|
|
|
.template-import-btn:hover { |
|
|
|
background: linear-gradient(135deg, #97a9f7 0%, #ac97df 100%); |
|
|
|
color: #ffffff; |
|
|
|
} |
|
|
|
|
|
|
|
</style> |