Browse Source

大文件上传/bug修复/fileIcon

master
xuhuajiao 1 year ago
parent
commit
b8f1430981
  1. 32
      src/api/collect/collect.js
  2. 90
      src/assets/iconfonts/light/iconfont.css
  3. 2
      src/assets/iconfonts/light/iconfont.js
  4. 147
      src/assets/iconfonts/light/iconfont.json
  5. BIN
      src/assets/iconfonts/light/iconfont.ttf
  6. BIN
      src/assets/iconfonts/light/iconfont.woff
  7. BIN
      src/assets/iconfonts/light/iconfont.woff2
  8. BIN
      src/assets/images/fileIcon/ai.png
  9. BIN
      src/assets/images/fileIcon/attachment.png
  10. BIN
      src/assets/images/fileIcon/audio.png
  11. BIN
      src/assets/images/fileIcon/box_notes.png
  12. BIN
      src/assets/images/fileIcon/csv.png
  13. BIN
      src/assets/images/fileIcon/eps.png
  14. BIN
      src/assets/images/fileIcon/excel.png
  15. BIN
      src/assets/images/fileIcon/exe.png
  16. BIN
      src/assets/images/fileIcon/flash.png
  17. BIN
      src/assets/images/fileIcon/folder.png
  18. BIN
      src/assets/images/fileIcon/gdoc.png
  19. BIN
      src/assets/images/fileIcon/gdocs.png
  20. BIN
      src/assets/images/fileIcon/gform.png
  21. BIN
      src/assets/images/fileIcon/gpres.png
  22. BIN
      src/assets/images/fileIcon/gsheet.png
  23. BIN
      src/assets/images/fileIcon/html.png
  24. BIN
      src/assets/images/fileIcon/image.png
  25. BIN
      src/assets/images/fileIcon/keynote.png
  26. BIN
      src/assets/images/fileIcon/library_folder.png
  27. BIN
      src/assets/images/fileIcon/link.png
  28. BIN
      src/assets/images/fileIcon/mp.png
  29. BIN
      src/assets/images/fileIcon/overlay.png
  30. BIN
      src/assets/images/fileIcon/pack.png
  31. BIN
      src/assets/images/fileIcon/pages.png
  32. BIN
      src/assets/images/fileIcon/pdf.png
  33. BIN
      src/assets/images/fileIcon/ppt.png
  34. BIN
      src/assets/images/fileIcon/psd.png
  35. BIN
      src/assets/images/fileIcon/quip_doc.png
  36. BIN
      src/assets/images/fileIcon/quip_sheet.png
  37. BIN
      src/assets/images/fileIcon/rtf.png
  38. BIN
      src/assets/images/fileIcon/slide.png
  39. BIN
      src/assets/images/fileIcon/stypi.png
  40. BIN
      src/assets/images/fileIcon/txt.png
  41. BIN
      src/assets/images/fileIcon/unknown.png
  42. BIN
      src/assets/images/fileIcon/video.png
  43. BIN
      src/assets/images/fileIcon/visio.png
  44. BIN
      src/assets/images/fileIcon/webex.png
  45. BIN
      src/assets/images/fileIcon/word.png
  46. BIN
      src/assets/images/fileIcon/xml.png
  47. BIN
      src/assets/images/fileIcon/zip.png
  48. 7
      src/assets/styles/collect-reorganizi.scss
  49. 1
      src/views/collectReorganizi/collectionLibrary/anjuan/tableList.vue
  50. 64
      src/views/collectReorganizi/collectionLibrary/file/index.vue
  51. 1
      src/views/collectReorganizi/collectionLibrary/juannei/index.vue
  52. 9
      src/views/collectReorganizi/collectionLibrary/module/archivesInfo/index.vue
  53. 77
      src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue
  54. 8
      src/views/collectReorganizi/collectionLibrary/module/collectMoveFile/index.vue
  55. 52
      src/views/collectReorganizi/collectionLibrary/module/fourTest/index.vue
  56. 119
      src/views/collectReorganizi/collectionLibrary/module/fourTestInfo/index.vue
  57. 81
      src/views/collectReorganizi/collectionLibrary/module/handleInfo/index.vue
  58. 54
      src/views/collectReorganizi/collectionLibrary/module/quickPaper/index.vue
  59. 291
      src/views/collectReorganizi/collectionLibrary/module/uploadOriginal/bigUpload.vue
  60. 170
      src/views/collectReorganizi/collectionLibrary/module/uploadOriginal/bigUpload2.vue
  61. 25
      src/views/collectReorganizi/collectionLibrary/module/uploadOriginal/index.vue
  62. 74
      src/views/components/category/PreviewForm.vue
  63. 7
      src/views/prearchiveLibrary/module/batchFile.vue

32
src/api/collect/collect.js

@ -214,6 +214,33 @@ export function FetchCatalogDownload(params) {
})
}
// 预快速组卷
export function FetchPreFastToArchives(params) {
return request({
url: 'api/collect/preFastToArchives',
method: 'get',
params
})
}
// 四性检测
export function FetchFourCheck(data) {
return request({
url: 'api/collect/fourCheck',
method: 'post',
data
})
}
// 归档
export function FetchBecomeDocument(data) {
return request({
url: 'api/collect/becomeDocument',
method: 'post',
data
})
}
export default {
collectAdd,
collectEdit,
@ -235,5 +262,8 @@ export default {
FetchInsertSingle,
FetchMove,
FetchPrintData,
FetchReturnReDocument
FetchReturnReDocument,
FetchPreFastToArchives,
FetchFourCheck,
FetchBecomeDocument
}

90
src/assets/iconfonts/light/iconfont.css

@ -1,8 +1,8 @@
@font-face {
font-family: "iconfont"; /* Project id 3966148 */
src: url('iconfont.woff2?t=1702973796227') format('woff2'),
url('iconfont.woff?t=1702973796227') format('woff'),
url('iconfont.ttf?t=1702973796227') format('truetype');
src: url('iconfont.woff2?t=1704793198243') format('woff2'),
url('iconfont.woff?t=1704793198243') format('woff'),
url('iconfont.ttf?t=1704793198243') format('truetype');
}
.iconfont {
@ -13,6 +13,50 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-gengduo:before {
content: "\e670";
}
.icon-huoqu:before {
content: "\e674";
}
.icon-dayin:before {
content: "\e67b";
}
.icon-guaqi:before {
content: "\e67c";
}
.icon-dangantongji:before {
content: "\e685";
}
.icon-sulan:before {
content: "\e63b";
}
.icon-jiesuan:before {
content: "\e649";
}
.icon-rengongqueren:before {
content: "\e659";
}
.icon-shengchengpandiandan:before {
content: "\e663";
}
.icon-yijiao:before {
content: "\e669";
}
.icon-shanchu1:before {
content: "\e66f";
}
.icon-jiarujieyueche:before {
content: "\e67d";
}
@ -45,22 +89,6 @@
content: "\e684";
}
.icon-shengchengpandiandan:before {
content: "\e67c";
}
.icon-jiesuan:before {
content: "\e67b";
}
.icon-rengongqueren:before {
content: "\e66f";
}
.icon-sulan:before {
content: "\e670";
}
.icon-ruku:before {
content: "\e671";
}
@ -73,10 +101,6 @@
content: "\e673";
}
.icon-huoqu:before {
content: "\e674";
}
.icon-mijijia:before {
content: "\e675";
}
@ -109,10 +133,6 @@
content: "\e668";
}
.icon-shanchu1:before {
content: "\e669";
}
.icon-zishebeiguanli:before {
content: "\e66a";
}
@ -149,10 +169,6 @@
content: "\e662";
}
.icon-yijiao:before {
content: "\e663";
}
.icon-gengduo2:before {
content: "\e661";
}
@ -189,10 +205,6 @@
content: "\e658";
}
.icon-dayin:before {
content: "\e659";
}
.icon-shangchuanshibai:before {
content: "\e65a";
}
@ -261,10 +273,6 @@
content: "\e648";
}
.icon-gengduo:before {
content: "\e649";
}
.icon-fenlei:before {
content: "\e64a";
}
@ -277,10 +285,6 @@
content: "\e643";
}
.icon-guaqi:before {
content: "\e63b";
}
.icon-jihuo:before {
content: "\e63d";
}

2
src/assets/iconfonts/light/iconfont.js
File diff suppressed because it is too large
View File

147
src/assets/iconfonts/light/iconfont.json

