gaoluyang
2026-02-09 6c01ab2761ffbfeb71acea02d741d9a24588e4d6
src/views/salesManagement/opportunityManagement/index.vue
@@ -276,7 +276,7 @@
    </el-dialog>
    <!-- 附件列表对话框 -->
    <FileList ref="fileListRef" />
    <FileList ref="fileListRef" @refresh="handleFileListRefresh" />
  </div>
</template>
@@ -349,6 +349,7 @@
// FileList组件引用
const fileListRef = ref(null)
const currentAttachmentRow = ref(null)
// 上传配置
const upload = reactive({
@@ -387,6 +388,7 @@
  { value: '新建', label: '新建' },
  { value: '项目跟踪', label: '项目跟踪' },
  { value: '合同签约', label: '合同签约' },
  { value: '备案申报', label: '备案申报' },
  { value: '项目交付', label: '项目交付' },
  { value: '项目验收', label: '项目验收' }
]
@@ -401,7 +403,8 @@
    '新建': 'info', 
    '项目跟踪': 'primary', 
    '合同签约': 'warning', 
    '项目交付': 'success',
    '备案申报': 'primary',
    '项目交付': 'success',
    '项目验收': 'success' 
  } 
  return typeMap[status] || 'info' 
@@ -413,7 +416,8 @@
    '新建': '新建', 
    '项目跟踪': '项目跟踪', 
    '合同签约': '合同签约', 
    '项目交付': '项目交付',
    '备案申报': '备案申报',
    '项目交付': '项目交付',
    '项目验收': '项目验收' 
  } 
  return textMap[status] || '未知' 
@@ -745,7 +749,7 @@
const resetForm = () => {
  Object.assign(form, {
    id: undefined,
    status: '新建',
    status: '',
    province: '',
    customerName: '',
    businessSource: '',
@@ -802,7 +806,24 @@
// 查看附件
function handleAttachment(row) {
   fileListRef.value.open(row.businessCommonFiles)
   currentAttachmentRow.value = row
   fileListRef.value.open(row.businessCommonFiles, row.id)
}
// 附件列表刷新
function handleFileListRefresh(rowId) {
   // 重新获取列表数据
   getList()
   // 等待列表数据更新后,找到对应的行并更新附件列表
   setTimeout(() => {
      if (currentAttachmentRow.value && tableData.value) {
         const updatedRow = tableData.value.find(item => item.id === currentAttachmentRow.value.id)
         if (updatedRow && updatedRow.businessCommonFiles) {
            currentAttachmentRow.value = updatedRow
            fileListRef.value.open(updatedRow.businessCommonFiles, updatedRow.id)
         }
      }
   }, 300)
}
onMounted(() => {