|
|
|
@ -36,9 +36,15 @@ |
|
|
|
|
ref="crud2" |
|
|
|
|
@row-update="document_rowUpdate" |
|
|
|
|
@row-save="document_rowSave" |
|
|
|
|
@row-del="document_rowDel"> |
|
|
|
|
@row-del="document_rowDel" |
|
|
|
|
:upload-after="uploadAfter" |
|
|
|
|
:upload-preview="(file) => handleUploadPreview(file)" |
|
|
|
|
:upload-delete="(file) => handleUploadDelete(file)"> |
|
|
|
|
<template #accessoryName="scope"> |
|
|
|
|
<el-link type="primary" :underline="false" @click="handleDownload(scope.row)">{{scope.row.prAccessoryName}}</el-link> |
|
|
|
|
</template> |
|
|
|
|
<template #menu="{row,index,size}"> |
|
|
|
|
<el-button size="small" type="text" @click="handleDownload(row)">下载</el-button> |
|
|
|
|
<el-button size="small" type="text" @click="handleDownload(row)" icon="el-icon-download">下 载</el-button> |
|
|
|
|
</template> |
|
|
|
|
</avue-crud> |
|
|
|
|
</span> |
|
|
|
@ -108,6 +114,7 @@ |
|
|
|
|
shouldShowButton:{}, |
|
|
|
|
addUpdateShowButton:{}, |
|
|
|
|
readonlyForm:{}, |
|
|
|
|
document_form:{}, |
|
|
|
|
option: { |
|
|
|
|
column: [{ |
|
|
|
|
label: '基本信息', |
|
|
|
@ -559,6 +566,9 @@ |
|
|
|
|
label: "页数", |
|
|
|
|
prop: "page", |
|
|
|
|
span: 20, |
|
|
|
|
rules: [{ |
|
|
|
|
trigger: "blur" |
|
|
|
|
}] |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "关键字", |
|
|
|
@ -577,13 +587,24 @@ |
|
|
|
|
}] |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "附件", |
|
|
|
|
prop: "accessory", |
|
|
|
|
span: 20, |
|
|
|
|
rules: [{ |
|
|
|
|
trigger: "blur" |
|
|
|
|
}] |
|
|
|
|
label: '附件', |
|
|
|
|
prop: 'accessoryName', |
|
|
|
|
dataType: 'object', |
|
|
|
|
fileType: 'img',//img/video/audio |
|
|
|
|
type: 'upload', |
|
|
|
|
// hide: true, |
|
|
|
|
limit: 1, |
|
|
|
|
propsHttp: { |
|
|
|
|
res: 'data', |
|
|
|
|
}, |
|
|
|
|
data: { |
|
|
|
|
fileType: "1"// 静态台账-文档清册 |
|
|
|
|
}, |
|
|
|
|
headers: { |
|
|
|
|
}, |
|
|
|
|
span: 20, |
|
|
|
|
action: './api/system/file/upload' |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -887,6 +908,20 @@ |
|
|
|
|
}, |
|
|
|
|
handleDownload(row) { |
|
|
|
|
window.open(`/api/system/file/download?daf-auth=${getToken()}&fileName=${row.accessoryName}`); |
|
|
|
|
}, |
|
|
|
|
uploadAfter(response, done) { |
|
|
|
|
// response 是服务器响应 |
|
|
|
|
this.document_form.accessoryName = response.fileName; |
|
|
|
|
this.document_form.prAccessoryName = response.name; |
|
|
|
|
done(); |
|
|
|
|
}, |
|
|
|
|
handleUploadPreview(file) { |
|
|
|
|
// 禁止文件预览 |
|
|
|
|
return false; |
|
|
|
|
}, |
|
|
|
|
handleUploadDelete(file) { |
|
|
|
|
this.document_form.accessoryName = ''; |
|
|
|
|
this.document_form.prAccessoryName = ''; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -902,6 +937,12 @@ |
|
|
|
|
outline: none; |
|
|
|
|
pointer-events: none; |
|
|
|
|
} |
|
|
|
|
.frame_class1 .el-input__icon { |
|
|
|
|
display: none; |
|
|
|
|
} |
|
|
|
|
.frame_class1 .el-input--prefix .el-input__inner { |
|
|
|
|
padding-left: 15px; |
|
|
|
|
} |
|
|
|
|
.container { |
|
|
|
|
display: flex; |
|
|
|
|
justify-content: flex-end; /* 将子元素推到容器的末端 */ |
|
|
|
|