@ -5,6 +5,83 @@
"css_prefix_text": "icon-",
"description": "",
"glyphs": [
{
"icon_id": "38782218",
"name": "更多",
"font_class": "gengduo",
"unicode": "e670",
"unicode_decimal": 58992
},
{
"icon_id": "38782217",
"name": "获取",
"font_class": "huoqu",
"unicode": "e674",
"unicode_decimal": 58996
},
{
"icon_id": "38782216",
"name": "打印",
"font_class": "dayin",
"unicode": "e67b",
"unicode_decimal": 59003
},
{
"icon_id": "38782215",
"name": "挂起",
"font_class": "guaqi",
"unicode": "e67c",
"unicode_decimal": 59004
},
{
"icon_id": "38782214",
"name": "档案统计",
"font_class": "dangantongji",
"unicode": "e685",
"unicode_decimal": 59013
},
{
"icon_id": "38782220",
"name": "速览",
"font_class": "sulan",
"unicode": "e63b",
"unicode_decimal": 58939
},
{
"icon_id": "38782223",
"name": "结算",
"font_class": "jiesuan",
"unicode": "e649",
"unicode_decimal": 58953
},
{
"icon_id": "38782224",
"name": "人工确认",
"font_class": "rengongqueren",
"unicode": "e659",
"unicode_decimal": 58969
},
{
"icon_id": "38782222",
"name": "生成盘点单",
"font_class": "shengchengpandiandan",
"unicode": "e663",
"unicode_decimal": 58979
},
{
"icon_id": "38782221",
"name": "移交",
"font_class": "yijiao",
"unicode": "e669",
"unicode_decimal": 58985
},
{
"icon_id": "38782219",
"name": "删除",
"font_class": "shanchu1",
"unicode": "e66f",
"unicode_decimal": 58991
},
{
"icon_id": "38402334",
"name": "加入借阅车",
@ -61,34 +138,6 @@
"unicode": "e684",
"unicode_decimal": 59012
},
{
"icon_id": "38402325",
"name": "生成盘点单",
"font_class": "shengchengpandiandan",
"unicode": "e67c",
"unicode_decimal": 59004
},
{
"icon_id": "38402326",
"name": "结算",
"font_class": "jiesuan",
"unicode": "e67b",
"unicode_decimal": 59003
},
{
"icon_id": "37827794",
"name": "人工确认",
"font_class": "rengongqueren",
"unicode": "e66f",
"unicode_decimal": 58991
},
{
"icon_id": "37827796",
"name": "速览",
"font_class": "sulan",
"unicode": "e670",
"unicode_decimal": 58992
},
{
"icon_id": "37827791",
"name": "入库",
@ -110,13 +159,6 @@
"unicode": "e673",
"unicode_decimal": 58995
},
{
"icon_id": "37827789",
"name": "获取",
"font_class": "huoqu",
"unicode": "e674",
"unicode_decimal": 58996
},
{
"icon_id": "37827788",
"name": "密集架",
@ -173,13 +215,6 @@
"unicode": "e668",
"unicode_decimal": 58984
},
{
"icon_id": "37827799",
"name": "删除",
"font_class": "shanchu1",
"unicode": "e669",
"unicode_decimal": 58985
},
{
"icon_id": "37827800",
"name": "子设备管理",
@ -243,13 +278,6 @@
"unicode": "e662",
"unicode_decimal": 58978
},
{
"icon_id": "37827671",
"name": "移交",
"font_class": "yijiao",
"unicode": "e663",
"unicode_decimal": 58979
},
{
"icon_id": "37728696",
"name": "更多",
@ -313,13 +341,6 @@
"unicode": "e658",
"unicode_decimal": 58968
},
{
"icon_id": "35809402",
"name": "打印",
"font_class": "dayin",
"unicode": "e659",
"unicode_decimal": 58969
},
{
"icon_id": "35809403",
"name": "上传失败",
@ -439,13 +460,6 @@
"unicode": "e648",
"unicode_decimal": 58952
},
{
"icon_id": "35808943",
"name": "更多",
"font_class": "gengduo",
"unicode": "e649",
"unicode_decimal": 58953
},
{
"icon_id": "35808945",
"name": "分类",
@ -467,13 +481,6 @@
"unicode": "e643",
"unicode_decimal": 58947
},
{
"icon_id": "35004711",
"name": "挂起",
"font_class": "guaqi",
"unicode": "e63b",
"unicode_decimal": 58939
},
{
"icon_id": "35004712",
"name": "激活",

BIN
src/assets/iconfonts/light/iconfont.ttf

BIN
src/assets/iconfonts/light/iconfont.woff

BIN
src/assets/iconfonts/light/iconfont.woff2

BIN
src/assets/images/fileIcon/ai.png

After

Width: 32  |  Height: 32  |  Size: 474 B

BIN
src/assets/images/fileIcon/attachment.png

After

Width: 32  |  Height: 32  |  Size: 626 B

BIN
src/assets/images/fileIcon/audio.png

After

Width: 32  |  Height: 32  |  Size: 551 B

BIN
src/assets/images/fileIcon/box_notes.png

After

Width: 32  |  Height: 32  |  Size: 549 B

BIN
src/assets/images/fileIcon/csv.png

After

Width: 32  |  Height: 32  |  Size: 685 B

BIN
src/assets/images/fileIcon/eps.png

After

Width: 32  |  Height: 32  |  Size: 566 B

BIN
src/assets/images/fileIcon/excel.png

After

Width: 32  |  Height: 32  |  Size: 637 B

BIN
src/assets/images/fileIcon/exe.png

After

Width: 32  |  Height: 32  |  Size: 627 B

BIN
src/assets/images/fileIcon/flash.png

After

Width: 32  |  Height: 32  |  Size: 558 B

BIN
src/assets/images/fileIcon/folder.png

After

Width: 32  |  Height: 32  |  Size: 385 B

BIN
src/assets/images/fileIcon/gdoc.png

After

Width: 32  |  Height: 32  |  Size: 486 B

BIN
src/assets/images/fileIcon/gdocs.png

After

Width: 32  |  Height: 32  |  Size: 617 B

BIN
src/assets/images/fileIcon/gform.png

After

Width: 32  |  Height: 32  |  Size: 530 B

BIN
src/assets/images/fileIcon/gpres.png

After

Width: 32  |  Height: 32  |  Size: 515 B

BIN
src/assets/images/fileIcon/gsheet.png

After

Width: 32  |  Height: 32  |  Size: 504 B

BIN
src/assets/images/fileIcon/html.png

After

Width: 32  |  Height: 32  |  Size: 653 B

BIN
src/assets/images/fileIcon/image.png

After

Width: 32  |  Height: 32  |  Size: 555 B

BIN
src/assets/images/fileIcon/keynote.png

After

Width: 32  |  Height: 32  |  Size: 651 B

BIN
src/assets/images/fileIcon/library_folder.png

After

Width: 32  |  Height: 32  |  Size: 636 B

BIN
src/assets/images/fileIcon/link.png

After

Width: 32  |  Height: 32  |  Size: 658 B

BIN
src/assets/images/fileIcon/mp.png

After

Width: 32  |  Height: 32  |  Size: 659 B

BIN
src/assets/images/fileIcon/overlay.png

After

Width: 32  |  Height: 32  |  Size: 492 B

BIN
src/assets/images/fileIcon/pack.png

After

Width: 32  |  Height: 32  |  Size: 532 B

BIN
src/assets/images/fileIcon/pages.png

After

Width: 32  |  Height: 32  |  Size: 637 B

BIN
src/assets/images/fileIcon/pdf.png

After

Width: 32  |  Height: 32  |  Size: 635 B

BIN
src/assets/images/fileIcon/ppt.png

After

Width: 32  |  Height: 32  |  Size: 591 B

BIN
src/assets/images/fileIcon/psd.png

After

Width: 32  |  Height: 32  |  Size: 657 B

BIN
src/assets/images/fileIcon/quip_doc.png

After

Width: 32  |  Height: 32  |  Size: 817 B

BIN
src/assets/images/fileIcon/quip_sheet.png

After

Width: 32  |  Height: 32  |  Size: 821 B

BIN
src/assets/images/fileIcon/rtf.png

After

Width: 32  |  Height: 32  |  Size: 569 B

BIN
src/assets/images/fileIcon/slide.png

After

Width: 32  |  Height: 32  |  Size: 450 B

BIN
src/assets/images/fileIcon/stypi.png

After

Width: 32  |  Height: 32  |  Size: 553 B

BIN
src/assets/images/fileIcon/txt.png

After

Width: 32  |  Height: 32  |  Size: 592 B

BIN
src/assets/images/fileIcon/unknown.png

After

Width: 32  |  Height: 32  |  Size: 379 B

BIN
src/assets/images/fileIcon/video.png

After

Width: 32  |  Height: 32  |  Size: 560 B

BIN
src/assets/images/fileIcon/visio.png

After

Width: 32  |  Height: 32  |  Size: 650 B

BIN
src/assets/images/fileIcon/webex.png

After

Width: 32  |  Height: 32  |  Size: 628 B

BIN
src/assets/images/fileIcon/word.png

After

Width: 32  |  Height: 32  |  Size: 635 B

BIN
src/assets/images/fileIcon/xml.png

After

Width: 32  |  Height: 32  |  Size: 622 B

BIN
src/assets/images/fileIcon/zip.png

After

Width: 32  |  Height: 32  |  Size: 552 B

7
src/assets/styles/collect-reorganizi.scss

@ -58,6 +58,13 @@
}
}
.testSuccess{
color: #07A35A;
}
.testError{
color: #ED4A41;
}
.collect-table{
padding: 0 20px;
}

