Commit 330ef011 by Sweet Zhang

字段增加,大文件切片上传

parent cda44161
......@@ -21,17 +21,19 @@
"@element-plus/icons-vue": "^2.3.1",
"@vueup/vue-quill": "1.2.0",
"@vueuse/core": "13.3.0",
"ali-oss": "^6.23.0",
"axios": "1.9.0",
"clipboard": "2.0.11",
"dayjs": "^1.11.18",
"echarts": "5.6.0",
"element-plus": "^2.9.9",
"element-plus": "^2.13.5",
"file-saver": "2.0.5",
"fuse.js": "6.6.2",
"js-beautify": "1.14.11",
"js-cookie": "3.0.5",
"jsencrypt": "3.3.2",
"nprogress": "0.2.0",
"p-limit": "^7.3.0",
"pinia": "3.0.2",
"spark-md5": "^3.0.2",
"splitpanes": "^4.0.4",
......
......@@ -221,3 +221,19 @@ export function insuranceReconciliationCompany(data) {
method: 'post'
})
}
// 获取STS凭证
export function getStstoken(projectBizId) {
return request({
url: `/oss/api/sts/sts-token?projectBizId=${projectBizId}`,
method: 'get'
})
}
// 大文件分片上传接口
export function batchSaveFiles(data) {
return request({
url: '/oss/api/sts/batch/save/files',
data: data,
method: 'post'
})
}
......@@ -192,10 +192,17 @@
:showAction="true"
:showClose="true"
@close="((fileUploadDialogFlag = false), (files = ''))"
@confirm="((fileUploadDialogFlag = false), (files = ''))"
@confirm="handleDialogClose"
>
<!-- <FileUploader/> -->
<FileUpload
<FileUploader
:tenant-biz-id="userStore.projectInfo.tenantBizId"
:project-biz-id="userStore.projectInfo.projectBizId"
:object-biz-id="props.policyBizId"
:object-type="'DOCUMENT'"
:upload-concurrency="3"
ref="uploaderRef"
/>
<!-- <FileUpload
v-model="files"
:data="{ obiectTableName: 'policy_follow', objectBizId: props.policyBizId }"
:file-type="['xlsx', 'xls', 'doc', 'docx', 'pdf', 'txt', 'jpg', 'jpeg', 'png', 'gif']"
......@@ -204,7 +211,7 @@
:fileSize="15"
:name="'files'"
@uploadEnd="handleUploadEnd"
/>
/> -->
</CommonDialog>
</div>
</template>
......@@ -266,7 +273,17 @@ const props = defineProps({
default: ''
}
})
const uploaderRef = ref(null);
// 【关键】当弹窗关闭时,强制清空上传组件列表
const handleDialogClose = () => {
if (uploaderRef.value) {
// 调用子组件暴露的清空方法
// 你需要在子组件中使用 defineExpose 暴露 clearList 方法
uploaderRef.value.clearList();
fileUploadDialogFlag.value = false
getAttachmentListDetail(props.policyBizId)
}
};
const emit = defineEmits(['update:modelValue', 'submit', 'cancel', 'saveRow'])
const introducerTableData = ref([])
......@@ -896,7 +913,7 @@ const attachmentTableColumns = ref([
prop: 'originalName',
label: '文件名',
sortable: true,
width: '150',
width: '300',
formatter: row => row.originalName || '-'
},
{
......@@ -910,8 +927,8 @@ const attachmentTableColumns = ref([
prop: 'createTime',
label: '上传时间',
sortable: true,
width: '150',
formatter: row => row.createTime || '-'
width: '200',
formatter: row => formatToDateTime(row.createTime || '-')
},
{
prop: 'creatorName',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment