Commit 330ef011 by Sweet Zhang

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

parent cda44161
...@@ -21,17 +21,19 @@ ...@@ -21,17 +21,19 @@
"@element-plus/icons-vue": "^2.3.1", "@element-plus/icons-vue": "^2.3.1",
"@vueup/vue-quill": "1.2.0", "@vueup/vue-quill": "1.2.0",
"@vueuse/core": "13.3.0", "@vueuse/core": "13.3.0",
"ali-oss": "^6.23.0",
"axios": "1.9.0", "axios": "1.9.0",
"clipboard": "2.0.11", "clipboard": "2.0.11",
"dayjs": "^1.11.18", "dayjs": "^1.11.18",
"echarts": "5.6.0", "echarts": "5.6.0",
"element-plus": "^2.9.9", "element-plus": "^2.13.5",
"file-saver": "2.0.5", "file-saver": "2.0.5",
"fuse.js": "6.6.2", "fuse.js": "6.6.2",
"js-beautify": "1.14.11", "js-beautify": "1.14.11",
"js-cookie": "3.0.5", "js-cookie": "3.0.5",
"jsencrypt": "3.3.2", "jsencrypt": "3.3.2",
"nprogress": "0.2.0", "nprogress": "0.2.0",
"p-limit": "^7.3.0",
"pinia": "3.0.2", "pinia": "3.0.2",
"spark-md5": "^3.0.2", "spark-md5": "^3.0.2",
"splitpanes": "^4.0.4", "splitpanes": "^4.0.4",
......
...@@ -221,3 +221,19 @@ export function insuranceReconciliationCompany(data) { ...@@ -221,3 +221,19 @@ export function insuranceReconciliationCompany(data) {
method: 'post' 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 @@ ...@@ -192,10 +192,17 @@
:showAction="true" :showAction="true"
:showClose="true" :showClose="true"
@close="((fileUploadDialogFlag = false), (files = ''))" @close="((fileUploadDialogFlag = false), (files = ''))"
@confirm="((fileUploadDialogFlag = false), (files = ''))" @confirm="handleDialogClose"
> >
<!-- <FileUploader/> --> <FileUploader
<FileUpload :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" v-model="files"
:data="{ obiectTableName: 'policy_follow', objectBizId: props.policyBizId }" :data="{ obiectTableName: 'policy_follow', objectBizId: props.policyBizId }"
:file-type="['xlsx', 'xls', 'doc', 'docx', 'pdf', 'txt', 'jpg', 'jpeg', 'png', 'gif']" :file-type="['xlsx', 'xls', 'doc', 'docx', 'pdf', 'txt', 'jpg', 'jpeg', 'png', 'gif']"
...@@ -204,7 +211,7 @@ ...@@ -204,7 +211,7 @@
:fileSize="15" :fileSize="15"
:name="'files'" :name="'files'"
@uploadEnd="handleUploadEnd" @uploadEnd="handleUploadEnd"
/> /> -->
</CommonDialog> </CommonDialog>
</div> </div>
</template> </template>
...@@ -266,7 +273,17 @@ const props = defineProps({ ...@@ -266,7 +273,17 @@ const props = defineProps({
default: '' 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 emit = defineEmits(['update:modelValue', 'submit', 'cancel', 'saveRow'])
const introducerTableData = ref([]) const introducerTableData = ref([])
...@@ -896,7 +913,7 @@ const attachmentTableColumns = ref([ ...@@ -896,7 +913,7 @@ const attachmentTableColumns = ref([
prop: 'originalName', prop: 'originalName',
label: '文件名', label: '文件名',
sortable: true, sortable: true,
width: '150', width: '300',
formatter: row => row.originalName || '-' formatter: row => row.originalName || '-'
}, },
{ {
...@@ -910,8 +927,8 @@ const attachmentTableColumns = ref([ ...@@ -910,8 +927,8 @@ const attachmentTableColumns = ref([
prop: 'createTime', prop: 'createTime',
label: '上传时间', label: '上传时间',
sortable: true, sortable: true,
width: '150', width: '200',
formatter: row => row.createTime || '-' formatter: row => formatToDateTime(row.createTime || '-')
}, },
{ {
prop: 'creatorName', 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