| | |
| | | <view class="detail-section"> |
| | | <view class="section-title"> |
| | | {{ title }} |
| | | <button class="upload-btn" @click="showUploadDialog">上传附件</button> |
| | | <button class="upload-btn" @click="showUploadDialog" v-if="!readonly">上传附件</button> |
| | | </view> |
| | | <view v-if="attachmentList && attachmentList.length > 0"> |
| | | <view class="attachment-item" v-for="(item, index) in attachmentList" :key="item.attachmentId"> |
| | |
| | | </view> |
| | | <view class="attachment-actions"> |
| | | <button class="action-btn view-btn" @click="viewAttachment(item)">查看</button> |
| | | <button class="action-btn delete-btn" @click="deleteAttachment(item.attachmentId, index)">删除</button> |
| | | <button class="action-btn delete-btn" @click="deleteAttachment(item.attachmentId, index)" v-if="!readonly">删除</button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | autoLoad: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | // 是否只读模式(禁止上传和删除) |
| | | readonly: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }, |
| | | data() { |