|
@@ -13,53 +13,6 @@
|
|
|
<a-spin />
|
|
|
</div>
|
|
|
<div class="content">
|
|
|
- <div class="title-box">
|
|
|
- <div class="title">
|
|
|
- 我的资料库(共{{ fileLibaryList ? fileLibaryList.length : 0 }}个文件)
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="search-box">
|
|
|
- <a-input
|
|
|
- v-model:value="keyword"
|
|
|
- placeholder="搜索文档名称"
|
|
|
- style="width: 250px; height: 29px"
|
|
|
- @pressEnter="getDataSource"
|
|
|
- >
|
|
|
- <template #suffix>
|
|
|
- <SearchOutlined @click="getDataSource" style="" class="search-icon" />
|
|
|
- </template>
|
|
|
- </a-input>
|
|
|
- <div class="checked-name">
|
|
|
- 已选<span>{{ selectCount }}</span
|
|
|
- >个文件
|
|
|
- </div>
|
|
|
- <div class="clearBtn" @click="clear">清空</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="no-data" v-if="!fileLibaryList.length">
|
|
|
- <a-empty />
|
|
|
- </div>
|
|
|
- <div class="file-box" v-else>
|
|
|
- <div class="item-box" v-for="(item, index) in fileLibaryList" :key="index">
|
|
|
- <div class="left-box">
|
|
|
- <MyIcon icon="icon-wenjianleixing-suolvetu-PDFwendang" size="16" />
|
|
|
- <div class="name">{{ item.filename }}</div>
|
|
|
- </div>
|
|
|
- <div class="right-box">
|
|
|
- <template v-if="false">
|
|
|
- <MyIcon icon="icon-fujian" size="12" color="#BFC4C9" />
|
|
|
- <div class="name">56.32K</div>
|
|
|
- </template>
|
|
|
- <div class="diver"></div>
|
|
|
- <MyIcon icon="icon-shijian" size="12" color="#BFC4C9" />
|
|
|
- <div class="name">
|
|
|
- {{ item.uploaddate ? dayjs(item.uploaddate).format('YYYY-MM-DD HH:mm:ss') : '-' }}
|
|
|
- </div>
|
|
|
- <div class="diver29"></div>
|
|
|
- <a-checkbox v-model:checked="item.checked" @change="change"></a-checkbox>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
|
|
|
<a-upload-dragger
|
|
|
style="margin: 10px 0 10px; width: 100%"
|
|
@@ -148,22 +101,6 @@ const sure = () => {
|
|
|
var link = t.link;
|
|
|
submitList.value.push(citem);
|
|
|
});
|
|
|
- //我的上传选中的
|
|
|
- var data = fileLibaryList.value.filter((item) => item.checked == true);
|
|
|
- if (data) {
|
|
|
- data.forEach((t) => {
|
|
|
- var citem = {
|
|
|
- name: t.filename + '.' + t.fileext
|
|
|
- };
|
|
|
- citem.uid = t.id;
|
|
|
- var link = t.filepath.replace(
|
|
|
- window.AppGlobalConfig.userFilePdfUrl,
|
|
|
- window.AppGlobalConfig.userUploadFile
|
|
|
- );
|
|
|
- citem.link = link;
|
|
|
- submitList.value.push(citem);
|
|
|
- });
|
|
|
- }
|
|
|
visible.value = false;
|
|
|
emits('sure', submitList.value);
|
|
|
};
|
|
@@ -274,15 +211,15 @@ const handleUpload = async (file: any) => {
|
|
|
fileLibraryApi.uploadFile(formData).then((response) => {
|
|
|
console.log('response', response);
|
|
|
// 上传成功处理
|
|
|
- if (response.code === 200 && response.success) {
|
|
|
+ if (response.data) {
|
|
|
var item = {
|
|
|
uid: file.uid, // 保留唯一标识
|
|
|
name: file.name, // 文件名
|
|
|
status: 'done', // 上传状态
|
|
|
- id: response.data.id, // 服务器返回的文件地址
|
|
|
+ id: response.data, // 服务器返回的文件地址
|
|
|
file: file,
|
|
|
- filePath: response.data.filePath,
|
|
|
- userId: response.data.userId
|
|
|
+ filePath: response.data,
|
|
|
+ userId: 'test123'
|
|
|
};
|
|
|
fileList.value.push(item);
|
|
|
doUpload(item, key);
|
|
@@ -364,7 +301,7 @@ defineExpose({ showModal });
|
|
|
:deep(.ant-modal-content) {
|
|
|
width: 1000px;
|
|
|
padding: 0px;
|
|
|
- height: 700px;
|
|
|
+ height: 330px;
|
|
|
background: #ffffff;
|
|
|
box-shadow: -5px 5px 20px 0px rgba(0, 0, 0, 0.1);
|
|
|
border-radius: 12px 12px 12px 12px;
|