1
src/views/collectReorganizi/collectionLibrary/anjuan/tableList.vue

@ -195,6 +195,7 @@ export default {
this.$refs.archivesInfo.detailTitle = '文件详情'
this.$refs.archivesInfo.getDetial(3, row.id)
}
this.$refs.archivesInfo.isFourTest = true
this.$refs.archivesInfo.archivesInfoVisible = true
this.$refs.archivesInfo.archivesTabIndex = 0
})

64
src/views/collectReorganizi/collectionLibrary/file/index.vue

@ -30,7 +30,7 @@
>
<el-table-column type="selection" width="55" :reserve-selection="true" align="center" />
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column prop="file_name" label="原文名称" show-overflow-tooltip min-width="140" align="center" />
<el-table-column prop="file_name" label="原文名称" show-overflow-tooltip min-width="140" />
<el-table-column prop="file_type" label="格式" min-width="60" align="center" />
<el-table-column prop="file_size" label="大小" min-width="85" align="center">
<template slot-scope="scope">
@ -43,13 +43,32 @@
<div v-else> {{ scope.row.file_dpi }} </div>
</template>
</el-table-column>
<!-- @click="showCoverPreview(scope.row)" -->
<el-table-column prop="file_thumbnail" label="缩览图" min-width="60" align="center">
<template slot-scope="scope">
<div v-if="scope.row.file_type === 'jpg' || scope.row.file_type === 'jpeg' || scope.row.file_type === 'png' || scope.row.file_type === 'bmp'|| scope.row.file_type === 'gif'">
<img width="60px" height="32px" class="screenshot" :src="baseApi+ '/downloadFile' +scope.row.file_path" :onerror="defaultImg" @click="showCoverPreview(scope.row)">
<i class="fileIcon icon-image" />
</div>
<div v-else-if="scope.row.file_type === 'xlsx' || scope.row.file_type === 'xls'">
<i class="fileIcon icon-excel" />
</div>
<div v-else-if="scope.row.file_type === 'docx' || scope.row.file_type === 'doc'">
<i class="fileIcon icon-word" />
</div>
<div v-else-if="scope.row.file_type === 'pdf'">
<i class="fileIcon icon-pdf" />
</div>
<div v-else-if="scope.row.file_type === 'ppt' || scope.row.file_type === 'pptx'">
<i class="fileIcon icon-ppt" />
</div>
<div v-else-if="scope.row.file_type === 'zip' || scope.row.file_type === 'rar'">
<i class="fileIcon icon-zip" />
</div>
<div v-else-if="scope.row.file_type === 'txt'">
<i class="fileIcon icon-txt" />
</div>
<div v-else>
<svg-icon icon-class="fujian" class-name="svg-style" />
<i class="fileIcon icon-other" />
</div>
</template>
</el-table-column>
@ -214,11 +233,48 @@ export default {
}
}
</script>
<style lang='scss' scoped>
@import "~@/assets/styles/collect-reorganizi.scss";
.svg-style{
width: 60px;
height: 32px;
}
.fileIcon{
display: block;
width: 32px;
height: 32px;
margin: 0 auto;
&.icon-image{
background: url("~@/assets/images/fileIcon/image.png") no-repeat;
background-size: 100% 100%;
}
&.icon-excel{
background: url("~@/assets/images/fileIcon/excel.png") no-repeat;
background-size: 100% 100%;
}
&.icon-pdf{
background: url("~@/assets/images/fileIcon/pdf.png") no-repeat;
background-size: 100% 100%;
}
&.icon-ppt{
background: url("~@/assets/images/fileIcon/ppt.png") no-repeat;
background-size: 100% 100%;
}
&.icon-word{
background: url("~@/assets/images/fileIcon/word.png") no-repeat;
background-size: 100% 100%;
}
&.icon-zip{
background: url("~@/assets/images/fileIcon/zip.png") no-repeat;
background-size: 100% 100%;
}
&.icon-txt{
background: url("~@/assets/images/fileIcon/txt.png") no-repeat;
background-size: 100% 100%;
}
&.icon-other{
background: url("~@/assets/images/fileIcon/attachment.png") no-repeat;
background-size: 100% 100%;
}
}
</style>

1
src/views/collectReorganizi/collectionLibrary/juannei/index.vue

