|
|
|
|
@ -307,6 +307,12 @@ function fileItemDisplayName(item: FileItem) {
|
|
|
|
|
return item.file ? item.file.name : item.original_name || ''
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 预览/下载链上建议保存名(与展示名一致);同源时部分浏览器会采用 */
|
|
|
|
|
function fileItemSuggestedDownloadName(item: FileItem): string | undefined {
|
|
|
|
|
const n = fileItemDisplayName(item).trim()
|
|
|
|
|
return n || undefined
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function formatApiErrSafe(data: Record<string, unknown>) {
|
|
|
|
|
const msg = (data.message as string) || ''
|
|
|
|
|
const errObj = data.errors as Record<string, string[]> | undefined
|
|
|
|
|
@ -1128,6 +1134,7 @@ onMounted(() => {
|
|
|
|
|
<a
|
|
|
|
|
class="btn btn-sm btn-outline-primary"
|
|
|
|
|
:href="item.previewUrl || item.url || '#'"
|
|
|
|
|
:download="fileItemSuggestedDownloadName(item)"
|
|
|
|
|
target="_blank"
|
|
|
|
|
rel="noopener"
|
|
|
|
|
>预览</a
|
|
|
|
|
@ -1182,6 +1189,7 @@ onMounted(() => {
|
|
|
|
|
<a
|
|
|
|
|
class="btn btn-sm btn-outline-primary"
|
|
|
|
|
:href="item.previewUrl || item.url || '#'"
|
|
|
|
|
:download="fileItemSuggestedDownloadName(item)"
|
|
|
|
|
target="_blank"
|
|
|
|
|
rel="noopener"
|
|
|
|
|
>预览</a
|
|
|
|
|
@ -1421,7 +1429,7 @@ onMounted(() => {
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="promise-sign-actions">
|
|
|
|
|
<button type="button" class="btn promise-close-btn" data-bs-dismiss="modal">关闭</button>
|
|
|
|
|
<button type="button" class="btn btn-light notice-cancel-btn" data-bs-dismiss="modal">关闭</button>
|
|
|
|
|
<button type="button" class="btn btn-primary" @click="confirmPromiseSignature">确认签署</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|