gaoluyang
4 天以前 792ad8ef7684685544fbf03cc93d4eb2dc605bfa
src/views/salesManagement/opportunityManagement/index.vue
@@ -9,8 +9,18 @@
            placeholder="请输入客户名称"
            clearable
            prefix-icon="Search"
            style="width: 200px"
            style="width: 200px;"
            @change="handleQuery"
          />
        </el-form-item>
        <el-form-item label="城市">
          <el-input
              v-model="searchForm.city"
              placeholder="请输入城市名称"
              clearable
              prefix-icon="Search"
              style="width: 200px"
              @change="handleQuery"
          />
        </el-form-item>
        <el-form-item label="录入日期:">
@@ -266,7 +276,7 @@
    </el-dialog>
    <!-- 附件列表对话框 -->
    <FileList ref="fileListRef" />
    <FileList ref="fileListRef" @refresh="handleFileListRefresh" />
  </div>
</template>
@@ -309,6 +319,7 @@
// 搜索表单
const searchForm = reactive({
  customerName: '',
  city: '',
  entryDate: [],
  entryDateStart: '',
  entryDateEnd: ''
@@ -338,6 +349,7 @@
// FileList组件引用
const fileListRef = ref(null)
const currentAttachmentRow = ref(null)
// 上传配置
const upload = reactive({
@@ -791,7 +803,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(() => {