| | |
| | | }"> |
| | | 扫码上传 |
| | | </u-button> |
| | | <u-button type="primary" |
| | | size="small" |
| | | @click.stop="startUploadForTask(item)" |
| | | :customStyle="{ |
| | | borderRadius: '15px', |
| | | height: '30px', |
| | | fontSize: '12px', |
| | | marginRight: '8px' |
| | | }"> |
| | | 图片上传 |
| | | </u-button> |
| | | <u-button type="success" |
| | | size="small" |
| | | @click.stop="viewAttachments(item)" |
| | |
| | | |
| | | // 计算上传URL |
| | | const uploadFileUrl = computed(() => { |
| | | const baseUrl = "http://114.132.189.42:9030"; |
| | | const baseUrl = config.baseUrl; |
| | | |
| | | return baseUrl + uploadConfig.action; |
| | | }); |
| | |
| | | } |
| | | }; |
| | | |
| | | // 图片上传(可选择图片上传或者是相机拍照) |
| | | const startUploadForTask = async (task, type) => { |
| | | // 直接打开上传弹窗 |
| | | openUploadDialog(task); |
| | | }; |
| | | |
| | | // 查看附件 |
| | | const viewAttachments = async task => { |
| | | try { |
| | |
| | | }; |
| | | |
| | | // 文件访问基础域(后端要求前缀) |
| | | const filePreviewBase = "http://114.132.189.42:9098"; |
| | | const filePreviewBase = config.fileUrl; |
| | | |
| | | // 将后端返回的文件地址规范成可访问URL |
| | | // 兼容场景: |