@ -159,6 +159,7 @@ export default {
this.arcId = row.id
this.$nextTick(() => {
this.$refs.archivesInfo.isHasFile = true
this.$refs.archivesInfo.isFourTest = true
this.$refs.archivesInfo.detailTitle = '卷内详情'
this.$refs.archivesInfo.archivesInfoVisible = true
this.$refs.archivesInfo.archivesTabIndex = 0

9
src/views/collectReorganizi/collectionLibrary/module/archivesInfo/index.vue

@ -9,6 +9,8 @@
<li :class="{'active-tab-nav': archivesTabIndex == 0}" @click="changeActiveTab(0)">基本信息</li>
<li v-if="isHasFile" :class="{'active-tab-nav': archivesTabIndex == 1}" @click="changeActiveTab(1)">附件</li>
<li :class="{'active-tab-nav': archivesTabIndex == 2}" @click="changeActiveTab(2)">元数据</li>
<li v-if="isFourTest" :class="{'active-tab-nav': archivesTabIndex == 3}" @click="changeActiveTab(3)">四性检测</li>
<li v-if="isFourTest && isHasFile" :class="{'active-tab-nav': archivesTabIndex == 4}" @click="changeActiveTab(4)">操作记录</li>
</ul>
<!-- 基本信息 -->
<div v-if="archivesTabIndex==0" class="base-info item-content">
@ -29,6 +31,8 @@
</code>
</pre>
</div>
<FourTestInfo v-if="archivesTabIndex==3" />
<HandleInfo v-if="archivesTabIndex==4" />
</div>
</div>
</el-dialog>
@ -38,9 +42,11 @@
import { form } from '@crud/crud'
import { FetchDetailsById, FetchArchivesMetadata } from '@/api/collect/collect'
import UploadFile from '../uploadFile/index'
import FourTestInfo from '../fourTestInfo/index'
import HandleInfo from '../handleInfo/index'
export default {
name: 'ArchivesInfo',
components: { UploadFile },
components: { UploadFile, FourTestInfo, HandleInfo },
mixins: [
form({})
],
@ -62,6 +68,7 @@ export default {
return {
detailTitle: '',
isHasFile: false, // /
isFourTest: false,
isDetailsInfo: false, // 5
archivesInfoVisible: false,
archivesTabIndex: 0,

77
src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue

@ -97,7 +97,7 @@
<el-menu-item-group class="collect-submenu-group">
<el-menu-item v-if="isTitleType !== 6" index="3-1" @click="handleExport">导出</el-menu-item>
<el-menu-item v-if="!(isTitleType === 3 && (selectedCategory.arrangeType === 3 || selectedCategory.arrangeType === 2) && activeIndex === 1) && (isTitleType !== 2 && isTitleType !== 6)" index="3-2" @click="handlePrint">打印</el-menu-item>
<el-menu-item v-if="!(isTitleType === 3 && (selectedCategory.arrangeType === 3 || selectedCategory.arrangeType === 2) && activeIndex === 1) && (isTitleType !== 2 && isTitleType !== 6)" index="3-3" @click="handleFourTest">四性检测</el-menu-item>
<el-menu-item v-if="!(isTitleType === 3 && (selectedCategory.arrangeType === 3 || selectedCategory.arrangeType === 2) && activeIndex === 1) && (isTitleType !== 2 && isTitleType !== 6) && isTitleType !== 4" index="3-3" @click="handleFourTest">四性检测</el-menu-item>
<el-menu-item v-if="isTitleType === 6" index="3-4" @click="handleOriginalDownload">下载</el-menu-item>
</el-menu-item-group>
<el-menu-item-group v-if="!(isTitleType === 3 && (selectedCategory.arrangeType === 3 || selectedCategory.arrangeType === 2) && activeIndex === 1) && (isTitleType !== 2 && isTitleType !== 4 && isTitleType !== 6)" class="collect-submenu-group submenu-tree">
@ -169,6 +169,8 @@
<!-- 原文上传 -->
<UploadOriginal ref="uploadOriginalRef" :selected-category="selectedCategory" :arc-id="arcId" @close-dialog="closeDialog" />
<!-- 大文件上传 -->
<BigUpload ref="uploadBigRef" :selected-category="selectedCategory" :arc-id="arcId" @close-dialog="closeDialog" />
<!-- 批量导入 -->
<BlukImport ref="blukImportRef" :selected-category="selectedCategory" :collect-level="collectLevel" :selections="selections" @close-dialog="closeDialog" />
<!-- 批量修改 -->
@ -186,27 +188,13 @@
<!-- 移动 -->
<CollectMoveFile ref="collectMoveFileRef" :selected-category="selectedCategory" :collect-level="collectLevel" :selections="selections" @close-dialog="closeDialog" />
<!-- 归档 -->
<el-dialog class="tip-dialog" title="归档" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="filingVisible">
<div class="setting-dialog">
<div class="tip-content">
<p class="tipMsg">此操作将会把所选条目提交归档</p>
<span>你是否还要继续?</span>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="filingVisible = false">取消</el-button>
<el-button type="primary" @click.native="handleFilingConfirm">确定</el-button>
</div>
</div>
</el-dialog>
<!-- 打印 -->
<Print ref="printRef" :selected-category="selectedCategory" :collect-level="collectLevel" :selections="selections" @close-dialog="closeDialog" />
<!-- 四性检测 -->
<FourTest ref="fourTestRef" />
<FourTest ref="fourTestRef" :selected-category="selectedCategory" :collect-level="collectLevel" @close-dialog="closeDialog" />
<!-- 快速组卷 -->
<QuickPaper ref="quickPaperRef" />
<QuickPaper ref="quickPaperRef" :selected-category="selectedCategory" :arc-id="arcId" :collect-level="collectLevel" @close-dialog="closeDialog" />
<!-- 回收站 - 恢复 -->
<el-dialog class="tip-dialog" title="提示" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="recoverVisible">
@ -244,7 +232,7 @@
import CRUD, { crud } from '@crud/crud'
import { collectionLibraryCrud } from '../mixins/index'
import { FetchInitCategoryInputFieldByPid } from '@/api/system/category/category'
import { FetchDetailsById, collectDel, FetchRemoveArchivesSingle, FetchDeleteArchivesFile, FetchUpdateArchivesNo, FetchDisbandArchives, FetchReturnReDocument } from '@/api/collect/collect'
import { FetchDetailsById, collectDel, FetchRemoveArchivesSingle, FetchDeleteArchivesFile, FetchUpdateArchivesNo, FetchDisbandArchives, FetchReturnReDocument, FetchBecomeDocument } from '@/api/collect/collect'
import { FetchArchivesClassTree } from '@/api/system/archivesClass'
import { FetchDictionaryTree } from '@/api/system/dict'
import Treeselect from '@riophae/vue-treeselect'
@ -252,6 +240,7 @@ import '@riophae/vue-treeselect/dist/vue-treeselect.css'
// import { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
import PreviewForm from '@/views/components/category/PreviewForm'
import UploadOriginal from './uploadOriginal/index'
import BigUpload from './uploadOriginal/bigUpload'
import BlukImport from './bulkImport/index'
import BlukEditing from './blukEditing/index'
// import FileNumberAdjustment from './fileNumberAdjustment/index'
@ -268,7 +257,7 @@ import { mapGetters } from 'vuex'
export default {
name: 'CollectHeader',
components: { Treeselect, PreviewForm, UploadOriginal, BlukImport, BlukEditing, FileSeqAdjustment, CombineFile, InsertFile, CollectMoveFile, Print, FourTest, QuickPaper },
components: { Treeselect, PreviewForm, UploadOriginal, BigUpload, BlukImport, BlukEditing, FileSeqAdjustment, CombineFile, InsertFile, CollectMoveFile, Print, FourTest, QuickPaper },
mixins: [collectionLibraryCrud, crud()],
props: {
selectedCategory: {
@ -314,11 +303,12 @@ export default {
delAllLoading: false,
deleteVisible: false,
moveVisible: false,
filingVisible: false,
recoverVisible: false,
completelyDeleteVisible: false,
isDesFormType: 'arcives', //
arcId: null
arcId: null,
quickPaper: false,
quickPaperArcId: []
}
},
computed: {
@ -559,7 +549,7 @@ export default {
},
// form - submit
handlerArchivesSubmit() {
this.$refs.previewForm.submitForm('addOrUpdateForm', this.selectedCategory.id,)
this.$refs.previewForm.submitForm('addOrUpdateForm', this.selectedCategory.id, this.quickPaperArcId)
},
// -
handleClose(done) {
@ -684,14 +674,17 @@ export default {
}
if (uploadType === 0) {
this.$refs.uploadOriginalRef.uploadTitle = '普通上传'
this.$refs.uploadOriginalRef.uploadVisible = true
} else if (uploadType === 1) {
this.$refs.uploadOriginalRef.uploadTitle = '大文件上传'
this.$refs.uploadBigRef.uploadBigVisible = true
} else if (uploadType === 2) {
this.$refs.uploadOriginalRef.uploadTitle = '原文目录上传'
this.$refs.uploadOriginalRef.uploadVisible = true
}
if (this.$refs.uploadOriginalRef.uploadVisible) {
this.$refs.uploadOriginalRef.uploadType = uploadType
this.$refs.uploadOriginalRef.fileList = []
}
this.$refs.uploadOriginalRef.uploadVisible = true
this.$refs.uploadOriginalRef.uploadType = uploadType
this.$refs.uploadOriginalRef.fileList = []
},
//
handleBlukImport() {
@ -863,10 +856,32 @@ export default {
this.$message('您还未勾选需要操作的条目,请先确认!')
return false
}
this.filingVisible = true
},
handleFilingConfirm() {
this.filingVisible = false
this.$confirm('此操作将会把所选条目提交归档' + '<span>你是否还要继续?</span>', '提示', {
confirmButtonText: '继续',
cancelButtonText: '取消',
type: 'warning',
dangerouslyUseHTMLString: true
}).then(() => {
const archivesIds = this.selections.map(item => item.id)
const params = {
'categoryId': this.selectedCategory.id,
'categoryLevel': this.collectLevel,
'archivesIds': archivesIds
}
console.log(params)
FetchBecomeDocument(params).then((res) => {
console.log(res)
// if (res.code !== 500) {
// this.crud.notify('', CRUD.NOTIFICATION_TYPE.SUCCESS)
// this.handleSearch(this.collectLevel)
// } else {
// this.crud.notify(res.message, CRUD.NOTIFICATION_TYPE.ERROR)
// }
}).catch(err => {
console.log(err)
})
}).catch(() => {
})
},
// 退
handleReturn() {
@ -991,6 +1006,8 @@ export default {
this.$message('您还未勾选需要操作的条目,请先确认!')
return false
}
this.quickPaper = true
this.quickPaperArcId = this.selections.map(item => item.id)
this.handleForm('add')
},
//

8
src/views/collectReorganizi/collectionLibrary/module/collectMoveFile/index.vue

@ -329,7 +329,7 @@ export default {
<style lang='scss' scoped>
.collectMoveFile-dialog{
::v-deep .el-dialog{
width: 895px;
width: 1000px;
.search-btn-box{
.el-button{
margin-left: 10px;
@ -340,10 +340,11 @@ export default {
.collectMove-main{
display: flex;
justify-content: space-between;
width: 100%;
height: 557px;
border: 1px solid #E6E8ED;
.collectMove-left{
width: 297px;
width: 260px;
overflow: hidden;
overflow-y: scroll;
.elect-cont-left{
@ -355,7 +356,8 @@ export default {
}
}
.collectMove-right{
width: 579px;
width: calc(100% - 260px);
flex: 1;
border-left: 1px solid #E6E8ED;
.head-search{
// padding: 0 20px 0 0;

52
src/views/collectReorganizi/collectionLibrary/module/fourTest/index.vue

@ -5,15 +5,15 @@
<div class="fourTest-container">
<el-table :data="tableData">
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column prop="archive_no" label="档号" width="200" />
<el-table-column prop="maintitle" label="题名" width="160" />
<el-table-column prop="archive_no" label="档号" min-width="220" show-overflow-tooltip />
<el-table-column prop="maintitle" label="题名" width="160" show-overflow-tooltip />
<el-table-column prop="operationType" label="准确性" />
<el-table-column prop="file" label="完整性" />
<el-table-column prop="createDate" label="可用性" />
<el-table-column prop="createDate" label="安全性" />
</el-table>
<!--分页组件-->
<el-pagination
<!-- <el-pagination
:current-page="page.page"
:total="page.total"
:page-size="page.size"
@ -21,7 +21,7 @@
layout="total, prev, pager, next, sizes"
@size-change="handleSizeChange"
@current-change="handleCurrentPage"
/>
/> -->
</div>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="fourTestVisible = false">取消</el-button>
@ -29,14 +29,26 @@
</div>
</div>
</el-dialog>
</template>
<script>
import { FetchFourCheck } from '@/api/collect/collect'
export default {
name: 'FourTest',
components: { },
mixins: [],
props: {
selectedCategory: {
type: Object,
default: function() {
return {}
}
},
collectLevel: {
type: Number,
default: function() {
return null
}
}
},
data() {
return {
fourTestVisible: false,
@ -49,17 +61,31 @@ export default {
}
},
created() {
},
mounted() {
// console.log(this.tableData)
},
methods: {
handleComfireTest() {
this.fourTestVisible = false
this.$message({
message: '已成功加入检测列表!',
type: 'success'
const archivesId = this.tableData.map(item => item.id)
const params = {
'categoryId': this.selectedCategory.id,
'categoryLevel': this.collectLevel,
'archivesIds': archivesId
}
FetchFourCheck(params).then(res => {
console.log(res)
if (res.code !== 500) {
this.$message({
message: '检测成功',
type: 'success'
})
} else {
this.$message({
message: '检测失败',
type: 'success'
})
}
this.fourTestVisible = false
})
},
handleSizeChange(size) {

119
src/views/collectReorganizi/collectionLibrary/module/fourTestInfo/index.vue

@ -0,0 +1,119 @@
<template>
<!--四性检测-档案详情内-->
<div class="fourTest-container">
<el-table :data="tableData">
<el-table-column prop="admin" label="检测人" min-width="60" />
<el-table-column prop="createTime" label="检测时间" min-width="180">
<template slot-scope="scope">
<div>{{ scope.row.createTime | parseTime }}</div>
</template>
</el-table-column>
<el-table-column prop="truth" label="真实性" align="center">
<template slot-scope="scope">
<span v-if="scope.row.truth===1" class="four-icon iconfont icon-zhengque" />
<span v-else class="four-icon iconfont icon-cuowu" />
</template>
</el-table-column>
<el-table-column prop="integrity" label="完整性" align="center">
<template slot-scope="scope">
<span v-if="scope.row.integrity===1" class="four-icon iconfont icon-zhengque" />
<span v-else class="four-icon iconfont icon-cuowu" />
</template>
</el-table-column>
<el-table-column prop="availability" label="可用性" align="center">
<template slot-scope="scope">
<span v-if="scope.row.availability===1" class="four-icon iconfont icon-zhengque" />
<span v-else class="four-icon iconfont icon-cuowu" />
</template>
</el-table-column>
<el-table-column prop="safety" label="安全性" align="center">
<template slot-scope="scope">
<span v-if="scope.row.safety===1" class="four-icon iconfont icon-zhengque" />
<span v-else class="four-icon iconfont icon-cuowu" />
</template>
</el-table-column>
<el-table-column prop="createDate" label="检测结果" min-width="220">
<template slot-scope="scope">
<div>共检测{{ scope.row.totalNum }}<span class="testSuccess">通过{{ scope.row.successNum }}</span><span class="testError">未通过{{ scope.row.errorNum }}</span></div>
</template>
</el-table-column>
</el-table>
<!--分页组件-->
<el-pagination
:current-page="page.page"
:total="page.total"
:page-size="page.size"
:pager-count="5"
layout="total, prev, pager, next, sizes"
@size-change="handleSizeChange"
@current-change="handleCurrentPage"
/>
</div>
</template>
<script>
const data = [
{
'id': '005E76FEC5A2AAB368CA1F',
'admin': 'admin',
'archive_no': 'YXK-2022-JJ-001 ',
'maintitle': '文书档案001',
'createTime': 1660706815000,
'truth': 0,
'integrity': 1,
'availability': 0,
'safety': 0,
'totalNum': 5,
'successNum': 1,
'errorNum': 0
},
{
'id': '005E76FEC5A2AAB368CA1F2',
'admin': 'admin',
'archive_no': 'YXK-2022-JJ-002 ',
'maintitle': '文书档案001',
'createTime': 1660706815000,
'truth': 0,
'integrity': 1,
'availability': 1,
'safety': 0,
'totalNum': 5,
'successNum': 1,
'errorNum': 0
}
]
export default {
name: 'FourTestInfo',
components: { },
mixins: [],
data() {
return {
tableData: [{}, {}],
page: {
page: 1,
size: 10,
total: 0
}
}
},
created() {
},
mounted() {
this.tableData = data
},
methods: {
handleSizeChange(size) {
this.page.size = size
this.page.page = 1
},
handleCurrentPage(val) {
this.page.page = val
}
}
}
</script>
<style lang='scss' scoped>
@import "~@/assets/styles/collect-reorganizi.scss";
</style>

81
src/views/collectReorganizi/collectionLibrary/module/handleInfo/index.vue

@ -0,0 +1,81 @@
<template>
<!--档案详情-操作记录-->
<div class="fourTest-container">
<el-table :data="tableData">
<el-table-column prop="type" label="操作类型" min-width="60" />
<el-table-column prop="isAgree" label="处理意见" min-width="60" />
<el-table-column prop="admin" label="处理人" min-width="60" />
<el-table-column prop="createTime" label="处理时间" min-width="180">
<template slot-scope="scope">
<div>{{ scope.row.createTime | parseTime }}</div>
</template>
</el-table-column>
<el-table-column prop="remark" label="备注" min-width="60" />
</el-table>
<!--分页组件-->
<el-pagination
:current-page="page.page"
:total="page.total"
:page-size="page.size"
:pager-count="5"
layout="total, prev, pager, next, sizes"
@size-change="handleSizeChange"
@current-change="handleCurrentPage"
/>
</div>
</template>
<script>
const data = [
{
'id': '005E76FEC5A2AAB368CA1F',
'admin': 'admin',
'type': '预归档新增',
'isAgree': '同意',
'createTime': 1660706815000,
'remark': ''
},
{
'id': '005E76FEC5A2AAB368CA1F2',
'admin': 'admin',
'type': '装盒',
'isAgree': '拒绝',
'createTime': 1660706815000,
'remark': ''
}
]
export default {
name: 'HandleInfo',
components: { },
mixins: [],
data() {
return {
tableData: [{}, {}],
page: {
page: 1,
size: 10,
total: 0
}
}
},
created() {
},
mounted() {
this.tableData = data
},
methods: {
handleSizeChange(size) {
this.page.size = size
this.page.page = 1
},
handleCurrentPage(val) {
this.page.page = val
}
}
}
</script>
<style lang='scss' scoped>
@import "~@/assets/styles/collect-reorganizi.scss";
</style>

54
src/views/collectReorganizi/collectionLibrary/module/quickPaper/index.vue

@ -27,17 +27,40 @@
</template>
<script>
import { FetchPreFastToArchives } from '@/api/collect/collect'
export default {
name: 'QuickPaper',
components: { },
mixins: [],
inject: ['parentsData'],
props: {
selectedCategory: {
type: Object,
default: function() {
return {}
}
},
arcId: {
type: String,
default: function() {
return ''
}
},
collectLevel: {
type: Number,
default: function() {
return null
}
}
},
data() {
return {
quickVisible: false,
form: {
date: ''
},
searchNumber: 2,
searchNumber: 0,
archivesIds: [],
rules: {
date: [
{ required: true, message: '请选择年月', trigger: 'change' }
@ -62,6 +85,8 @@ export default {
return false
}
this.quickVisible = false
this.form.date = ''
this.searchNumber = 0
this.$nextTick(() => {
this.$parent.handleForm('add')
})
@ -76,6 +101,31 @@ export default {
this.$nextTick(() => {
this.form.date = ''
})
} else {
let parentsId
if (this.selectedCategory.arrangeType === 3) {
parentsId = this.parentsData.parentsProjectId
} else {
parentsId = null
}
const params = {
'categoryId': this.selectedCategory.id,
'date': val,
'parentsId': parentsId
}
FetchPreFastToArchives(params).then(res => {
if (res.length === 0) {
this.searchNumber = 0
this.archivesIds = []
this.$parent.quickPaper = false
this.$parent.quickPaperArcId = []
} else {
this.searchNumber = res.length
this.archivesIds = res
this.$parent.quickPaper = true
this.$parent.quickPaperArcId = res
}
})
}
}
}

291
src/views/collectReorganizi/collectionLibrary/module/uploadOriginal/bigUpload.vue

@ -1,34 +1,54 @@
<template>
<!--上传组件-->
<div class="uploader-big">
<uploader
:auto-start="false"
:options="options"
:file-status-text="fileStatusText"
@file-success="fileSuccess"
@files-added="filesAdded"
@file-progress="onFileProgress"
@file-error="onFileError"
>
<uploader-unsupport />
<uploader-drop>
<p>将文件拖放到此处以上传</p>
<uploader-btn>
<slot>
<i class="iconfont icon-tianjiawenjian upload-icon" />
</slot>
</uploader-btn>
<!-- <uploader-btn :attrs="attrs">选择图片</uploader-btn>
<uploader-btn :directory="true">选择文件夹</uploader-btn> -->
</uploader-drop>
<uploader-files />
</uploader>
<!-- <div class="upload-big-button">
<el-button :disabled="disabled" @click="allStart()">全部开始</el-button>
<el-button @click="allStop()">全部暂停</el-button>
<el-button @click="allRemove()">全部移除</el-button>
</div> -->
</div>
<el-dialog class="big-file" title="大文件上传" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="uploadBigVisible">
<div class="setting-dialog">
<div class="uploader-big">
<uploader
ref="uploader"
:auto-start="false"
:options="options"
:file-status-text="statusText"
@file-success="fileSuccess"
@files-added="filesAdded"
@file-error="onFileError"
>
<uploader-unsupport />
<uploader-drop>
<p>将文件拖到此处或点击上传</p>
<uploader-btn single>
<slot>
<i class="iconfont icon-tianjiawenjian upload-icon" />
</slot>
</uploader-btn>
<div class="el-upload__tip">上传限制文件大小最大10GB/</div>
<!-- <uploader-btn :attrs="attrs">选择图片</uploader-btn>
<uploader-btn :directory="true">选择文件夹</uploader-btn> -->
</uploader-drop>
<!-- <uploader-files /> -->
<ul class="file-list">
<li
v-for="file in fileList"
:key="file.id"
class="file-item"
:class="`file-${file.id}`"
>
<uploader-file
ref="files"
:class="'file_' + file.id"
:file="file"
:list="true"
/>
</li>
</ul>
</uploader>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="handleCloseDialog">取消</el-button>
<el-button type="primary" @click="handleUploadConfirm">保存</el-button>
</div>
</div>
</el-dialog>
</template>
<script>
@ -36,9 +56,8 @@ import { mapGetters } from 'vuex'
import axios from 'axios'
import SparkMD5 from 'spark-md5'
import { getToken } from '@/utils/auth'
// import { archivesUpload } from '@/utils/upload'
import { getCurrentTime } from '@/utils/index'
// https://juejin.cn/post/7040817922540830728
export default {
props: {
selectedCategory: {
@ -56,13 +75,15 @@ export default {
},
data() {
return {
uploadBigVisible: false,
skip: false,
options: {
target: 'http://192.168.99.67:11100/api/collect/upload',
target: '/api/collect/upload',
//
testChunks: true,
// 使 HTTP , POST
uploadMethod: 'post',
testChunks: true, //
// singleFile: true, //
uploadMethod: 'post', // 使 HTTP , POST
allowDuplicateUploads: false, //
parseTimeRemaining: function(timeRemaining, parsedTimeRemaining) {
return parsedTimeRemaining
.replace(/\syears?/, '年')
@ -88,15 +109,16 @@ export default {
accept: 'image/*'
},
//
fileStatusTextObj: {
statusText: {
success: '上传成功',
error: '上传错误',
uploading: '正在上传',
paused: '停止上传',
waiting: '等待中'
error: '上传出错了',
uploading: '上传中...',
paused: '暂停中...',
waiting: '等待中...',
cmd5: '计算文件MD5中...'
},
fileList: [],
disabled: true
nowDate: null
}
},
computed: {
@ -105,20 +127,25 @@ export default {
])
},
methods: {
fileStatusText(status, response) {
if (status === 'md5') {
return '校验MD5'
} else {
return this.fileStatusTextObj[status]
fileSuccess(rootFile, file, response, chunk) {
this.chunkOffset = []
const result = JSON.parse(response)
console.log(result)
//
// if (result.data.needMerge && !this.skip) {
// } else {
// console.log('')
// }
if (this.skip) {
this.skip = false
}
},
fileSuccess(rootFile, file, response, chunk) {
handleUploadConfirm() {
this.nowDate = getCurrentTime()
console.log(this.fileList)
const testList = []
const promiseArray = this.fileList.map(async(item, index) => {
testList.push(item.file)
const filePromises = this.fileList.map(async(item, index) => {
const json = {}
const jsonArray = []
const jsonString = {}
if (item.file.type.substring(0, item.file.type.indexOf('/')) === 'image') {
const fileBase64 = await this.getBase64(item)
const imgRes = await this.getImgPx(fileBase64)
@ -126,88 +153,59 @@ export default {
} else {
item.file.px = ''
}
json.file_name = item.file.name
json.file_size = item.file.size
json.file_type = item.file.name.substring(item.name.lastIndexOf('.') + 1, item.file.name.length)
// json.file_path = res.data.data
json.file_path = ''
json.sequence = null
json.archive_id = this.arcId
json.file_dpi = item.file.px
json.file_thumbnail = ''
json.create_time = this.nowDate
json.id = null
return json
})
const result = JSON.parse(response)
console.log(result)
console.log(result.data)
console.log(result.data.needMerge)
console.log(this.skip)
jsonString.file_name = item.file.name
jsonString.file_size = item.file.size
jsonString.file_type = item.file.name.substring(item.name.lastIndexOf('.') + 1, item.file.name.length)
// jsonString.file_path = res.data.data
jsonString.file_path = ''
jsonString.sequence = null
jsonString.archive_id = this.arcId
jsonString.file_dpi = item.file.px
jsonString.file_thumbnail = ''
jsonString.create_time = this.nowDate
jsonString.id = null
jsonArray.push(jsonString)
Promise.all(promiseArray)
.then((arrayUpload) => {
const fileInfo = {
categoryId: this.selectedCategory.id,
archivesId: this.arcId,
identifier: file.uniqueIdentifier,
filename: file.name,
totalChunks: chunk.offset,
totalSize: file.size,
fileJsonString: JSON.stringify(arrayUpload)
}
console.log('arrayUpload', arrayUpload)
axios.post('http://192.168.99.67:11100/api/collect/merge ', fileInfo, {
headers: {
'Authorization': getToken()
}
}).then((res) => {
console.log(res)
if (res.data.code === 200) {
console.log('上传成功')
json.categoryId = this.selectedCategory.id
json.archivesId = this.arcId
json.identifier = item.uniqueIdentifier
json.filename = item.name
// chunk.offset
json.totalChunks = item.chunks.length - 1
json.totalSize = item.size
json.fileJsonString = JSON.stringify(jsonArray)
return axios.post(this.baseApi + '/api/collect/merge', json, { headers: {
'Authorization': getToken()
}})
})
axios.all(filePromises)
.then(axios.spread((...responses) => {
//
for (const response of responses) {
//
if (response.data.code === 200 && response.data.data !== '') {
this.$message.success('上传成功')
this.$emit('close-dialog')
this.uploadBigVisible = false
this.fileList = []
} else {
console.log(res)
this.$message.error('上传失败')
}
}).catch(function(error) {
console.log(error)
})
})
.catch((error) => {
}
}))
.catch(error => {
console.error(error)
})
//
// if (result.data.needMerge && !this.skip) {
// axios.post('http://192.168.99.67:11100/api/collect/merge ', fileInfo, {
// headers: {
// 'Authorization': getToken()
// }
// }).then((res) => {
// if (res.code === 200) {
// console.log('')
// } else {
// console.log(res)
// }
// }).catch(function(error) {
// console.log(error)
// })
// } else {
// console.log('')
// }
if (this.skip) {
this.skip = false
}
},
onFileError(rootFile, file, message, chunk) {
console.log('上传出错:' + message)
},
//
onFileProgress(rootFile, file, chunk) {
console.log(`上传中 ${file.name},chunk:${chunk.startByte / 1024 / 1024} ~ ${chunk.endByte / 1024 / 1024}`)
this.$message.error('上传出错:' + message)
},
filesAdded(file, fileList, event) {
this.$refs.uploader.files = []
this.$refs.uploader.fileList = []
file.forEach((e) => {
this.fileList = []
this.fileList.push(e)
this.computeMD5(e)
})
@ -269,26 +267,30 @@ export default {
fileReader.readAsArrayBuffer(blobSlice.call(file.file, start, end))
}
},
allStart() {
console.log(this.fileList)
this.fileList.map((e) => {
if (e.paused) {
e.resume()
// base64
getBase64(file) {
const reader = new FileReader()
reader.readAsDataURL(file)
return new Promise((resolve) => {
reader.onload = () => {
resolve(reader.result)
}
})
},
allStop() {
console.log(this.fileList)
this.fileList.map((e) => {
if (!e.paused) {
e.pause()
//
getImgPx(img) {
const image = new Image()
image.src = img
return new Promise((resolve) => {
image.onload = () => {
const width = image.width
const height = image.height
resolve({ width, height })
}
})
},
allRemove() {
this.fileList.map((e) => {
e.cancel()
})
handleCloseDialog(done) {
this.uploadBigVisible = false
this.fileList = []
}
}
@ -307,11 +309,16 @@ export default {
text-align: center;
margin-bottom: 8px;
.uploader-drop{
padding: 20px 0;
display: flex;
flex-direction: column;
justify-content: center;
text-align: center;
height: 180px;
// padding: 20px 0;
border: none;
.uploader-btn{
width: 120px;
margin: 10px 0 0 0;
// width: 120px;
margin: 20px 0 20px 0;
padding: 0;
border: none;
i{
@ -322,6 +329,10 @@ export default {
background-color: transparent;
}
}
.el-upload__tip{
font-size: 12px;
color: #A6ADB6;
}
}
}
.upload-big-button{

170
src/views/collectReorganizi/collectionLibrary/module/uploadOriginal/bigUpload2.vue

@ -1,170 +0,0 @@
<template>
<div>
<!--上传组件-->
<form enctype="multipart/form-data">
<input id="fileInput" type="file" name="fileInput">
<input type="button" value="计算文件MD5" @click="calculateFileMD5()">
<input type="button" value="上传" @click="uploadFile()">
<input type="button" value="检测文件完整性" @click="checkFile()">
</form>
<p>
文件MD5:
<span id="fileMd5" />
</p>
<p>
上传结果:
<span id="uploadResult" />
</p>
<p>
检测文件完整性:
<span id="checkFileRes" />
</p>
</div>
</template>
<script>
import { getToken } from '@/utils/auth'
import { mapGetters } from 'vuex'
import axios from 'axios'
import SparkMD5 from 'spark-md5'
export default {
data() {
return {
chunkSize: 1 * 1024 * 1024,
fileMd5: null
}
},
computed: {
...mapGetters([
'baseApi'
])
},
methods: {
//
calculateFileMD5() {
const fileMd5Span = document.getElementById('fileMd5')
const fileInput = document.getElementById('fileInput')
const file = fileInput.files[0]
console.log('file', file)
this.getFileMd5(file).then((md5) => {
console.log(md5)
console.log(md5._buff)
this.fileMd5 = md5._buff
fileMd5Span.innerHTML = md5._buff
})
},
uploadFile() {
const fileInput = document.getElementById('fileInput')
const file = fileInput.files[0]
console.log(file)
this.getFileMd5(file)
if (!file) return
if (!this.fileMd5) return
//
const fileArr = this.sliceFile(file)
console.log(fileArr)
//
const fileName = file.name
fileArr.forEach((e, i) => {
// formdata
const data = new FormData()
data.append('totalNumber', fileArr.length)
data.append('chunkSize', this.chunkSize)
data.append('chunkNumber', i)
data.append('md5', this.fileMd5)
data.append('file', new File([e], fileName))
this.upload(data)
})
console.log(fileArr)
},
/**
* 计算文件md5值
*/
getFileMd5(file) {
return new Promise((resolve, reject) => {
const fileReader = new FileReader()
const sparkMd5 = new SparkMD5.ArrayBuffer()
console.log('sparkMd5', sparkMd5)
console.log('fileReader', fileReader)
fileReader.onload = function(event) {
console.log(event.target.result)
const fileMd5 = sparkMd5.append(event.target.result)
console.log(fileMd5)
resolve(fileMd5)
}
fileReader.readAsArrayBuffer(file)
})
},
upload(data) {
const uploadResult = document.getElementById('uploadResult')
axios.post(this.baseApi + '/api/collect/uploadBig', data, {
headers: {
'Authorization': getToken()
}
}).then((res) => {
console.log(res)
console.log(data.get('chunkNumber'))
if (res.data.code === 200) {
uploadResult.append('上传成功分片:' + data.get('chunkNumber') + '\t')
} else {
uploadResult.innerHTML = '上传失败'
}
}).catch(function(error) {
console.log(error)
})
},
checkFile() {
var checkFileRes = document.getElementById('checkFileRes')
const data = new FormData()
data.append('md5', this.fileMd5)
axios.post(this.baseApi + '/api/collect/checkFile', data, {
headers: {
'Authorization': getToken()
}
}).then((res) => {
console.log(res)
if (res.data.code === 200) {
checkFileRes.innerHTML = '检测文件完整性成功:' + res
} else {
checkFileRes.innerHTML = '检测文件完整性失败'
}
}).catch(function(error) {
console.log(error)
})
},
sliceFile(file) {
const chunks = []
let start = 0
let end
console.log(this.chunkSize)
while (start < file.size) {
end = Math.min(start + this.chunkSize, file.size)
console.log('end', end)
chunks.push(file.slice(start, end))
console.log('chunks', chunks)
start = end
}
return chunks
}
}
}
</script>
<style lang="scss" scoped>
.upload-demo{
position: relative;
display: flex;
justify-content: center;
width: 120px;
margin: 20px 0 30px 0;
.el-progress{
position: absolute;
left: 0;
bottom: -20px;
}
}
</style>

25
src/views/collectReorganizi/collectionLibrary/module/uploadOriginal/index.vue

@ -1,7 +1,7 @@
<template>
<div>
<!-- 原文上传 -->
<el-dialog :class="[uploadType===1 ? 'big-file': 'fileUpload-dialog']" :title="uploadTitle" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="uploadVisible">
<el-dialog class="fileUpload-dialog" :title="uploadTitle" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="uploadVisible">
<div class="setting-dialog">
<div class="upload-container">
<i v-if="uploadType !== 1 && fileList.length === 0" class="iconfont icon-tianjiawenjian upload-icon" />
@ -16,7 +16,7 @@
</div>
<BigUpload v-else-if="uploadType === 1" :selected-category="selectedCategory" :arc-id="arcId" />
<div v-if="uploadType === 2" class="el-upload__tip">上传限制文件类型zip</div>
<div v-if="uploadType === 1" class="el-upload__tip">上传限制文件大小最大10GB/</div>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="uploadVisible = false">取消</el-button>
@ -61,11 +61,10 @@
// import { FetchAddArchivesFile } from '@/api/collect/collect'
import { getCurrentTime } from '@/utils/index'
import { upload, archivesUpload } from '@/utils/upload'
import BigUpload from './bigUpload'
import { mapGetters } from 'vuex'
export default {
name: 'UploadOriginal',
components: { BigUpload },
components: { },
props: {
selectedCategory: {
type: Object,
@ -124,7 +123,7 @@ export default {
const files = e.target.files
this.file = files[0]
this.key++
const maxMessage = '上传文件大小不能超过 10MB!'
const maxMessage = '上传文件大小不能超过 10MB,可使用大文件上传!'
const maxSize = 10 * 1024 * 1024
if (this.file && this.file.size > maxSize) {
this.$message.warning(maxMessage)
@ -148,7 +147,7 @@ export default {
}
}
},
handleUploadConfirm(bigData) {
handleUploadConfirm() {
if (this.fileList.length === 0) {
this.$message.info('请先选择相关文件!')
return false
@ -166,10 +165,8 @@ export default {
this.$message.error('上传附件失败!')
}
})
} else if (this.uploadType === 0) {
this.uplaodToList(this.fileList)
} else {
this.uplaodToList(bigData)
this.uplaodToList(this.fileList)
}
},
uplaodToList(files) {
@ -206,7 +203,6 @@ export default {
this.arcId,
JSON.stringify(arrayUpload)
).then(res => {
console.log(res)
if (res.data.code === 200) {
this.$message.success(res.data.data)
this.$emit('close-dialog')
@ -226,7 +222,6 @@ export default {
this.fileList.splice(index, 1)
if (this.fileList.length !== 0) {
archivesUpload(this.baseApi + '/api/collect/uploadFiles', this.fileList, this.selectedCategory.id).then(res => {
console.log(res)
if (res.data.code === 200) {
this.filePath = res.data.data
}
@ -329,12 +324,4 @@ export default {
}
}
.big-file{
::v-deep .el-dialog{
width: 636px !important;
.upload-container{
width: 596px;
}
}
}
</style>

74
src/views/components/category/PreviewForm.vue

@ -230,14 +230,6 @@ export default {
},
isDesFormType: function(newValue, oldValue) {
},
// parentsId: {
// handler(newValue, oldValue) {
// console.log(newValue)
// this.setParentsId = newValue
// },
// immediate: true,
// deep: true
// },
formPreviewData: function() {
this.editFormRow()
//
@ -250,10 +242,6 @@ export default {
this.editFormRow()
},
mounted() {
// if (this.isType !== 'arcives') {
// this.FetchNoFormatField(this.selectedCategory.id)
// }
// console.log('parentsId-in', this.parentsData.parentsId)
},
methods: {
checkboxT(row, rowIndex) {
@ -343,7 +331,6 @@ export default {
},
//
handleAuto() {
// console.log('isTableType', this.isTableType)
let string = ''
const getAutoFiledVal = []
this.autoMatic.forEach(async val => {
@ -368,7 +355,6 @@ export default {
await FetchFondsAll().then(res => {
const option = this.getFondsNode(res, this.addOrUpdateForm[val.fieldName])
if (option) {
// console.log('option', option)
const obj = {}
obj.name = val.fieldName
obj.val = option[0].fondsNo + val.connector
@ -429,7 +415,6 @@ export default {
},
//
getAllSubset(item) {
// console.log('item', item)
if (item.mateData === 1) {
this.getFondsDatas(item)
} else if (item.mateData === 2) {
@ -443,9 +428,6 @@ export default {
}
this.isTableType = 3
this.tableTitle = '字典列表'
console.log('this.selectedCategory.arrangeType', this.selectedCategory.arrangeType)
console.log('this.collectLevel', this.collectLevel)
console.log(item.dictionaryId)
if (this.selectedCategory.arrangeType === 3 && this.collectLevel === 2 && item.dictionaryId.dictionaryCode === 'project_class') {
this.getDictsList(item)
} else {
@ -584,10 +566,6 @@ export default {
} else {
this.addOrUpdateForm[this.treeCurrentFiled.fieldName] = val.dictionaryName
}
// console.log('this.treeCurrentFiled.fieldName', this.treeCurrentFiled.fieldName)
// console.log('val', val)
// console.log('val.dictionaryName', val.dictionaryName)
// this.treeName = val.dictionaryName
// - - treeSelect
if (this.treeCurrentFiled.isRepeat) {
let params
@ -611,7 +589,6 @@ export default {
if (this.isDesFormType !== 'prearchiveLibrary' && this.isDesFormType !== 'mergeFile') {
if (this.autoMatic) {
const index = this.autoMatic.findIndex(i => this.treeCurrentFiled.fieldName === i.fieldName)
// console.log('index', index)
if (index !== -1) {
this.handleAuto()
}
@ -629,7 +606,6 @@ export default {
},
// popover - table
handleSelectionChange(val) {
// console.log(val)
if (val.length > 0) {
if (this.isTableType === 1) {
this.addOrUpdateForm[this.currentFieldName] = val[0].fondsNo
@ -745,7 +721,7 @@ export default {
this.formPreviewData[newIndex] = index
}
},
submitForm(formName, categoryId, parentArc) {
submitForm(formName, categoryId, quickPaperArcId) {
//
this.formPreviewData.map(item => {
if (item.isInputClass === 'date') {
@ -774,7 +750,6 @@ export default {
'jsonString': JSON.stringify(this.addOrUpdateForm),
'fileJsonString': this.fileJsonString
}
// console.log('params', params)
prearchEdit(params).then(res => {
if (res) {
this.$message.success(res)
@ -791,7 +766,6 @@ export default {
'categoryId': this.mergeFileCategory,
'jsonString': JSON.stringify(this.addOrUpdateForm)
}
// console.log('params', params)
FetchMergeToFile(params).then(res => {
if (res) {
this.$message.success(res)
@ -802,7 +776,6 @@ export default {
} else {
//
let parentsId = null
console.log('this.isTitleType', this.isTitleType)
// 2 3 / 4 6
if (this.isTitleType === 2) {
parentsId = null
@ -819,24 +792,43 @@ export default {
//
parentsId = this.parentsData.parentsJuanneiId
}
console.log('hhhparentsId', parentsId)
const params = {
'archivesId': this.arcId,
'categoryId': categoryId,
'parentsId': parentsId,
'categoryLevel': this.collectLevel,
'jsonString': JSON.stringify(this.addOrUpdateForm)
let params
if (quickPaperArcId.length !== 0 && this.archivesType === 'add') {
// archivesIds archivesIdthis.arcId = null
params = {
'archivesId': this.arcId,
'archivesIds': quickPaperArcId,
'categoryId': categoryId,
'parentsId': parentsId,
'categoryLevel': 2,
'jsonString': JSON.stringify(this.addOrUpdateForm)
}
} else if (this.selectedCategory.arrangeType === 3 && this.collectLevel === 3 && this.archivesType === 'add') {
// parentsId === null
params = {
'archivesId': this.arcId,
'archivesIds': null,
'categoryId': categoryId,
'parentsId': null,
'categoryLevel': this.collectLevel,
'jsonString': JSON.stringify(this.addOrUpdateForm)
}
} else {
params = {
'archivesId': this.arcId,
'archivesIds': null,
'categoryId': categoryId,
'parentsId': parentsId,
'categoryLevel': this.collectLevel,
'jsonString': JSON.stringify(this.addOrUpdateForm)
}
}
console.log('submitparentsId', this.parentsData.parentsId)
console.log(this.addOrUpdateForm)
console.log(params)
if (this.archivesType === 'add') {
collectAdd(params).then(res => {
if (res.code === 200) {
this.$message.success(res)
this.$emit('close-dialog', parentsId)
// this.crud.refresh()
// this.getCommonData(this.isTitleType, parentsId)
}
})
} else {
@ -844,7 +836,6 @@ export default {
if (res.code === 200) {
this.$message.success(res)
this.$emit('close-dialog', parentsId)
// this.crud.refresh()
}
})
}
@ -907,10 +898,8 @@ export default {
}
const arrayUpload = []
arrayUpload.push(json)
// console.log(arrayUpload)
this.fileOriginal = this.fileNames
this.fileJsonString = JSON.stringify(arrayUpload)
// console.log(this.fileJsonString)
},
// base64
getBase64(file) {
@ -943,7 +932,6 @@ export default {
if (item.isInputClass === 'select') {
this.$set(item, 'options', filteredItems)
} else if (item.isInputClass === 'popover') {
console.log('popover', filteredItems)
this.popoverTableData = filteredItems
this.popoverVisible = true
}

7
src/views/prearchiveLibrary/module/batchFile.vue

@ -346,11 +346,14 @@ export default {
})
},
hanleScopeSelect(val, category) {
console.log('Scopeval', val)
if (val.length !== 0) {
this.scopeSelection = val
this.form.scope = '【' + val[0].scopeCode + '】' + val[0].scopeName
this.form.categoryId = category.id
if (category.arrangeType) {
this.form.categoryId = category.id
} else {
this.form.categoryId = category.pid
}
this.batchCategory = category
this.selectedCategoryName = category.cnName
this.$nextTick(() => {

Loading…
Cancel
Save