xuhuajiao
1 year ago
18 changed files with 3334 additions and 28 deletions
-
77src/assets/styles/archives-manage.scss
-
56src/views/archivesManage/managementLibrary/anjuan/content.vue
-
196src/views/archivesManage/managementLibrary/anjuan/data.json
-
61src/views/archivesManage/managementLibrary/anjuan/index.vue
-
423src/views/archivesManage/managementLibrary/anjuan/table.json
-
265src/views/archivesManage/managementLibrary/anjuan/tableList.vue
-
165src/views/archivesManage/managementLibrary/file/index.vue
-
14src/views/archivesManage/managementLibrary/index.vue
-
250src/views/archivesManage/managementLibrary/juannei/index.vue
-
101src/views/archivesManage/managementLibrary/mixins/index.js
-
126src/views/archivesManage/managementLibrary/module/archivesInfo/data.json
-
284src/views/archivesManage/managementLibrary/module/archivesInfo/index.vue
-
6src/views/archivesManage/managementLibrary/module/archivesInfo/metadata.json
-
458src/views/archivesManage/managementLibrary/module/collectHeader.vue
-
216src/views/archivesManage/managementLibrary/module/print/index.vue
-
147src/views/archivesManage/managementLibrary/module/print/printData.json
-
340src/views/archivesManage/managementLibrary/module/uploadFile/index.vue
-
177src/views/archivesManage/managementLibrary/project/index.vue
@ -0,0 +1,56 @@ |
|||
<template> |
|||
<!-- <div :class="selectedCategory.arrangeType === 1 || isRecycle ? 'collect-no-tab' : ''"> |
|||
<ul v-if="!isRecycle && selectedCategory.arrangeType !== 1" class="tab-nav"> |
|||
<li :class="{ 'active-tab-nav': activeIndex == 0 }" @click="changeActiveTab(0)">已整理<i /></li> |
|||
<li :class="{ 'active-tab-nav': activeIndex == 1 }" @click="changeActiveTab(1)">未整理<i /></li> |
|||
<span class="tab-right-img" /> |
|||
</ul> |
|||
</div> --> |
|||
<TableListMoudle ref="tableList" :is-title-type="isTitleType" :selected-category="selectedCategory" :active-index="activeIndex" :test="test" :is-recycle="isRecycle" /> |
|||
</template> |
|||
|
|||
<script> |
|||
import TableListMoudle from './tableList.vue' |
|||
export default { |
|||
name: 'AnjuanContent', |
|||
components: { TableListMoudle }, |
|||
props: { |
|||
data: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
selectedCategory: { |
|||
type: Object, |
|||
default: function() { |
|||
return {} |
|||
} |
|||
}, |
|||
isRecycle: { |
|||
type: Boolean, |
|||
default: false |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
isTitleType: 3, |
|||
activeIndex: 0, |
|||
test: '' |
|||
} |
|||
}, |
|||
created() { |
|||
}, |
|||
mounted() { |
|||
console.log((!this.isRecycle && this.selectedCategory.arrangeType !== 1)) |
|||
console.log('isRecycle', this.isRecycle) |
|||
console.log('test', this.test) |
|||
}, |
|||
methods: { |
|||
changeActiveTab(data) { |
|||
this.activeIndex = data |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang='scss' scoped> |
|||
</style> |
@ -0,0 +1,196 @@ |
|||
{ |
|||
"code": 200, |
|||
"message": "操作成功", |
|||
"data": { |
|||
"list": { |
|||
"content": [ |
|||
{ |
|||
"case_no": "55C4C594AC879230EA4BF2", |
|||
"responsibleby": "外事处", |
|||
"children_num": 1, |
|||
"record_type": "", |
|||
"tid": "", |
|||
"medium_qty": "15", |
|||
"maintitle": "王晓红出国任务事", |
|||
"document_no": "外(2009)156号", |
|||
"security_class": "绝密", |
|||
"archive_year": 2009, |
|||
"archive_no": "EP02-Y-WS.W-2009-003-001", |
|||
"created_date": "20090506", |
|||
"id": "A3EA6038270136221FE7CE", |
|||
"is_storage": 2, |
|||
"medium_type": "纸张", |
|||
"is_borrow": "" |
|||
}, |
|||
{ |
|||
"case_no": "89EB11A4CC84ED10323373", |
|||
"responsibleby": "二炮党委", |
|||
"children_num": 0, |
|||
"record_type": "会议纪要", |
|||
"tid": "", |
|||
"medium_qty": "4", |
|||
"maintitle": "党委会议纪要", |
|||
"document_no": "党(2009)14号", |
|||
"security_class": "秘密", |
|||
"archive_year": 2009, |
|||
"archive_no": "EP02-Y-WS.W-2009-001-003", |
|||
"created_date": "20090825", |
|||
"id": "ADD6482FEAB400A1888FF7", |
|||
"is_storage": 2, |
|||
"medium_type": "纸张", |
|||
"is_borrow": "" |
|||
}, |
|||
{ |
|||
"case_no": "89EB11A4CC84ED10323373", |
|||
"responsibleby": "二炮党委", |
|||
"children_num": 0, |
|||
"record_type": "命令", |
|||
"tid": "", |
|||
"medium_qty": "2", |
|||
"maintitle": "刘晓庆任职", |
|||
"document_no": "党(2009)1号", |
|||
"security_class": "机密", |
|||
"archive_year": 2009, |
|||
"archive_no": "EP02-Y-WS.W-2009-001-001", |
|||
"created_date": "20090121", |
|||
"id": "32E6B39205296DCBCF92CE", |
|||
"is_storage": 2, |
|||
"medium_type": "纸张", |
|||
"is_borrow": "" |
|||
}, |
|||
{ |
|||
"case_no": "2E759415CCD4ABF7B436DB", |
|||
"responsibleby": "厨师学院", |
|||
"children_num": 0, |
|||
"record_type": "报告", |
|||
"tid": "", |
|||
"medium_qty": "23", |
|||
"maintitle": "烘焙教学计划(附定稿)", |
|||
"document_no": "教(2009)44号", |
|||
"security_class": "机密", |
|||
"archive_year": 2009, |
|||
"archive_no": "EP02-D-WS.W-2009-002-001", |
|||
"created_date": "20090606", |
|||
"id": "A7160DA93F5BA8A45BE012", |
|||
"is_storage": 2, |
|||
"medium_type": "纸张", |
|||
"is_borrow": "" |
|||
}, |
|||
{ |
|||
"case_no": "80F874F102575D1AB813F1", |
|||
"responsibleby": "二炮办公室", |
|||
"children_num": 0, |
|||
"record_type": "报告", |
|||
"tid": "", |
|||
"medium_qty": "18", |
|||
"maintitle": "活动立项报告", |
|||
"document_no": "办(2009)6号", |
|||
"security_class": "机密", |
|||
"archive_year": 2009, |
|||
"archive_no": "EP02-Y-WS.W-2009-002-002", |
|||
"created_date": "20090409", |
|||
"id": "7DACF26D8746C23B6E93B4", |
|||
"is_storage": 2, |
|||
"medium_type": "纸张", |
|||
"is_borrow": "" |
|||
}, |
|||
{ |
|||
"case_no": "4C4EC2D8AA76E915D405C1", |
|||
"responsibleby": "舞蹈中心", |
|||
"children_num": 0, |
|||
"record_type": "请示", |
|||
"tid": "", |
|||
"medium_qty": "13", |
|||
"maintitle": "关于举办街舞比赛的请示", |
|||
"document_no": "乙(2009)156号", |
|||
"security_class": "秘密", |
|||
"archive_year": 2009, |
|||
"archive_no": "EP02-D-WS.W-2009-001-002", |
|||
"created_date": "20090928", |
|||
"id": "F4CA22C9B0F16F3A7E376B", |
|||
"is_storage": 2, |
|||
"medium_type": "纸张", |
|||
"is_borrow": 3 |
|||
}, |
|||
{ |
|||
"case_no": "4C4EC2D8AA76E915D405C1", |
|||
"responsibleby": "活动中心", |
|||
"children_num": 0, |
|||
"record_type": "通知", |
|||
"tid": "", |
|||
"medium_qty": "3", |
|||
"maintitle": "关于游泳教学的安排", |
|||
"document_no": "甲(2009)88号", |
|||
"security_class": "秘密", |
|||
"archive_year": 2009, |
|||
"archive_no": "EP02-D-WS.W-2009-001-001", |
|||
"created_date": "20090423", |
|||
"id": "823D1CA835944822DE13DC", |
|||
"is_storage": 2, |
|||
"medium_type": "纸张", |
|||
"is_borrow": 3 |
|||
}, |
|||
{ |
|||
"case_no": "89EB11A4CC84ED10323373", |
|||
"responsibleby": "二炮党委", |
|||
"children_num": 0, |
|||
"record_type": "通知", |
|||
"tid": "", |
|||
"medium_qty": "4", |
|||
"maintitle": "党委小组成员的通知", |
|||
"document_no": "党(2009)2号", |
|||
"security_class": "绝密", |
|||
"archive_year": 2009, |
|||
"archive_no": "EP02-Y-WS.W-2009-001-002", |
|||
"created_date": "20090730", |
|||
"id": "EEC3B0051F8323D2E1E995", |
|||
"is_storage": 2, |
|||
"medium_type": "纸张", |
|||
"is_borrow": "" |
|||
}, |
|||
{ |
|||
"case_no": "80F874F102575D1AB813F1", |
|||
"responsibleby": "二炮办公室", |
|||
"children_num": 0, |
|||
"record_type": "通知", |
|||
"tid": "", |
|||
"medium_qty": "6", |
|||
"maintitle": "关于举办研讨会的通知", |
|||
"document_no": "办(2009)3号", |
|||
"security_class": "机密", |
|||
"archive_year": 2009, |
|||
"archive_no": "EP02-Y-WS.W-2009-002-001", |
|||
"created_date": "20090217", |
|||
"id": "82D732D81CD0AEDA38B901", |
|||
"is_storage": 2, |
|||
"medium_type": "纸张", |
|||
"is_borrow": "" |
|||
}, |
|||
{ |
|||
"case_no": "793B68E6BBE52FE32C819A", |
|||
"responsibleby": "安定诊所", |
|||
"children_num": 0, |
|||
"record_type": "决定", |
|||
"tid": "E28011C1200013C2C41E0317", |
|||
"medium_qty": "55", |
|||
"maintitle": "关于心理健康测试", |
|||
"document_no": "心(2023)1号", |
|||
"security_class": "机密", |
|||
"archive_year": 2023, |
|||
"archive_no": "JJ0001-Y-WS.W-2023-002-001", |
|||
"created_date": "20230912", |
|||
"id": "6A27E658D2A454E5BD7BC9", |
|||
"is_storage": 2, |
|||
"medium_type": "纸张", |
|||
"is_borrow": "" |
|||
} |
|||
], |
|||
"totalElements": 19 |
|||
}, |
|||
"yearGroup": [ |
|||
2009, |
|||
2023 |
|||
] |
|||
}, |
|||
"timestamp": 1699508523265 |
|||
} |
@ -0,0 +1,61 @@ |
|||
<template> |
|||
<div> |
|||
<AnjuanContent v-if="selectedCategory.arrangeType === 1 || selectedCategory.arrangeType === 2" ref="ajContent" class="ajContent" :selected-category="selectedCategory" :is-recycle="isRecycle" /> |
|||
<el-drawer |
|||
v-else |
|||
class="anjuan-drawer management-drawer" |
|||
:with-header="false" |
|||
:visible.sync="anjuanDrawer" |
|||
:modal="false" |
|||
:wrapper-closable="true" |
|||
:show-close="false" |
|||
direction="rtl" |
|||
size="90%" |
|||
> |
|||
<AnjuanContent ref="ajContent" :selected-category="selectedCategory" :is-recycle="isRecycle" /> |
|||
<span class="closed-btn" @click="closeDrawer" /> |
|||
</el-drawer> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import AnjuanContent from './content' |
|||
export default { |
|||
name: 'Anjuan', |
|||
components: { AnjuanContent }, |
|||
props: { |
|||
data: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
selectedCategory: { |
|||
type: Object, |
|||
default: function() { |
|||
return {} |
|||
} |
|||
}, |
|||
isRecycle: { |
|||
type: Boolean, |
|||
default: false |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
anjuanDrawer: false |
|||
} |
|||
}, |
|||
created() { |
|||
}, |
|||
mounted() { |
|||
console.log('nei', this.selectedCategory.arrangeType) |
|||
}, |
|||
methods: { |
|||
closeDrawer() { |
|||
this.anjuanDrawer = false |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang='scss' scoped> |
|||
</style> |
@ -0,0 +1,423 @@ |
|||
{ |
|||
"code": 200, |
|||
"message": "操作成功", |
|||
"data": [ |
|||
{ |
|||
"id": "30DB3BCF12385446529650", |
|||
"categoryId": "CD135F6A77018CE04D4FDB", |
|||
"dictionaryConfigId": null, |
|||
"fieldName": "archive_year", |
|||
"fieldCnName": "年度", |
|||
"isDefaultValue": "", |
|||
"isInputClass": "number", |
|||
"isDataType": 2, |
|||
"isDataTypeDetails": "int", |
|||
"isColumnLength": 4, |
|||
"isColumnType": 2, |
|||
"isSequence": 4, |
|||
"isType": 2, |
|||
"isSystem": true, |
|||
"isLine": null, |
|||
"isInput": true, |
|||
"isRequired": null, |
|||
"isAutomatic": null, |
|||
"isAdd": null, |
|||
"isSearch": null, |
|||
"isInherit": null, |
|||
"isFilling": null, |
|||
"fillingDigit": null, |
|||
"isRepeat": null, |
|||
"isDisplay": true, |
|||
"displayOrder": 1, |
|||
"displayOrderBy": null, |
|||
"isDisplayformat": true, |
|||
"displayformatType": "center", |
|||
"editLength": 196, |
|||
"displayLength": 100, |
|||
"queue": null, |
|||
"create_by": "admin", |
|||
"update_by": "admin", |
|||
"create_time": 1687319124000, |
|||
"update_time": 1688020491000 |
|||
}, |
|||
{ |
|||
"id": "50F80A0A1B0CA8A8B6014F", |
|||
"categoryId": "CD135F6A77018CE04D4FDB", |
|||
"dictionaryConfigId": { |
|||
"id": "7E7698E42FE1968BE5D250", |
|||
"dicName": "文种", |
|||
"dicCode": "WZ", |
|||
"dicExplain": null, |
|||
"dicSequence": 4, |
|||
"dicType": true, |
|||
"dicPid": null, |
|||
"create_by": "admin", |
|||
"update_by": "admin", |
|||
"create_time": 1656924056000, |
|||
"update_time": 1656924056000 |
|||
}, |
|||
"fieldName": "record_type", |
|||
"fieldCnName": "文种", |
|||
"isDefaultValue": "", |
|||
"isInputClass": "select", |
|||
"isDataType": 1, |
|||
"isDataTypeDetails": "varchar", |
|||
"isColumnLength": 100, |
|||
"isColumnType": 2, |
|||
"isSequence": 10, |
|||
"isType": 2, |
|||
"isSystem": true, |
|||
"isLine": false, |
|||
"isInput": true, |
|||
"isRequired": false, |
|||
"isAutomatic": false, |
|||
"isAdd": null, |
|||
"isSearch": null, |
|||
"isInherit": null, |
|||
"isFilling": false, |
|||
"fillingDigit": null, |
|||
"isRepeat": null, |
|||
"isDisplay": true, |
|||
"displayOrder": 2, |
|||
"displayOrderBy": null, |
|||
"isDisplayformat": null, |
|||
"displayformatType": "center", |
|||
"editLength": 196, |
|||
"displayLength": 100, |
|||
"queue": null, |
|||
"create_by": "admin", |
|||
"update_by": "admin", |
|||
"create_time": 1687319124000, |
|||
"update_time": 1694593124000 |
|||
}, |
|||
{ |
|||
"id": "990ADEA3C47ACCC7B2AF23", |
|||
"categoryId": "CD135F6A77018CE04D4FDB", |
|||
"dictionaryConfigId": null, |
|||
"fieldName": "archive_no", |
|||
"fieldCnName": "档号", |
|||
"isDefaultValue": "", |
|||
"isInputClass": "text", |
|||
"isDataType": 1, |
|||
"isDataTypeDetails": "varchar", |
|||
"isColumnLength": 200, |
|||
"isColumnType": 2, |
|||
"isSequence": 7, |
|||
"isType": 2, |
|||
"isSystem": true, |
|||
"isLine": true, |
|||
"isInput": true, |
|||
"isRequired": false, |
|||
"isAutomatic": true, |
|||
"isAdd": null, |
|||
"isSearch": null, |
|||
"isInherit": null, |
|||
"isFilling": false, |
|||
"fillingDigit": null, |
|||
"isRepeat": null, |
|||
"isDisplay": true, |
|||
"displayOrder": 3, |
|||
"displayOrderBy": "asc", |
|||
"isDisplayformat": null, |
|||
"displayformatType": "left", |
|||
"editLength": 510, |
|||
"displayLength": 220, |
|||
"queue": 1, |
|||
"create_by": "admin", |
|||
"update_by": "admin", |
|||
"create_time": 1687319124000, |
|||
"update_time": 1697441837000 |
|||
}, |
|||
{ |
|||
"id": "C7BDD315FA406EDBAEC997", |
|||
"categoryId": "CD135F6A77018CE04D4FDB", |
|||
"dictionaryConfigId": null, |
|||
"fieldName": "maintitle", |
|||
"fieldCnName": "题名", |
|||
"isDefaultValue": "", |
|||
"isInputClass": "text", |
|||
"isDataType": 1, |
|||
"isDataTypeDetails": "varchar", |
|||
"isColumnLength": 1000, |
|||
"isColumnType": 2, |
|||
"isSequence": 11, |
|||
"isType": 2, |
|||
"isSystem": true, |
|||
"isLine": true, |
|||
"isInput": true, |
|||
"isRequired": false, |
|||
"isAutomatic": false, |
|||
"isAdd": null, |
|||
"isSearch": null, |
|||
"isInherit": null, |
|||
"isFilling": false, |
|||
"fillingDigit": null, |
|||
"isRepeat": null, |
|||
"isDisplay": true, |
|||
"displayOrder": 4, |
|||
"displayOrderBy": null, |
|||
"isDisplayformat": null, |
|||
"displayformatType": "left", |
|||
"editLength": 510, |
|||
"displayLength": 300, |
|||
"queue": null, |
|||
"create_by": "admin", |
|||
"update_by": "admin", |
|||
"create_time": 1687319124000, |
|||
"update_time": 1697441826000 |
|||
}, |
|||
{ |
|||
"id": "060393A0360E74A9FDB5C2", |
|||
"categoryId": "CD135F6A77018CE04D4FDB", |
|||
"dictionaryConfigId": null, |
|||
"fieldName": "document_no", |
|||
"fieldCnName": "文件编号", |
|||
"isDefaultValue": "", |
|||
"isInputClass": "text", |
|||
"isDataType": 1, |
|||
"isDataTypeDetails": "varchar", |
|||
"isColumnLength": 100, |
|||
"isColumnType": 2, |
|||
"isSequence": 8, |
|||
"isType": 2, |
|||
"isSystem": true, |
|||
"isLine": null, |
|||
"isInput": true, |
|||
"isRequired": null, |
|||
"isAutomatic": null, |
|||
"isAdd": null, |
|||
"isSearch": null, |
|||
"isInherit": null, |
|||
"isFilling": null, |
|||
"fillingDigit": null, |
|||
"isRepeat": null, |
|||
"isDisplay": true, |
|||
"displayOrder": 5, |
|||
"displayOrderBy": null, |
|||
"isDisplayformat": null, |
|||
"displayformatType": "center", |
|||
"editLength": 196, |
|||
"displayLength": 100, |
|||
"queue": null, |
|||
"create_by": "admin", |
|||
"update_by": "admin", |
|||
"create_time": 1687319124000, |
|||
"update_time": 1694593391000 |
|||
}, |
|||
{ |
|||
"id": "3E391423CA83E1FC84742B", |
|||
"categoryId": "CD135F6A77018CE04D4FDB", |
|||
"dictionaryConfigId": { |
|||
"id": "8984F55841E2D541C23318", |
|||
"dicName": "密级", |
|||
"dicCode": "Search_MJ", |
|||
"dicExplain": null, |
|||
"dicSequence": 2, |
|||
"dicType": true, |
|||
"dicPid": null, |
|||
"create_by": "admin", |
|||
"update_by": "admin", |
|||
"create_time": 1656921207000, |
|||
"update_time": 1656991705000 |
|||
}, |
|||
"fieldName": "security_class", |
|||
"fieldCnName": "密级", |
|||
"isDefaultValue": "", |
|||
"isInputClass": "select", |
|||
"isDataType": 1, |
|||
"isDataTypeDetails": "varchar", |
|||
"isColumnLength": 10, |
|||
"isColumnType": 2, |
|||
"isSequence": 9, |
|||
"isType": 2, |
|||
"isSystem": true, |
|||
"isLine": false, |
|||
"isInput": true, |
|||
"isRequired": false, |
|||
"isAutomatic": false, |
|||
"isAdd": null, |
|||
"isSearch": null, |
|||
"isInherit": null, |
|||
"isFilling": false, |
|||
"fillingDigit": null, |
|||
"isRepeat": null, |
|||
"isDisplay": true, |
|||
"displayOrder": 6, |
|||
"displayOrderBy": null, |
|||
"isDisplayformat": null, |
|||
"displayformatType": "center", |
|||
"editLength": 196, |
|||
"displayLength": 100, |
|||
"queue": null, |
|||
"create_by": "admin", |
|||
"update_by": "admin", |
|||
"create_time": 1687319124000, |
|||
"update_time": 1694595044000 |
|||
}, |
|||
{ |
|||
"id": "D64ADF5B88DB96FBBF46CD", |
|||
"categoryId": "CD135F6A77018CE04D4FDB", |
|||
"dictionaryConfigId": null, |
|||
"fieldName": "responsibleby", |
|||
"fieldCnName": "责任者", |
|||
"isDefaultValue": "", |
|||
"isInputClass": "text", |
|||
"isDataType": 1, |
|||
"isDataTypeDetails": "varchar", |
|||
"isColumnLength": 100, |
|||
"isColumnType": 2, |
|||
"isSequence": 13, |
|||
"isType": 2, |
|||
"isSystem": true, |
|||
"isLine": null, |
|||
"isInput": true, |
|||
"isRequired": null, |
|||
"isAutomatic": null, |
|||
"isAdd": null, |
|||
"isSearch": null, |
|||
"isInherit": null, |
|||
"isFilling": null, |
|||
"fillingDigit": null, |
|||
"isRepeat": null, |
|||
"isDisplay": true, |
|||
"displayOrder": 7, |
|||
"displayOrderBy": null, |
|||
"isDisplayformat": null, |
|||
"displayformatType": "center", |
|||
"editLength": 196, |
|||
"displayLength": 150, |
|||
"queue": null, |
|||
"create_by": "admin", |
|||
"update_by": "admin", |
|||
"create_time": 1687319124000, |
|||
"update_time": 1694595044000 |
|||
}, |
|||
{ |
|||
"id": "043AC3E1CAFAD3AC9EF9CF", |
|||
"categoryId": "CD135F6A77018CE04D4FDB", |
|||
"dictionaryConfigId": null, |
|||
"fieldName": "created_date", |
|||
"fieldCnName": "成文日期", |
|||
"isDefaultValue": "", |
|||
"isInputClass": "text", |
|||
"isDataType": 1, |
|||
"isDataTypeDetails": "varchar", |
|||
"isColumnLength": 20, |
|||
"isColumnType": 2, |
|||
"isSequence": 14, |
|||
"isType": 2, |
|||
"isSystem": true, |
|||
"isLine": null, |
|||
"isInput": true, |
|||
"isRequired": null, |
|||
"isAutomatic": null, |
|||
"isAdd": null, |
|||
"isSearch": null, |
|||
"isInherit": null, |
|||
"isFilling": null, |
|||
"fillingDigit": null, |
|||
"isRepeat": null, |
|||
"isDisplay": true, |
|||
"displayOrder": 8, |
|||
"displayOrderBy": null, |
|||
"isDisplayformat": null, |
|||
"displayformatType": "center", |
|||
"editLength": 196, |
|||
"displayLength": 150, |
|||
"queue": null, |
|||
"create_by": "admin", |
|||
"update_by": "admin", |
|||
"create_time": 1687319124000, |
|||
"update_time": 1694595044000 |
|||
}, |
|||
{ |
|||
"id": "CAA0014CD5B2B3391A2BA2", |
|||
"categoryId": "CD135F6A77018CE04D4FDB", |
|||
"dictionaryConfigId": { |
|||
"id": "F086B262FFFA6CFB5302F7", |
|||
"dicName": "载体类型", |
|||
"dicCode": "ZT", |
|||
"dicExplain": null, |
|||
"dicSequence": 5, |
|||
"dicType": true, |
|||
"dicPid": null, |
|||
"create_by": "admin", |
|||
"update_by": "admin", |
|||
"create_time": 1656924405000, |
|||
"update_time": 1656924405000 |
|||
}, |
|||
"fieldName": "medium_type", |
|||
"fieldCnName": "载体类型", |
|||
"isDefaultValue": "", |
|||
"isInputClass": "select", |
|||
"isDataType": 1, |
|||
"isDataTypeDetails": "varchar", |
|||
"isColumnLength": 100, |
|||
"isColumnType": 2, |
|||
"isSequence": 15, |
|||
"isType": 2, |
|||
"isSystem": true, |
|||
"isLine": false, |
|||
"isInput": true, |
|||
"isRequired": false, |
|||
"isAutomatic": false, |
|||
"isAdd": null, |
|||
"isSearch": null, |
|||
"isInherit": null, |
|||
"isFilling": false, |
|||
"fillingDigit": null, |
|||
"isRepeat": null, |
|||
"isDisplay": true, |
|||
"displayOrder": 9, |
|||
"displayOrderBy": null, |
|||
"isDisplayformat": null, |
|||
"displayformatType": "center", |
|||
"editLength": 196, |
|||
"displayLength": 100, |
|||
"queue": null, |
|||
"create_by": "admin", |
|||
"update_by": "admin", |
|||
"create_time": 1687319124000, |
|||
"update_time": 1694595044000 |
|||
}, |
|||
{ |
|||
"id": "0A25604BC11085250BA643", |
|||
"categoryId": "CD135F6A77018CE04D4FDB", |
|||
"dictionaryConfigId": null, |
|||
"fieldName": "medium_qty", |
|||
"fieldCnName": "载体数量", |
|||
"isDefaultValue": "", |
|||
"isInputClass": "text", |
|||
"isDataType": 1, |
|||
"isDataTypeDetails": "varchar", |
|||
"isColumnLength": 20, |
|||
"isColumnType": 2, |
|||
"isSequence": 16, |
|||
"isType": 2, |
|||
"isSystem": true, |
|||
"isLine": null, |
|||
"isInput": true, |
|||
"isRequired": null, |
|||
"isAutomatic": null, |
|||
"isAdd": null, |
|||
"isSearch": null, |
|||
"isInherit": null, |
|||
"isFilling": null, |
|||
"fillingDigit": null, |
|||
"isRepeat": null, |
|||
"isDisplay": true, |
|||
"displayOrder": 10, |
|||
"displayOrderBy": null, |
|||
"isDisplayformat": null, |
|||
"displayformatType": "right", |
|||
"editLength": 196, |
|||
"displayLength": 100, |
|||
"queue": null, |
|||
"create_by": "admin", |
|||
"update_by": "admin", |
|||
"create_time": 1687319124000, |
|||
"update_time": 1694595013000 |
|||
} |
|||
], |
|||
"timestamp": 1699508522805 |
|||
} |
@ -0,0 +1,265 @@ |
|||
<template> |
|||
<div> |
|||
<CollectHeader :is-title-type="isTitleType" :selected-category="selectedCategory" :arc-id="arcId" :selections="selections" :test="test" :is-recycle="isRecycle" @status-bar-checked-changed="handleStatusBarCheckedChanged" /> |
|||
<!-- <div v-if="!isRecycle" class="mangement-fixed-top"> |
|||
<el-checkbox v-model="fixedStatusBar" @change="updateStatusBarChecked">隐藏状态栏</el-checkbox> |
|||
</div> --> |
|||
<el-table |
|||
ref="table" |
|||
v-loading="getTableDisplayFieldsLoading" |
|||
class="archives-table" |
|||
:data="anjuanData" |
|||
highlight-current-row |
|||
style="width: 100%;" |
|||
:row-class-name="tableRowClassName" |
|||
:row-key="rowKey" |
|||
@select-all="selectAll" |
|||
@selection-change="crud.selectionChangeHandler" |
|||
@row-click="clickRowHandler" |
|||
@cell-dblclick="tableDoubleClick" |
|||
@select="handleCurrentChange" |
|||
> |
|||
<el-table-column type="selection" :reserve-selection="true" width="55" align="center" /> |
|||
<el-table-column type="index" label="序号" width="55" align="center" /> |
|||
<el-table-column :label="selectedCategory.arrangeType === 1 ? '原文':'卷内'" prop="children_num" width="55" align="center" /> |
|||
<el-table-column v-for="field in tableDisplayFields" :key="field.id" :label="field.fieldCnName" :align="field.displayformatType" :width="field.displayLength" show-overflow-tooltip> |
|||
<template slot="header"> |
|||
<el-tooltip |
|||
class="item" |
|||
effect="dark" |
|||
:content="field.fieldCnName" |
|||
placement="top-start" |
|||
> |
|||
<span>{{ field.fieldCnName }}</span> |
|||
</el-tooltip> |
|||
</template> |
|||
<template slot-scope="scope"> |
|||
{{ scope.row[field.fieldName] }} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column v-if="!isRecycle" label="实体" width="88" align="center" :fixed="fixedStatusBar ? false : 'right' "> |
|||
<!-- slot-scope="scope" --> |
|||
<template> |
|||
<span class="row-state row-physical state-active">有</span> |
|||
<!-- <span :class="['row-state', 'row-physical', scope.row.tid ? 'state-active' : '' ]">{{ scope.row.tid ? '有': '无' }}</span> --> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column v-if="!isRecycle" label="标签" width="88" align="center" :fixed="fixedStatusBar ? false : 'right' "> |
|||
<template> |
|||
<span class="row-state row-binding state-active">未绑</span> |
|||
<!-- 未绑 / 已绑 --> |
|||
<!-- <span :class="['row-state', 'row-binding', scope.row.tid ? 'state-active' : '' ]">{{ scope.row.tid ? '已绑': '未绑' }}</span> --> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column v-if="!isRecycle" label="装盒" width="88" align="center" :fixed="fixedStatusBar ? false : 'right' "> |
|||
<!-- state-active 已装/已入/已借/已绑 --> |
|||
<template> |
|||
<!-- 未装 / 已装 --> |
|||
<span class="row-state row-packing state-active">已装</span> |
|||
<!-- <span :class="['row-state', 'row-packing', scope.row.case_no ? 'state-active' : '' ]">{{ scope.row.case_no ? '已装': '未装' }}</span> --> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column v-if="!isRecycle" label="入库" width="88" align="center" :fixed="fixedStatusBar ? false : 'right' "> |
|||
<template> |
|||
<span class="row-state row-warehousing state-active">已入</span> |
|||
<!-- is_storage 为空的情况下即没装盒 / 0 未入 / 1 待入 / 2 已入 / 3 待出--> |
|||
<!-- <span :class="['row-state', 'row-warehousing', (storageTxt[scope.$index] === '已入' )? 'state-active' : '' ]">{{ storageTxt[scope.$index] }}</span> --> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column v-if="!isRecycle" label="借阅" width="88" align="center" :fixed="fixedStatusBar ? false : 'right' "> |
|||
<template> |
|||
<span class="row-state row-lending state-active">已借</span> |
|||
<!-- is_borrow 4 已归还 / 为空 - 未加入待借列表 - 在库 / 2 待借阅(在待借列表/借出确认列表) - 待借 / 1待登记 - 不可借-用“—” 表示 / 3 待归还 - 已借 --> |
|||
<!-- <span :class="['row-state', 'row-lending', (borrowTxt[scope.$index] === '已借' )? 'state-active' : '' ]">{{ borrowTxt[scope.$index] }}</span> --> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!--分页组件--> |
|||
<el-pagination |
|||
v-if="anjuanData.length !== 0" |
|||
: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" |
|||
/> |
|||
<!-- 档案详情 --> |
|||
<ArchivesInfo ref="archivesInfo" :category-id="categoryId" :arc-id="arcId" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { header, form } from '@crud/crud' |
|||
import { collectionLibraryCrud } from '../mixins/index' |
|||
import ArchivesInfo from '../module/archivesInfo/index' |
|||
import CollectHeader from '../module/collectHeader' |
|||
|
|||
import tableData from './table.json' |
|||
import jsonData from './data.json' |
|||
|
|||
export default { |
|||
name: 'Sorted', |
|||
components: { ArchivesInfo, CollectHeader }, |
|||
mixins: [ |
|||
header(), |
|||
form({}), |
|||
collectionLibraryCrud |
|||
], |
|||
props: { |
|||
isTitleType: { |
|||
type: Number, |
|||
default: 3 |
|||
}, |
|||
selectedCategory: { |
|||
type: Object, |
|||
default: function() { |
|||
return {} |
|||
} |
|||
}, |
|||
test: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
isRecycle: { |
|||
type: Boolean, |
|||
default: false |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
categoryId: 'F0F59CC713C83AE4BAB99B', |
|||
arcId: '256E752BC0280618840600' |
|||
} |
|||
}, |
|||
watch: { |
|||
selectedCategory: function(newValue, oldValue) { |
|||
this.selections = [] |
|||
this.$refs.table.clearSelection() |
|||
}, |
|||
tableDisplayFields(val) { |
|||
this.doLayout() |
|||
} |
|||
}, |
|||
created() { |
|||
this.tableDisplayFields = tableData.data |
|||
this.anjuanData = jsonData.data.list.content |
|||
}, |
|||
mounted() { |
|||
// this.fixedStatusBar = JSON.parse(localStorage.getItem('statusBarFixedType')) === true |
|||
console.log(this.fixedStatusBar) |
|||
}, |
|||
methods: { |
|||
handleStatusBarCheckedChanged(statusBarChecked) { |
|||
console.log('父组件获取到子组件状态:', statusBarChecked) |
|||
this.fixedStatusBar = statusBarChecked |
|||
// 在这里可以处理获取到的状态 |
|||
}, |
|||
getCommonData(type) { |
|||
this.getViewTable(type) |
|||
}, |
|||
rowKey(row) { |
|||
return row.id |
|||
}, |
|||
openJuannei(data) { |
|||
console.log('arrangeType', this.selectedCategory.arrangeType) |
|||
// this.$emit('openJuannei', '这是来自案卷的通知') |
|||
if (this.selectedCategory.arrangeType === 3) { |
|||
this.$parent.$parent.$parent.$emit('openJuannei', data) |
|||
} else { |
|||
this.$parent.$parent.$emit('openJuannei', data) |
|||
} |
|||
}, |
|||
// table选中加上选中状态 |
|||
tableRowClassName({ row, rowIndex }) { |
|||
// console.log('添加类名', row, rowIndex) |
|||
let color = '' |
|||
this.selections.forEach(item => { |
|||
if (item.id === row.id) { |
|||
color = 'rowStyle' |
|||
} |
|||
}) |
|||
return color |
|||
}, |
|||
// table - 全选 |
|||
selectAll(val) { |
|||
this.selections = val |
|||
}, |
|||
// table - 双击查看详情 |
|||
tableDoubleClick(row) { |
|||
if (this.timer) { |
|||
clearTimeout(this.timer) |
|||
} |
|||
console.log('tableDoubleClick', row) |
|||
this.arcId = row.id |
|||
|
|||
if (this.selectedCategory.arrangeType !== 1) { |
|||
this.$refs.archivesInfo.isHasFile = false |
|||
this.$refs.archivesInfo.detailTitle = '案卷详情' |
|||
// if (this.activeIndex === 1) { |
|||
// this.$refs.archivesInfo.detailTitle = '文件详情' |
|||
// this.$refs.archivesInfo.isHasFile = true |
|||
// } else { |
|||
// this.$refs.archivesInfo.detailTitle = '案卷详情' |
|||
// } |
|||
} else { |
|||
this.$refs.archivesInfo.isHasFile = true |
|||
this.$refs.archivesInfo.detailTitle = '文件详情' |
|||
} |
|||
this.$refs.archivesInfo.archivesInfoVisible = true |
|||
this.$refs.archivesInfo.archivesTabIndex = 0 |
|||
// this.$refs.archivesInfo.getDetial(row.id) |
|||
}, |
|||
// table - 当前选中得row |
|||
clickRowHandler(row) { |
|||
console.log('clickRowHandler', row) |
|||
if (this.timer) { |
|||
clearTimeout(this.timer) |
|||
} |
|||
this.timer = setTimeout(() => { |
|||
this.openJuannei(row.archive_no) |
|||
}, 300) |
|||
this.selections = this.crud.selections |
|||
}, |
|||
// 触发单选 |
|||
handleCurrentChange(selection, row) { |
|||
console.log('触发单选', row) |
|||
this.selections = selection |
|||
}, |
|||
handleSizeChange(size) { |
|||
this.page.size = size |
|||
this.page.page = 1 |
|||
this.getViewTable(2) |
|||
}, |
|||
handleCurrentPage(val) { |
|||
this.page.page = val |
|||
this.getViewTable(2) |
|||
}, |
|||
doLayout() { |
|||
this.$nextTick(() => { |
|||
this.$refs.table.doLayout() |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang='scss' scoped> |
|||
|
|||
@mixin management-fixed-style{ |
|||
[data-theme="dark"] & { |
|||
background-color: #031435 !important; |
|||
-webkit-box-shadow: -5px 5px 10px 1px rgba(15,164,222,.16); |
|||
box-shadow: -5px 5px 10px 1px rgba(15,164,222,.16); |
|||
} |
|||
[data-theme="light"] & { |
|||
background-color: #fff; |
|||
} |
|||
} |
|||
.el-table { |
|||
::v-deep .el-table__fixed-right { |
|||
@include management-fixed-style; |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,165 @@ |
|||
<template> |
|||
<el-drawer |
|||
class="management-drawer" |
|||
:with-header="false" |
|||
:visible.sync="fileDrawer" |
|||
:modal="false" |
|||
:wrapper-closable="false" |
|||
:show-close="false" |
|||
direction="rtl" |
|||
:size="((selectedCategory.arrangeType === 2 && isAjNo === 0) || (selectedCategory.arrangeType === 3 && isAjNo === 1)) ? '80%' : (isAjNo === 1) ? '90%' : (selectedCategory.arrangeType === 1) ? '90%' : '70%'" |
|||
> |
|||
<CollectHeader :is-title-type="isTitleType" :selected-category="selectedCategory" :selections="selections" :test="test" :is-recycle="isRecycle" /> |
|||
<span class="closed-btn" @click="closeDrawer" /> |
|||
<el-table |
|||
ref="table" |
|||
v-loading="crud.loading || getTableDisplayFieldsLoading" |
|||
class="archives-table" |
|||
:data="fileData" |
|||
highlight-current-row |
|||
style="width: 100%;" |
|||
:row-class-name="tableRowClassName" |
|||
:row-key="rowKey" |
|||
@select-all="selectAll" |
|||
@selection-change="crud.selectionChangeHandler" |
|||
@row-click="clickRowHandler" |
|||
@cell-dblclick="tableDoubleClick" |
|||
@select="handleCurrentChange" |
|||
> |
|||
<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_type" label="格式" min-width="60" align="center" /> |
|||
<el-table-column prop="file_size" label="大小" min-width="85" align="center"> |
|||
<template slot-scope="scope"> |
|||
{{ (scope.row.file_size / 1024).toFixed(2) + 'kB' }} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="file_dpi" label="尺寸" min-width="85" align="center"> |
|||
<template slot-scope="scope"> |
|||
<div v-if="!scope.row.file_dpi"> - </div> |
|||
<div v-else> {{ scope.row.file_dpi }} </div> |
|||
</template> |
|||
</el-table-column> |
|||
<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)"> |
|||
</div> |
|||
<div v-else> |
|||
<svg-icon icon-class="fujian" class-name="svg-style" /> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="create_time" label="创建时间" min-width="110" align="center" /> |
|||
</el-table> |
|||
<!--分页组件--> |
|||
<el-pagination |
|||
v-if="fileData.length !== 0" |
|||
: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" |
|||
/> |
|||
</el-drawer> |
|||
</template> |
|||
|
|||
<script> |
|||
import { collectionLibraryCrud } from '../mixins/index' |
|||
import { header, form } from '@crud/crud' |
|||
import CollectHeader from '../module/collectHeader.vue' |
|||
export default { |
|||
name: 'File', |
|||
components: { CollectHeader }, |
|||
mixins: [ |
|||
header(), |
|||
form({}), |
|||
collectionLibraryCrud |
|||
], |
|||
props: { |
|||
selectedCategory: { |
|||
type: Object, |
|||
default: function() { |
|||
return {} |
|||
} |
|||
}, |
|||
isRecycle: { |
|||
type: Boolean, |
|||
default: false |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
isTitleType: 6, |
|||
fileDrawer: false, |
|||
test: '', |
|||
isAjNo: 0 |
|||
} |
|||
}, |
|||
watch: { |
|||
selectedCategory: function(newValue, oldValue) { |
|||
} |
|||
}, |
|||
created() { |
|||
}, |
|||
mounted() { |
|||
}, |
|||
methods: { |
|||
closeDrawer() { |
|||
this.fileDrawer = false |
|||
}, |
|||
rowKey(row) { |
|||
return row.id |
|||
}, |
|||
// table选中加上选中状态 |
|||
tableRowClassName({ row, rowIndex }) { |
|||
let color = '' |
|||
this.selections.forEach(item => { |
|||
if (item.id === row.id) { |
|||
color = 'rowStyle' |
|||
} |
|||
}) |
|||
return color |
|||
}, |
|||
// table - 全选 |
|||
selectAll(val) { |
|||
this.selections = val |
|||
}, |
|||
// table - 双击查看详情 |
|||
tableDoubleClick(row) { |
|||
console.log('tableDoubleClick', row) |
|||
// this.arcId = row.id |
|||
console.log(this.selectedCategory.isType) |
|||
}, |
|||
// table - 当前选中得row |
|||
clickRowHandler(row) { |
|||
console.log('clickRowHandler', row) |
|||
this.selections = this.crud.selections |
|||
}, |
|||
// 触发单选 |
|||
handleCurrentChange(selection, row) { |
|||
console.log('触发单选', row) |
|||
this.selections = selection |
|||
}, |
|||
handleSizeChange(size) { |
|||
this.page.size = size |
|||
this.page.page = 1 |
|||
this.getViewTable(3) |
|||
}, |
|||
handleCurrentPage(val) { |
|||
this.page.page = val |
|||
this.getViewTable(3) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang='scss' scoped> |
|||
.svg-style{ |
|||
width: 60px; |
|||
height: 32px; |
|||
} |
|||
</style> |
@ -0,0 +1,250 @@ |
|||
<template> |
|||
<el-drawer |
|||
class="management-drawer" |
|||
:with-header="false" |
|||
:visible.sync="juanneiDrawer" |
|||
:modal="false" |
|||
:wrapper-closable="false" |
|||
:show-close="false" |
|||
direction="rtl" |
|||
:size="selectedCategory.arrangeType === 2 ? '90%' :'80%'" |
|||
> |
|||
<CollectHeader ref="collectHeader" :is-title-type="isTitleType" :selected-category="selectedCategory" :selections="selections" :test="test" :is-recycle="isRecycle" @status-bar-checked-changed="handleStatusBarCheckedChanged" /> |
|||
<el-table |
|||
ref="table" |
|||
v-loading="crud.loading || getTableDisplayFieldsLoading" |
|||
class="archives-table" |
|||
:data="junneiData" |
|||
highlight-current-row |
|||
style="width: 100%;" |
|||
:row-class-name="tableRowClassName" |
|||
:row-key="rowKey" |
|||
@select-all="selectAll" |
|||
@selection-change="crud.selectionChangeHandler" |
|||
@row-click="clickRowHandler" |
|||
@cell-dblclick="tableDoubleClick" |
|||
@select="handleCurrentChange" |
|||
> |
|||
<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 label="原文" prop="children_num" width="55" align="center" /> |
|||
<el-table-column v-for="field in tableDisplayFields" :key="field.id" :label="field.fieldCnName" :align="field.displayformatType" :width="field.displayLength" show-overflow-tooltip> |
|||
<template slot="header"> |
|||
<el-tooltip |
|||
class="item" |
|||
effect="dark" |
|||
:content="field.fieldCnName" |
|||
placement="top-start" |
|||
> |
|||
<span>{{ field.fieldCnName }}</span> |
|||
</el-tooltip> |
|||
</template> |
|||
<template slot-scope="scope"> |
|||
{{ scope.row[field.fieldName] }} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column v-if="!isRecycle" label="实体" width="88" align="center" :fixed="fixedStatusBar ? false : 'right' "> |
|||
<!-- slot-scope="scope" --> |
|||
<template> |
|||
<span class="row-state row-physical state-active">有</span> |
|||
<!-- <span :class="['row-state', 'row-physical', scope.row.tid ? 'state-active' : '' ]">{{ scope.row.tid ? '有': '无' }}</span> --> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column v-if="!isRecycle" label="标签" width="88" align="center" :fixed="fixedStatusBar ? false : 'right' "> |
|||
<template> |
|||
<span class="row-state row-binding state-active">未绑</span> |
|||
<!-- 未绑 / 已绑 --> |
|||
<!-- <span :class="['row-state', 'row-binding', scope.row.tid ? 'state-active' : '' ]">{{ scope.row.tid ? '已绑': '未绑' }}</span> --> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column v-if="!isRecycle" label="装盒" width="88" align="center" :fixed="fixedStatusBar ? false : 'right' "> |
|||
<!-- state-active 已装/已入/已借/已绑 --> |
|||
<template> |
|||
<!-- 未装 / 已装 --> |
|||
<span class="row-state row-packing state-active">已装</span> |
|||
<!-- <span :class="['row-state', 'row-packing', scope.row.case_no ? 'state-active' : '' ]">{{ scope.row.case_no ? '已装': '未装' }}</span> --> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column v-if="!isRecycle" label="入库" width="88" align="center" :fixed="fixedStatusBar ? false : 'right' "> |
|||
<template> |
|||
<span class="row-state row-warehousing state-active">已入</span> |
|||
<!-- is_storage 为空的情况下即没装盒 / 0 未入 / 1 待入 / 2 已入 / 3 待出--> |
|||
<!-- <span :class="['row-state', 'row-warehousing', (storageTxt[scope.$index] === '已入' )? 'state-active' : '' ]">{{ storageTxt[scope.$index] }}</span> --> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column v-if="!isRecycle" label="借阅" width="88" align="center" :fixed="fixedStatusBar ? false : 'right' "> |
|||
<template> |
|||
<span class="row-state row-lending state-active">已借</span> |
|||
<!-- is_borrow 4 已归还 / 为空 - 未加入待借列表 - 在库 / 2 待借阅(在待借列表/借出确认列表) - 待借 / 1待登记 - 不可借-用“—” 表示 / 3 待归还 - 已借 --> |
|||
<!-- <span :class="['row-state', 'row-lending', (borrowTxt[scope.$index] === '已借' )? 'state-active' : '' ]">{{ borrowTxt[scope.$index] }}</span> --> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!--分页组件--> |
|||
<el-pagination |
|||
v-if="junneiData.length !== 0" |
|||
: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" |
|||
/> |
|||
<!-- 档案详情 --> |
|||
<ArchivesInfo ref="archivesInfo" :category-id="categoryId" :arc-id="arcId" /> |
|||
<span class="closed-btn" @click="closeDrawer" /> |
|||
</el-drawer> |
|||
</template> |
|||
|
|||
<script> |
|||
import { collectionLibraryCrud } from '../mixins/index' |
|||
import { header, form } from '@crud/crud' |
|||
import CollectHeader from '../module/collectHeader.vue' |
|||
import ArchivesInfo from '../module/archivesInfo/index' |
|||
|
|||
import tableData from '../anjuan/table.json' |
|||
import jsonData from '../anjuan/data.json' |
|||
|
|||
export default { |
|||
name: 'Juannei', |
|||
components: { CollectHeader, ArchivesInfo }, |
|||
mixins: [ |
|||
header(), |
|||
form({}), |
|||
collectionLibraryCrud |
|||
], |
|||
props: { |
|||
selectedCategory: { |
|||
type: Object, |
|||
default: function() { |
|||
return {} |
|||
} |
|||
}, |
|||
isRecycle: { |
|||
type: Boolean, |
|||
default: false |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
isTitleType: 4, |
|||
juanneiDrawer: false, |
|||
categoryId: 'CD135F6A77018CE04D4FDB', |
|||
arcId: '256E752BC0280618840600', |
|||
test: '' |
|||
} |
|||
}, |
|||
watch: { |
|||
selectedCategory: function(newValue, oldValue) { |
|||
}, |
|||
tableDisplayFields(val) { |
|||
// this.doLayout() |
|||
} |
|||
}, |
|||
created() { |
|||
this.tableDisplayFields = tableData.data |
|||
this.junneiData = jsonData.data.list.content |
|||
}, |
|||
mounted() { |
|||
console.log('nei2', this.selectedCategory.arrangeType) |
|||
}, |
|||
methods: { |
|||
handleStatusBarCheckedChanged(statusBarChecked) { |
|||
console.log('父组件获取到子组件状态:', statusBarChecked) |
|||
this.fixedStatusBar = statusBarChecked |
|||
// 在这里可以处理获取到的状态 |
|||
}, |
|||
getCommonData(type) { |
|||
this.getViewTable(type) |
|||
}, |
|||
openFile(data) { |
|||
// this.$emit('openFile', '这是来自卷内的通知') |
|||
this.$emit('openFile', data) |
|||
}, |
|||
closeDrawer() { |
|||
this.juanneiDrawer = false |
|||
console.log(this.$parent) |
|||
}, |
|||
rowKey(row) { |
|||
return row.id |
|||
}, |
|||
// table选中加上选中状态 |
|||
tableRowClassName({ row, rowIndex }) { |
|||
// console.log('添加类名', row, rowIndex) |
|||
let color = '' |
|||
this.selections.forEach(item => { |
|||
if (item.id === row.id) { |
|||
color = 'rowStyle' |
|||
} |
|||
}) |
|||
return color |
|||
}, |
|||
// table - 全选 |
|||
selectAll(val) { |
|||
this.selections = val |
|||
}, |
|||
// table - 双击查看详情 |
|||
tableDoubleClick(row) { |
|||
if (this.timer) { |
|||
clearTimeout(this.timer) |
|||
} |
|||
console.log('tableDoubleClick', row) |
|||
this.arcId = row.id |
|||
this.$refs.archivesInfo.isHasFile = true |
|||
this.$refs.archivesInfo.detailTitle = '卷内详情' |
|||
this.$refs.archivesInfo.archivesInfoVisible = true |
|||
this.$refs.archivesInfo.archivesTabIndex = 0 |
|||
// this.$refs.archivesInfo.getDetial(row.id) |
|||
}, |
|||
// table - 当前选中得row |
|||
clickRowHandler(row) { |
|||
console.log('clickRowHandler', row) |
|||
if (this.timer) { |
|||
clearTimeout(this.timer) |
|||
} |
|||
this.timer = setTimeout(() => { |
|||
this.openFile(row.archive_no) |
|||
}, 300) |
|||
this.selections = this.crud.selections |
|||
}, |
|||
// 触发单选 |
|||
handleCurrentChange(selection, row) { |
|||
console.log('触发单选', row) |
|||
this.selections = selection |
|||
}, |
|||
handleSizeChange(size) { |
|||
this.page.size = size |
|||
this.page.page = 1 |
|||
this.getViewTable(3) |
|||
}, |
|||
handleCurrentPage(val) { |
|||
this.page.page = val |
|||
this.getViewTable(3) |
|||
}, |
|||
doLayout() { |
|||
this.$nextTick(() => { |
|||
this.$refs.table.doLayout() |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang='scss' scoped> |
|||
@mixin management-fixed-style{ |
|||
[data-theme="dark"] & { |
|||
background-color: #031435 !important; |
|||
-webkit-box-shadow: -5px 5px 10px 1px rgba(15,164,222,.16); |
|||
box-shadow: -5px 5px 10px 1px rgba(15,164,222,.16); |
|||
} |
|||
[data-theme="light"] & { |
|||
background-color: #fff; |
|||
} |
|||
} |
|||
.el-table { |
|||
::v-deep .el-table__fixed-right { |
|||
@include management-fixed-style; |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,101 @@ |
|||
// import qs from 'qs'
|
|||
// import { exportFile } from '@/utils/index'
|
|||
import { FetchInitCategoryViewTable, FetchInitCategoryView } from '@/api/collect/collect' |
|||
export const collectionLibraryCrud = { |
|||
// 组件共用属性
|
|||
data() { |
|||
return { |
|||
getTableDisplayFieldsLoading: false, // table-loading
|
|||
tableDisplayFields: [], |
|||
projectData: [], |
|||
anjuanData: [], |
|||
junneiData: [], |
|||
fileData: [], |
|||
selections: [], |
|||
arrySort: [], |
|||
page: { |
|||
page: 1, |
|||
size: 10, |
|||
total: 0 |
|||
}, |
|||
timer: null, |
|||
query: { |
|||
search: null |
|||
}, |
|||
fixedStatusBar: false |
|||
} |
|||
}, |
|||
// 组件共用方法
|
|||
methods: { |
|||
// 缓存用户对于固定栏操作习惯
|
|||
// statusBarChecked(val) {
|
|||
// console.log('statusVal', val)
|
|||
// this.fixedStatusBar = val
|
|||
// this.$emit('status-bar-checked-changed', this.fixedStatusBar)
|
|||
// localStorage.setItem('statusBarFixedType', val)
|
|||
// },
|
|||
handleSearch() { |
|||
this.getViewTableList() |
|||
}, |
|||
getViewTable(categoryLevel) { |
|||
this.getTableDisplayFieldsLoading = true |
|||
this.tableDisplayFields = [] |
|||
FetchInitCategoryViewTable({ categoryId: this.selectedCategory.id, categoryLevel: categoryLevel }).then((res) => { |
|||
if (res) { |
|||
this.arrySort = [] |
|||
this.tableDisplayFields = res |
|||
const orderSortArry = this.tableDisplayFields.filter(item => item.displayOrder).sort((a, b) => a.displayOrder - b.displayOrder) |
|||
orderSortArry.forEach(item => { |
|||
if (item.displayOrderBy) { |
|||
this.arrySort.push(item.fieldName + ',' + item.displayOrderBy) |
|||
} |
|||
}) |
|||
this.$nextTick(() => { |
|||
console.log('tableDisplayFields', this.tableDisplayFields) |
|||
this.getViewTableList(categoryLevel) |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
getViewTableList(categoryLevel) { |
|||
this.anjuanData = [] |
|||
const params = { |
|||
'categoryId': this.selectedCategory.id, |
|||
'categoryLevel': categoryLevel, |
|||
'search': this.query.search, |
|||
'page': this.page.page - 1, |
|||
'size': this.page.size |
|||
} |
|||
FetchInitCategoryView(params).then((res) => { |
|||
console.log(res) |
|||
if (res.code !== 500) { |
|||
if (categoryLevel === 1) { |
|||
console.log('111') |
|||
this.projectData = res.list.content |
|||
} else if (categoryLevel === 2) { |
|||
console.log('2222222') |
|||
this.anjuanData = res.list.content |
|||
} else if (categoryLevel === 3) { |
|||
console.log('333') |
|||
if (this.isTitleType === 6) { |
|||
this.fileData = res.list.content |
|||
} else { |
|||
this.junneiData = res.list.content |
|||
} |
|||
} |
|||
this.page.total = res.list.totalElements |
|||
} |
|||
this.getTableDisplayFieldsLoading = false |
|||
}) |
|||
} |
|||
/* 重新渲染table组件 防止table-fixed 错位 配合watch-table数据 */ |
|||
// doLayout() {
|
|||
// this.$nextTick(() => {
|
|||
// this.$refs.table.doLayout()
|
|||
// })
|
|||
// }
|
|||
}, |
|||
// 组件挂载时的共用方法
|
|||
mounted() { |
|||
} |
|||
} |
@ -0,0 +1,126 @@ |
|||
{ |
|||
"code": 200, |
|||
"message": "操作成功", |
|||
"data": [ |
|||
{ |
|||
"fieldName": "item_no", |
|||
"fieldCnName": "项目号", |
|||
"editLength": 196, |
|||
"isLine": false, |
|||
"context": "JJ-2021-GZ-001" |
|||
}, |
|||
{ |
|||
"fieldName": "fonds_no", |
|||
"fieldCnName": "全宗号", |
|||
"editLength": 196, |
|||
"isLine": false, |
|||
"context": "档案室" |
|||
}, |
|||
{ |
|||
"fieldName": "archive_year", |
|||
"fieldCnName": "归档年度", |
|||
"editLength": 196, |
|||
"isLine": false, |
|||
"context": 2021 |
|||
}, |
|||
{ |
|||
"fieldName": "retention", |
|||
"fieldCnName": "保管期限", |
|||
"editLength": 196, |
|||
"isLine": false, |
|||
"context": "永久" |
|||
}, |
|||
{ |
|||
"fieldName": "maintitle", |
|||
"fieldCnName": "项目名", |
|||
"editLength": 510, |
|||
"isLine": true, |
|||
"context": "档案室改造" |
|||
}, |
|||
{ |
|||
"fieldName": "security_class", |
|||
"fieldCnName": "密级", |
|||
"editLength": 196, |
|||
"isLine": false, |
|||
"context": "公开" |
|||
}, |
|||
{ |
|||
"fieldName": "responsibleby", |
|||
"fieldCnName": "责任者", |
|||
"editLength": 196, |
|||
"isLine": false, |
|||
"context": "许飞" |
|||
}, |
|||
{ |
|||
"fieldName": "organization_matter", |
|||
"fieldCnName": "机构(问题)", |
|||
"editLength": 196, |
|||
"isLine": false, |
|||
"context": "机关建设" |
|||
}, |
|||
{ |
|||
"fieldName": "department", |
|||
"fieldCnName": "部门名称", |
|||
"editLength": 196, |
|||
"isLine": false, |
|||
"context": "综合部" |
|||
}, |
|||
{ |
|||
"fieldName": "piece_qty", |
|||
"fieldCnName": "案卷数", |
|||
"editLength": 196, |
|||
"isLine": false, |
|||
"context": 3 |
|||
}, |
|||
{ |
|||
"fieldName": "item_start_date", |
|||
"fieldCnName": "立项时间", |
|||
"editLength": 196, |
|||
"isLine": false, |
|||
"context": "2021-12-01 " |
|||
}, |
|||
{ |
|||
"fieldName": "item_end_date", |
|||
"fieldCnName": "结项时间", |
|||
"editLength": 196, |
|||
"isLine": false, |
|||
"context": "2022-08-25 " |
|||
}, |
|||
{ |
|||
"fieldName": "tid", |
|||
"fieldCnName": "TID", |
|||
"editLength": null, |
|||
"isLine": null, |
|||
"context": null |
|||
}, |
|||
{ |
|||
"fieldName": "case_name", |
|||
"fieldCnName": "盒名称", |
|||
"editLength": null, |
|||
"isLine": null, |
|||
"context": null |
|||
}, |
|||
{ |
|||
"fieldName": "folder_location", |
|||
"fieldCnName": "库房位置", |
|||
"editLength": null, |
|||
"isLine": null, |
|||
"context": null |
|||
}, |
|||
{ |
|||
"fieldName": "borrow_type", |
|||
"fieldCnName": "借阅状态", |
|||
"editLength": null, |
|||
"isLine": null, |
|||
"context": null |
|||
}, |
|||
{ |
|||
"fieldName": "barcode", |
|||
"fieldCnName": "条形码", |
|||
"editLength": null, |
|||
"isLine": null, |
|||
"context": null |
|||
} |
|||
], |
|||
"timestamp": 1689215199486 |
|||
} |
@ -0,0 +1,284 @@ |
|||
<template> |
|||
<el-dialog class="detail-dialog" :title="detailTitle" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="archivesInfoVisible" :before-close="handleClose"> |
|||
<!-- <span class="dialog-right-top" /> |
|||
<span class="dialog-left-bottom" /> --> |
|||
<div class="setting-dialog"> |
|||
<div class="detail-tab tab-content"> |
|||
<!-- tab --> |
|||
<ul class="tab-nav"> |
|||
<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> |
|||
</ul> |
|||
<!-- 基本信息 --> |
|||
<div v-if="archivesTabIndex==0" class="base-info item-content"> |
|||
<el-row> |
|||
<el-col v-for="(item,index) in archivesDetailsData" v-show="index<archivesDetailsData.length-5" :key="index" :span="item.isLine ? 24 : 12" class="base-info-item"> |
|||
<span>{{ item.fieldCnName }}:</span> |
|||
<p :style="{ width: ( item.editLength ? item.editLength+'px' : '' ), flex: ( !item.editLength ? 1 : '' )}">{{ item.context }}</p> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row v-if="isDetailsInfo"> |
|||
<el-col v-for="(item,index) in archivesDetailsData.slice(archivesDetailsData.length-5,archivesDetailsData.length)" :key="'last'+index" :span=" 12" class="base-info-item"> |
|||
<span>{{ item.fieldCnName }}:</span> |
|||
<div v-if="item.fieldName === 'folder_location' && item.context" :style="{ width: item.editLength+'px', marginTop:'-6px'}"> |
|||
<div v-if="item.context.indexOf(',')"> |
|||
<el-tag |
|||
v-for="(val,key) in item.context.split(',')" |
|||
:key="key" |
|||
:type="val" |
|||
effect="dark" |
|||
> |
|||
{{ val }} |
|||
</el-tag> |
|||
</div> |
|||
<div v-else-if="!item.context.indexOf(',')"> |
|||
<el-tag effect="dark">{{ item.context }}</el-tag> |
|||
</div> |
|||
</div> |
|||
<div v-else :style="{ width: item.editLength+'px'}" :class="[ (item.fieldName === 'borrow_type') ? 'row-state row-lending' : '' ]"> |
|||
{{ item.context }} |
|||
</div> |
|||
</el-col> |
|||
</el-row> |
|||
</div> |
|||
<!-- 附件 --> |
|||
<UploadFile v-if="archivesTabIndex==1" ref="uploadFile" class="item-content" :is-upload-detail="false" :category-id="categoryId" :arc-id="arcId" /> |
|||
<!-- 元数据 --> |
|||
<div v-if="archivesTabIndex==2" class="metadata-cont item-content"> |
|||
<pre v-highlightjs="xml_show"> |
|||
<code class="highlight_s"> |
|||
{[xml_show]} |
|||
</code> |
|||
</pre> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</el-dialog> |
|||
</template> |
|||
|
|||
<script> |
|||
import { form } from '@crud/crud' |
|||
import { FetchArchivesDetails, FetchArchivesMetadata } from '@/api/archivesManage/archivesList' |
|||
import UploadFile from '../uploadFile/index' |
|||
import detailData from './data.json' |
|||
import metaData from './metadata.json' |
|||
export default { |
|||
name: 'ArchivesInfo', |
|||
components: { UploadFile }, |
|||
mixins: [ |
|||
form({}) |
|||
], |
|||
// inject: ['recycleMain'], |
|||
props: { |
|||
categoryId: { |
|||
type: String, |
|||
default: function() { |
|||
return '' |
|||
} |
|||
}, |
|||
arcId: { |
|||
type: String, |
|||
default: function() { |
|||
return '' |
|||
} |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
detailTitle: '', |
|||
isHasFile: false, // 卷内/文件才有附件 |
|||
isDetailsInfo: false, // 项目不显示最下面5行基本信息 |
|||
isTidOrBorrow: true, // 卷内不显示tid/借阅状态 |
|||
archivesInfoVisible: false, |
|||
archivesTabIndex: 0, |
|||
archivesDetailsData: [], |
|||
archivesDetailsMetadata: [], |
|||
xml_show: null |
|||
} |
|||
}, |
|||
created() { |
|||
this.archivesDetailsData = detailData.data |
|||
this.archivesDetailsMetadata = metaData.data |
|||
}, |
|||
mounted() { |
|||
}, |
|||
methods: { |
|||
getDetial(rowId) { |
|||
const params = { |
|||
categoryId: this.categoryId, |
|||
archivesId: rowId |
|||
} |
|||
FetchArchivesDetails(params).then(data => { |
|||
this.archivesDetailsData = data |
|||
// 案卷 / 文件的借阅状态 |
|||
this.archivesDetailsData.forEach(item => { |
|||
if (item.fieldName === 'borrow_type') { |
|||
if (item.context === 1) { |
|||
item.context = '待登记' |
|||
} else if (item.context === 2) { |
|||
item.context = '待借阅' |
|||
} else if (item.context === 3) { |
|||
item.context = '待归还' |
|||
} else if (item.context === 4 || item.context === '' || item.context === null) { |
|||
item.context = '-' |
|||
} else if (item.context === -1) { |
|||
item.context = '在库' |
|||
} |
|||
} |
|||
}) |
|||
// 如果是卷内 - 不显示‘tid’/'借阅状态' |
|||
if (!this.isTidOrBorrow) { |
|||
const indexBorrow = this.archivesDetailsData.findIndex(item => item.fieldName === 'borrow_type') |
|||
const indexTid = this.archivesDetailsData.findIndex(item => item.fieldName === 'tid') |
|||
this.archivesDetailsData.splice(indexBorrow, 1) |
|||
this.archivesDetailsData.splice(indexTid, 1) |
|||
} |
|||
}) |
|||
FetchArchivesMetadata(params).then(data => { |
|||
this.archivesDetailsMetadata = data |
|||
}) |
|||
}, |
|||
setXml() { |
|||
const xmlstr = this.archivesDetailsMetadata |
|||
// console.log('xmlstr:', xmlstr) |
|||
// console.log('xml转json:', this.$x2js.xml2js(xmlstr)) |
|||
// console.log('json转xml:', this.$x2js.js2xml(this.$x2js.xml2js(xmlstr))) |
|||
// this.xml_show = vkbeautify.xml(xmlstr) |
|||
this.xml_show = this.showXml(xmlstr) |
|||
}, |
|||
changeActiveTab(index) { |
|||
this.archivesTabIndex = index |
|||
if (this.archivesTabIndex === 2) { |
|||
this.setXml() |
|||
} |
|||
this.$nextTick(() => { |
|||
if (this.$refs.uploadFile) { |
|||
this.$refs.uploadFile.tableData = [] |
|||
this.$refs.uploadFile.getFileList() |
|||
} |
|||
}) |
|||
}, |
|||
// 删除 - 关闭 |
|||
handleClose(done) { |
|||
this.archivesInfoVisible = false |
|||
done() |
|||
}, |
|||
// xml格式化 |
|||
showXml(str) { |
|||
var that = this |
|||
var text = str |
|||
// 去掉多余的空格 |
|||
text = |
|||
'\n' + |
|||
text |
|||
.replace(/(<\w+)(\s.*?>)/g, function($0, name, props) { |
|||
return name + ' ' + props.replace(/\s+(\w+=)/g, ' $1') |
|||
}) |
|||
.replace(/>\s*?</g, '>\n<') |
|||
// 把注释编码 |
|||
text = text |
|||
.replace(/\n/g, '\r') |
|||
.replace(/<!--(.+?)-->/g, function($0, text) { |
|||
var ret = '<!--' + escape(text) + '-->' |
|||
return ret |
|||
}) |
|||
.replace(/\r/g, '\n') |
|||
|
|||
// 调整格式 |
|||
var rgx = /\n(<(([^\?]).+?)(?:\s|\s*?>|\s*?(\/)>)(?:.*?(?:(?:(\/)>)|(?:<(\/)\2>)))?)/gm |
|||
var nodeStack = [] |
|||
var output = text.replace(rgx, function( |
|||
$0, |
|||
all, |
|||
name, |
|||
isBegin, |
|||
isCloseFull1, |
|||
isCloseFull2, |
|||
isFull1, |
|||
isFull2 |
|||
) { |
|||
var isClosed = |
|||
isCloseFull1 === '/' || |
|||
isCloseFull2 === '/' || |
|||
isFull1 === '/' || |
|||
isFull2 === '/' |
|||
var prefix = '' |
|||
if (isBegin === '!') { |
|||
prefix = that.getPrefix(nodeStack.length) |
|||
} else { |
|||
if (isBegin !== '/') { |
|||
prefix = that.getPrefix(nodeStack.length) |
|||
if (!isClosed) { |
|||
nodeStack.push(name) |
|||
} |
|||
} else { |
|||
nodeStack.pop() |
|||
prefix = that.getPrefix(nodeStack.length) |
|||
} |
|||
} |
|||
var ret = '\n' + prefix + all |
|||
return ret |
|||
}) |
|||
var outputText = output.substring(1) |
|||
// 把注释还原并解码,调格式 |
|||
outputText = outputText |
|||
.replace(/\n/g, '\r') |
|||
.replace(/(\s*)<!--(.+?)-->/g, function($0, prefix, text) { |
|||
if (prefix.charAt(0) === '\r') prefix = prefix.substring(1) |
|||
text = unescape(text).replace(/\r/g, '\n') |
|||
var ret = |
|||
'\n' + prefix + '<!--' + text.replace(/^\s*/gm, prefix) + '-->' |
|||
return ret |
|||
}) |
|||
outputText = outputText.replace(/\s+$/g, '').replace(/\r/g, '\r\n') |
|||
return outputText |
|||
}, |
|||
getPrefix(prefixIndex) { |
|||
var span = ' ' |
|||
var output = [] |
|||
for (var i = 0; i < prefixIndex; ++i) { |
|||
output.push(span) |
|||
} |
|||
return output.join('') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.base-info, |
|||
.metadata-cont{ |
|||
background-color: #F6F8FC; |
|||
} |
|||
// 档案详情 |
|||
.base-info{ |
|||
padding: 20px 0; |
|||
.base-info-item{ |
|||
display: flex; |
|||
flex-direction: row; |
|||
margin-bottom: 20px; |
|||
color: #545B65; |
|||
span{ |
|||
display: block; |
|||
width: 120px; |
|||
margin-right: 5px; |
|||
text-align: right; |
|||
color: #0C0E1E; |
|||
} |
|||
} |
|||
} |
|||
|
|||
code.hljs { |
|||
font-size: 12px; |
|||
color: #0C0E1E !important; |
|||
height: 530px !important; |
|||
} |
|||
::v-deep .hljs-name{ |
|||
color: #0C0E1E !important; |
|||
} |
|||
.base-info .base-info-item span.el-tag{ |
|||
width: auto; |
|||
color: #fff; |
|||
} |
|||
</style> |
@ -0,0 +1,6 @@ |
|||
{ |
|||
"code": 200, |
|||
"message": "操作成功", |
|||
"data": "<? xml version=\"1.0\" encoding=\"UTF-8\"?><元数据信息><内容描述><项目号>JJ-2021-GZ-001</项目号><全宗号>档案室</全宗号><项目名>档案室改造</项目名><保管期限>永久</保管期限><归档年度>2021</归档年度><密级>公开</密级><责任者>许飞</责任者><机构(问题)>机关建设</机构(问题)><部门名称>综合部</部门名称><案卷数>3</案卷数><立项时间>2021-12-01 </立项时间><结项时间>2022-08-25 </结项时间><项目开始时间>2022-05-01 </项目开始时间><项目结束时间>2022-07-31 </项目结束时间><备注></备注></内容描述><系统数据><库房名>null</库房名><盒号>null</盒号><存放位置>null</存放位置><标签编号>null</标签编号><条码号>null</条码号><子条目数>1</子条目数></系统数据></元数据信息>", |
|||
"timestamp": 1689215199496 |
|||
} |
@ -0,0 +1,458 @@ |
|||
<template> |
|||
<div> |
|||
<div :class="[ isTitleType === 6 || isTitleType === 2 ? 'collect-header manage-fixed-style' : 'collect-header']"> |
|||
<h4 :class="classType">{{ collectTitle }} <span v-if="isTitleType !== 2 && !(isTitleType === 3 && (selectedCategory.arrangeType === 1 || selectedCategory.arrangeType === 2) )"> > {{ test }}</span></h4> |
|||
<div class="head-search"> |
|||
<el-select |
|||
v-if="isTitleType === 3 && selectedCategory.arrangeType !== 3" |
|||
v-model="selectStatus" |
|||
multiple |
|||
collapse-tags |
|||
style="margin-right: 10px;" |
|||
placeholder="请选择" |
|||
> |
|||
<el-option |
|||
v-for="item in options" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value" |
|||
/> |
|||
</el-select> |
|||
<!-- 搜索 --> |
|||
<div v-if="isTitleType !== 6"> |
|||
<el-input v-model="query.search" clearable size="small" :placeholder="placeholderType" prefix-icon="el-icon-search" style="width: 200px;" class="filter-item" /> |
|||
<el-button class="filter-item filter-search" size="mini" type="success" icon="el-icon-search" @click="handleSearch">搜索</el-button> |
|||
<el-button class="filter-item filter-refresh" size="mini" type="warning" icon="el-icon-refresh-left">重置</el-button> |
|||
</div> |
|||
</div> |
|||
<div v-if="!isRecycle" class="collect-menu"> |
|||
<el-menu |
|||
:default-active="activeMenuIndex" |
|||
mode="horizontal" |
|||
@select="handleSelect" |
|||
> |
|||
<el-submenu v-if="isTitleType !== 6" index="1"> |
|||
<template slot="title"> |
|||
<i class="iconfont icon-changgui" /> |
|||
<span>常规</span> |
|||
</template> |
|||
<el-menu-item-group class="collect-submenu-group"> |
|||
<el-menu-item v-if="isTitleType !== 6" index="1-1" @click="handleForm('edit')">编辑</el-menu-item> |
|||
</el-menu-item-group> |
|||
</el-submenu> |
|||
<el-submenu v-if="selectedCategory.isType === 2 && isTitleType !==4 && isTitleType !== 6" index="2"> |
|||
<template slot="title"> |
|||
<i class="iconfont icon-zhengli" /> |
|||
<span>整理</span> |
|||
</template> |
|||
<el-menu-item-group class="collect-submenu-group"> |
|||
<el-menu-item v-if="isTitleType === 3" index="2-1">标签绑定</el-menu-item> |
|||
<el-menu-item-group v-if="isTitleType === 3" class="collect-submenu-group submenu-tree"> |
|||
<template slot="title">档案装盒</template> |
|||
<el-menu-item index="2-2">装盒</el-menu-item> |
|||
<el-menu-item v-if="selectedCategory.arrangeType !== 1" index="2-3">分卷装盒</el-menu-item> |
|||
</el-menu-item-group> |
|||
<el-menu-item-group v-if="selectedCategory.isType === 2" class="collect-submenu-group submenu-tree"> |
|||
<template slot="title">档案移交</template> |
|||
<el-menu-item index="2-4">在线移交</el-menu-item> |
|||
<el-menu-item index="2-5">离线移交</el-menu-item> |
|||
</el-menu-item-group> |
|||
<el-menu-item v-if="selectedCategory.isType === 2" index="2-6">导出ZIP包</el-menu-item> |
|||
<el-menu-item v-if="selectedCategory.isType === 2" index="2-7">档案退回</el-menu-item> |
|||
<el-menu-item v-if="isTitleType === 3 " index="2-8">开放鉴定</el-menu-item> |
|||
<el-menu-item v-if="isTitleType === 3 " index="2-9">销毁鉴定</el-menu-item> |
|||
</el-menu-item-group> |
|||
</el-submenu> |
|||
<el-submenu index="3"> |
|||
<template slot="title"> |
|||
<i class="iconfont icon-gengduo" /> |
|||
<span>更多</span> |
|||
</template> |
|||
<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" index="3-2" @click="handlePrint">打印</el-menu-item> |
|||
<el-menu-item v-if="isTitleType === 6" index="3-3" @click="handleOriginalDownload">下载</el-menu-item> |
|||
</el-menu-item-group> |
|||
</el-submenu> |
|||
</el-menu> |
|||
</div> |
|||
|
|||
<div v-if="isRecycle && (isTitleType === 2 || (isTitleType === 3 && selectedCategory.arrangeType !== 3))" class="collect-menu"> |
|||
<el-button class="filter-item" size="mini" type="success" @click="toRecover"><i class="iconfont icon-huifu" />恢复</el-button> |
|||
<el-button class="filter-item" size="mini" type="success" @click="toCompletelyDelete"><i class="iconfont icon-shanchu" />彻底删除</el-button> |
|||
</div> |
|||
|
|||
<!--新增 / 编辑 表单组件--> |
|||
<el-dialog class="preview-dialog" :modal-append-to-body="false" :close-on-click-modal="false" append-to-body :before-close="handleClose" :visible="formVisible" :title="formTitle"> |
|||
<span class="dialog-right-top" /> |
|||
<span class="dialog-left-bottom" /> |
|||
<div class="setting-dialog"> |
|||
<!-- @emitTableList="getTableList" --> |
|||
<PreviewForm v-if="formPreviewData.length" ref="previewForm" :is-has-code="true" :is-disabled="false" :form-preview-data.sync="formPreviewData" :selected-category="selectedCategory" :parents-id="parentsId" :arc-id="arcId" :is-des-form-type="isDesFormType" /> |
|||
<div slot="footer" class="dialog-footer"> |
|||
<el-button type="primary" @click="handlerArchivesSubmit">保存</el-button> |
|||
</div> |
|||
</div> |
|||
</el-dialog> |
|||
|
|||
<!--删除对话框组件--> |
|||
<el-dialog class="tip-dialog" title="提示" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="deleteVisible"> |
|||
<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="deleteVisible = false">取消</el-button> |
|||
<el-button type="primary" @click.native="handleDelConfirm">确定</el-button> |
|||
</div> |
|||
</div> |
|||
</el-dialog> |
|||
|
|||
<!-- 导出 --> |
|||
<el-dialog class="tip-dialog" title="导出" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="exportVisible"> |
|||
<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="downloadVisible = false">取消</el-button> |
|||
<el-button type="primary" @click.native="handleExportConfirm">确定</el-button> |
|||
</div> |
|||
</div> |
|||
</el-dialog> |
|||
|
|||
<!-- 打印 --> |
|||
<Print ref="printRef" /> |
|||
|
|||
<!-- 回收站 - 恢复 --> |
|||
<el-dialog class="tip-dialog" title="提示" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="recoverVisible"> |
|||
<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="recoverVisible = false">取消</el-button> |
|||
<el-button type="primary" @click.native="handleRecover">确定</el-button> |
|||
</div> |
|||
</div> |
|||
</el-dialog> |
|||
|
|||
<!-- 回收站 - 彻底删除 --> |
|||
<el-dialog class="tip-dialog" title="提示" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="completelyDeleteVisible"> |
|||
<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="completelyDeleteVisible = false">取消</el-button> |
|||
<el-button type="primary" @click.native="handleCompletelyDelete">确定</el-button> |
|||
</div> |
|||
</div> |
|||
</el-dialog> |
|||
</div> |
|||
<!-- v-if="selectedCategory.isType !== 1 && !isRecycle" :class="['archives-top', {'archives-fixed-top': selectedCategory.isType === 2 || selectedCategory.isType === 4 }]" --> |
|||
<div v-if="isTitleType !== 2 && !isRecycle && isTitleType !== 6" class="mangement-fixed-top"> |
|||
<el-checkbox v-model="fixedStatusBar" @change="statusBarChecked">隐藏状态栏</el-checkbox> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { collectionLibraryCrud } from '../mixins/index' |
|||
import { FetchInitCategoryInputFieldByPid } from '@/api/system/category/category' |
|||
import PreviewForm from '@/views/components/category/PreviewForm' |
|||
import Print from './print/index' |
|||
// import { exportFile } from '@/utils/index' |
|||
import { mapGetters } from 'vuex' |
|||
export default { |
|||
name: 'CollectHeader', |
|||
components: { PreviewForm, Print }, |
|||
mixins: [collectionLibraryCrud], |
|||
props: { |
|||
selectedCategory: { |
|||
type: Object, |
|||
default: function() { |
|||
return {} |
|||
} |
|||
}, |
|||
isTitleType: { |
|||
type: Number, |
|||
default: 2 |
|||
}, |
|||
arcId: { |
|||
type: String, |
|||
default: function() { |
|||
return '' |
|||
} |
|||
}, |
|||
test: { |
|||
type: String, |
|||
default: function() { |
|||
return '' |
|||
} |
|||
}, |
|||
isRecycle: { |
|||
type: Boolean, |
|||
default: false |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
options: [ |
|||
{ |
|||
value: '未装盒', |
|||
label: '未装盒' |
|||
}, |
|||
{ |
|||
value: '已装盒', |
|||
label: '已装盒' |
|||
}, |
|||
{ |
|||
value: '未入库', |
|||
label: '未入库' |
|||
}, |
|||
{ |
|||
value: '已入库', |
|||
label: '已入库' |
|||
}, |
|||
{ |
|||
value: '无实体', |
|||
label: '无实体' |
|||
}, |
|||
{ |
|||
value: '有实体', |
|||
label: '有实体' |
|||
}, |
|||
{ |
|||
value: '实体在库', |
|||
label: '实体在库' |
|||
}, |
|||
{ |
|||
value: '实体待借', |
|||
label: '实体待借' |
|||
}, |
|||
{ |
|||
value: '实体已借', |
|||
label: '实体已借' |
|||
} |
|||
], |
|||
selectStatus: null, |
|||
|
|||
activeMenuIndex: '1', |
|||
formVisible: false, |
|||
formTitle: '项目', |
|||
formPreviewData: [], // 预览界面data |
|||
deleteVisible: false, |
|||
moveVisible: false, |
|||
exportVisible: false, |
|||
downloadVisible: false, |
|||
recoverVisible: false, |
|||
completelyDeleteVisible: false, |
|||
parentsId: null, // 父id |
|||
isDesFormType: null // 区分是门类得还是档案得 |
|||
} |
|||
}, |
|||
computed: { |
|||
...mapGetters([ |
|||
'baseApi' |
|||
]), |
|||
collectTitle() { |
|||
if (this.isTitleType === 2) { |
|||
return '项目' |
|||
} else if (this.isTitleType === 3) { |
|||
if (this.selectedCategory.arrangeType === 1) { |
|||
return '文件' |
|||
} else { |
|||
return '案卷' |
|||
// if (this.activeIndex === 1) { |
|||
// return '文件' |
|||
// } else { |
|||
// return '案卷' |
|||
// } |
|||
} |
|||
} else if (this.isTitleType === 4) { |
|||
return '卷内' |
|||
} else if (this.isTitleType === 6) { |
|||
return '原文' |
|||
} |
|||
return '' |
|||
}, |
|||
classType() { |
|||
if (this.isTitleType === 2) { |
|||
return '' |
|||
} else if (this.isTitleType === 3) { |
|||
return 'is-anjuan' |
|||
} else if (this.isTitleType === 4) { |
|||
return 'is-juannei' |
|||
} else if (this.isTitleType === 6) { |
|||
return 'is-file' |
|||
} |
|||
return '' |
|||
}, |
|||
placeholderType() { |
|||
if (this.isTitleType === 2) { |
|||
return '输入项目名称或项目编号搜索' |
|||
} else if (this.isTitleType === 3 || this.isTitleType === 4) { |
|||
return '输入题名或档号搜索' |
|||
} |
|||
return '输入项目名称或项目编号搜索' |
|||
} |
|||
}, |
|||
created() { |
|||
}, |
|||
mounted() { |
|||
if (localStorage.getItem('statusBarFixedType') !== 'undefined') { |
|||
this.fixedStatusBar = JSON.parse(localStorage.getItem('statusBarFixedType')) === true |
|||
this.$emit('status-bar-checked-changed', this.fixedStatusBar) |
|||
} |
|||
}, |
|||
methods: { |
|||
// 缓存用户对于固定栏操作习惯 |
|||
statusBarChecked(val) { |
|||
console.log('statusVal', val) |
|||
this.fixedStatusBar = val |
|||
this.$emit('status-bar-checked-changed', this.fixedStatusBar) |
|||
localStorage.setItem('statusBarFixedType', val) |
|||
}, |
|||
handleSelect(key, keyPath) { |
|||
console.log(key, keyPath) |
|||
}, |
|||
// 著录界面-form/详情-api |
|||
handleForm(type) { |
|||
if (type === 'add') { |
|||
this.formVisible = true |
|||
this.formTitle = '新增' + this.collectTitle |
|||
// this.arcId = null |
|||
} else if (type === 'edit') { |
|||
console.log(this.selections) |
|||
// this.arcId = this.selections[0].id |
|||
if (this.selections.length === 0) { |
|||
this.$message('您还未勾选需要操作的条目,请先确认!') |
|||
return false |
|||
} else if (this.selections.length > 1) { |
|||
this.$message('编辑操作只可勾选唯一目标条目,请先确认!') |
|||
return false |
|||
} |
|||
this.formVisible = true |
|||
this.formTitle = '编辑' + this.collectTitle |
|||
} |
|||
// this.form.dictionaryConfigId = {} |
|||
// this.formPreviewData = [] |
|||
// 档案预编辑获取字段 |
|||
this.getFormInfo(type) |
|||
}, |
|||
getFormInfo(type) { |
|||
FetchInitCategoryInputFieldByPid({ categoryId: this.selectedCategory.id }).then(data => { |
|||
this.formPreviewData = data |
|||
this.$nextTick(() => { |
|||
if (type === 'edit') { |
|||
this.$refs.previewForm.addOrUpdateForm = data.echo |
|||
} else { |
|||
// if (this.recycleMain.selectedCategory.isType !== 5) { |
|||
// 新增时拿到项目和案卷的相同的字段的值 |
|||
// this.formPreviewData.forEach(item => { |
|||
// if (isAnOrJuan === 1) { |
|||
// if (this.recycleMain.selectedCategory.isType !== 3) { |
|||
// if (this.recycleMain.projectSelection[item.fieldName]) { |
|||
// this.$refs.previewForm.addOrUpdateForm = JSON.parse(JSON.stringify(this.recycleMain.projectSelection)) |
|||
// } |
|||
// } |
|||
// } else if (isAnOrJuan === 2) { |
|||
// if (this.recycleMain.anjuanSelection[item.fieldName]) { |
|||
// this.$refs.previewForm.addOrUpdateForm = JSON.parse(JSON.stringify(this.recycleMain.anjuanSelection)) |
|||
// } |
|||
// } |
|||
// }) |
|||
// } |
|||
} |
|||
this.isDesFormType = 'arcives' |
|||
this.$refs.previewForm.FetchNoFormatField(this.selectedCategory.id) |
|||
}) |
|||
}) |
|||
}, |
|||
// form - submit |
|||
handlerArchivesSubmit() { |
|||
this.formVisible = false |
|||
this.$refs.previewForm.submitForm('addOrUpdateForm', this.selectedCategory.id) |
|||
this.selections = [] |
|||
}, |
|||
// 删除 - 关闭 |
|||
handleClose(done) { |
|||
this.formVisible = false |
|||
done() |
|||
}, |
|||
// 删除 |
|||
// toDelete() { |
|||
// if (this.selections.length === 0) { |
|||
// this.$message('您还未勾选需要操作的条目,请先确认!') |
|||
// return false |
|||
// } |
|||
// this.deleteVisible = true |
|||
// }, |
|||
// 删除 - 确认 |
|||
handleDelConfirm() { |
|||
this.deleteVisible = false |
|||
}, |
|||
// 导出 |
|||
handleExport() { |
|||
this.exportVisible = true |
|||
}, |
|||
handleExportConfirm() { |
|||
this.exportVisible = false |
|||
}, |
|||
// 打印 |
|||
handlePrint() { |
|||
if (this.selections.length === 0) { |
|||
this.$refs.printRef.form.printRange = '当页条目' |
|||
} else { |
|||
this.$refs.printRef.form.printRange = '勾选条目' |
|||
} |
|||
this.$refs.printRef.printVisible = true |
|||
}, |
|||
// 原文内的附件下载 |
|||
handleOriginalDownload() { |
|||
if (this.selections.length > 1 || this.selections.length === 0) { |
|||
this.$message('下载操作只可勾选唯一目标条目,请先确认!') |
|||
return false |
|||
} |
|||
}, |
|||
// 回收站 - 恢复 |
|||
toRecover() { |
|||
if (this.selections.length === 0) { |
|||
this.$message('您还未勾选需要操作的条目,请先确认!') |
|||
return false |
|||
} |
|||
this.recoverVisible = true |
|||
}, |
|||
handleRecover() { |
|||
this.recoverVisible = false |
|||
}, |
|||
// 回收站 - 彻底删除 |
|||
toCompletelyDelete() { |
|||
if (this.selections.length === 0) { |
|||
this.$message('您还未勾选需要操作的条目,请先确认!') |
|||
return false |
|||
} |
|||
this.completelyDeleteVisible = true |
|||
}, |
|||
handleCompletelyDelete() { |
|||
this.completelyDeleteVisible = false |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang='scss' scoped> |
|||
.collect-header{ |
|||
border-top: none !important; |
|||
padding: 20px 0 0 0 !important; |
|||
} |
|||
.manage-fixed-style{ |
|||
margin-bottom: 30px; |
|||
} |
|||
|
|||
</style> |
@ -0,0 +1,216 @@ |
|||
<template> |
|||
<div> |
|||
<!--打印--> |
|||
<el-dialog class="fileUpload-dialog" title="打印" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="printVisible"> |
|||
<div class="setting-dialog"> |
|||
<div class="bulk-editing-container"> |
|||
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> |
|||
<el-form-item label="打印范围" prop="printRange"> |
|||
<el-radio-group v-model="form.printRange"> |
|||
<el-radio label="勾选条目" /> |
|||
<el-radio label="当页条目" /> |
|||
</el-radio-group> |
|||
</el-form-item> |
|||
<el-form-item label="选择模板" prop="module"> |
|||
<el-select v-model="form.module" placeholder="请选择" style="width: 360px;"> |
|||
<el-option |
|||
v-for="item in printModuleOptions" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value" |
|||
/> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-form> |
|||
</div> |
|||
<div slot="footer" class="dialog-footer"> |
|||
<el-button type="text" @click="printVisible = false">取消</el-button> |
|||
<el-button type="primary" @click.native="onSubmitPrint('form')">确定</el-button> |
|||
</div> |
|||
</div> |
|||
</el-dialog> |
|||
|
|||
<div v-show="isHidden" id="print" ref="printId" class="intoExamine"> |
|||
<h3 style="text-align: center; margin:20px 0; font-size: 24px;">{{ printTitle }}</h3> |
|||
<el-table :data="printData" border> |
|||
<el-table-column type="index" label="序号" width="55" align="center" /> |
|||
<el-table-column label="档号" prop="archiveNo" align="center" width="180px" /> |
|||
<el-table-column label="文号" prop="docNo" align="center" width="160" /> |
|||
<el-table-column label="责任者" prop="responsibleby" align="center" /> |
|||
<el-table-column label="题名" prop="maintitle" align="center" width="200px" /> |
|||
<el-table-column label="日期" prop="create_time" align="center" width="100"> |
|||
<template slot-scope="scope"> |
|||
<div>{{ parseTime(scope.row.create_time, '{y}-{m}-{d}') }}</div> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="密级" prop="securityClass" align="center" /> |
|||
<el-table-column label="页数" prop="pageQty" align="center" width="60" /> |
|||
<el-table-column label="备注" prop="remarks" align="center" width="100px" /> |
|||
</el-table> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import CRUD, { presenter } from '@crud/crud' |
|||
import html2canvas from 'html2canvas' |
|||
import printJS from 'print-js' |
|||
import printJson from './printData.json' |
|||
export default { |
|||
name: 'Print', |
|||
components: { }, |
|||
mixins: [presenter()], |
|||
cruds() { |
|||
return CRUD({ |
|||
url: 'api/category/menu', |
|||
title: '', |
|||
optShow: { |
|||
} |
|||
}) |
|||
}, |
|||
data() { |
|||
return { |
|||
isHidden: false, |
|||
printData: [], |
|||
printTitle: '', |
|||
printVisible: false, |
|||
form: { |
|||
printRange: '勾选条目', |
|||
module: '' |
|||
}, |
|||
printModuleOptions: [ |
|||
{ |
|||
value: '案卷目录', |
|||
label: '案卷目录' |
|||
}, |
|||
{ |
|||
value: '卷内目录', |
|||
label: '卷内目录' |
|||
}, |
|||
{ |
|||
value: '文件目录', |
|||
label: '文件目录' |
|||
} |
|||
], |
|||
rules: { |
|||
printRange: [ |
|||
{ required: true, message: '请选择打印范围', trigger: 'change' } |
|||
], |
|||
module: [ |
|||
{ required: true, message: '请选择模板', trigger: 'change' } |
|||
] |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
|
|||
}, |
|||
methods: { |
|||
onSubmitPrint(formName) { |
|||
this.printTitle = this.form.module |
|||
this.$refs[formName].validate((valid) => { |
|||
if (valid) { |
|||
this.$message('submit!') |
|||
this.printVisible = false |
|||
this.$refs[formName].resetFields() |
|||
this.printData = printJson.data.archives |
|||
this.isHidden = true |
|||
this.$nextTick(() => { |
|||
this.printFn() |
|||
this.isHidden = false |
|||
}) |
|||
} else { |
|||
console.log('error submit!!') |
|||
return false |
|||
} |
|||
}) |
|||
}, |
|||
printFn() { |
|||
const printContent = this.$refs.printId |
|||
// 获取dom 宽度 高度 |
|||
const width = printContent.clientWidth |
|||
const height = printContent.clientHeight |
|||
// 创建一个canvas节点 |
|||
const canvas = document.createElement('canvas') |
|||
|
|||
const scale = 4 // 定义任意放大倍数,支持小数;越大,图片清晰度越高,生成图片越慢。 |
|||
canvas.width = width * scale // 定义canvas 宽度 * 缩放 |
|||
canvas.height = height * scale // 定义canvas高度 *缩放 |
|||
canvas.style.width = width * scale + 'px' |
|||
canvas.style.height = height * scale + 'px' |
|||
canvas.getContext('2d').scale(scale, scale) // 获取context,设置scale |
|||
|
|||
const scrollTop = document.documentElement.scrollTop || document.body.scrollTop // 获取滚动轴滚动的长度 |
|||
const scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft // 获取水平滚动轴的长度 |
|||
|
|||
html2canvas(printContent, { |
|||
canvas, |
|||
backgroundColor: null, |
|||
useCORS: true, |
|||
windowHeight: document.body.scrollHeight, |
|||
scrollX: -scrollLeft, // 解决水平偏移问题,防止打印的内容不全 |
|||
scrollY: -scrollTop |
|||
}).then((canvas) => { |
|||
const url = canvas.toDataURL('image/png') |
|||
printJS({ |
|||
printable: url, |
|||
type: 'image', |
|||
documentTitle: '', // 标题 |
|||
style: '@page{size:auto;margin: 0cm 1cm 0cm 1cm;}' // 去除页眉页脚 |
|||
}) |
|||
}).catch(err => { |
|||
console.error(err) |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang='scss' scoped> |
|||
.intoExamine{ |
|||
position: fixed; |
|||
left: 50%; |
|||
top: 50%; |
|||
transform: translate(-50%,-50%); |
|||
// width: 980px; |
|||
background-color: #fff; |
|||
z-index: 99; |
|||
::v-deep .el-table--group, .el-table--border{ |
|||
border: 1px solid #000; |
|||
border-bottom: none; |
|||
border-top: none; |
|||
} |
|||
::v-deep .el-table__header{ |
|||
border-top: 1px solid #000;; |
|||
border-bottom: 1px solid #000;; |
|||
} |
|||
::v-deep .el-table .el-table__header-wrapper th.el-table__cell, .el-table .el-table__header th.el-table__cell{ |
|||
color: #000; |
|||
background-color: #fff; |
|||
border-bottom: none; |
|||
&>.cell{ |
|||
color: #000; |
|||
} |
|||
} |
|||
::v-deep .el-table .el-table__body-wrapper td.el-table__cell, .el-table .el-table__fixed-right td.el-table__cell{ |
|||
color: #000; |
|||
border-bottom: 1px solid #000; |
|||
padding: 0; |
|||
} |
|||
::v-deep .el-table__body tr.el-table__row:hover>td.el-table__cell, .el-table__body tr.el-table__row:focus>td.el-table__cell, .el-table__body tr.current-row:hover>td.el-table__cell, .el-table__body tr.current-row:focus>td.el-table__cell{ |
|||
background-color: transparent; |
|||
} |
|||
::v-deep .el-table--border .el-table__cell{ |
|||
border-right: 1px solid #000; |
|||
} |
|||
} |
|||
@media print { |
|||
/*最外层打印节点*/ |
|||
html,body{ |
|||
height: inherit; |
|||
} |
|||
.intoExamine{ |
|||
margin: 0 auto; |
|||
} |
|||
} |
|||
</style> |
@ -0,0 +1,147 @@ |
|||
{ |
|||
"code": 200, |
|||
"message": "操作成功", |
|||
"data": { |
|||
"id": "ACDDC83264C5EAA41EF0AE", |
|||
"caseName": "39", |
|||
"caseType": 1, |
|||
"tid": null, |
|||
"barcode": null, |
|||
"folderLocation": "1-2-2-2-2", |
|||
"folderLocationDetails": "5F 档案库 5F_档案库_密集架 1区2列2节2层右", |
|||
"depositNum": 2, |
|||
"archives": [ |
|||
{ |
|||
"archivesId": "3DEC097518AABC675849B0", |
|||
"archiveNo": null, |
|||
"archiveCtgNo": "", |
|||
"fondsNo": null, |
|||
"itemNo": null, |
|||
"recordNo": null, |
|||
"pieceNo": "10", |
|||
"docNo": "发文字号002", |
|||
"maintitle": "测试标题002", |
|||
"securityClass": "机密", |
|||
"retention": null, |
|||
"createdDate": "20230606", |
|||
"archiveYear": 2023, |
|||
"responsibleby": null, |
|||
"department": null, |
|||
"filingPerson": null, |
|||
"filingDate": null, |
|||
"archivePerson": null, |
|||
"archiveDate": null, |
|||
"categoryId": "005E76FEC5A2AAB368CA1F", |
|||
"categoryName": "文书档案(资料)", |
|||
"categoryType": 5, |
|||
"archivesTableName": "tb_2023_06_21_1687330804487", |
|||
"caseNo": "ACDDC83264C5EAA41EF0AE", |
|||
"caseName": "39", |
|||
"shelfId": "69DEA713A0F8E4B4CBD1FF", |
|||
"folderLocation": "1-2-2-2-2", |
|||
"folderLocationDetails": "5F 档案库 5F_档案库_密集架 1区2列2节2层右", |
|||
"tagNo": null, |
|||
"child": null, |
|||
"pageQty": null, |
|||
"remarks": "", |
|||
"barcode": null, |
|||
"isDeleteTime": null, |
|||
"microfilm": null, |
|||
"arriveDate": "2023/6/30 00:00:00", |
|||
"arriveClass": "收文", |
|||
"arriveNo": "2", |
|||
"arriveMark": "收", |
|||
"sourcePartNo": "", |
|||
"recordType": "命令", |
|||
"organizer": "", |
|||
"undertaker": "", |
|||
"endorsementLeader": "", |
|||
"readingLeader": "", |
|||
"arriveOrgan": "发文机关002", |
|||
"sendOrgan": "", |
|||
"copyOrgan": "", |
|||
"serialNo": "2", |
|||
"keyword": "", |
|||
"tempNo": "39", |
|||
"mediumQty": "3", |
|||
"mediumUnit": "页", |
|||
"mediumSpecs": "", |
|||
"mediumType": null, |
|||
"beginDate": null, |
|||
"endDate": null, |
|||
"fileNo": "", |
|||
"version": "", |
|||
"create_by": "admin", |
|||
"update_by": "admin", |
|||
"create_time": 1688544910043, |
|||
"update_time": 1689820023000 |
|||
}, |
|||
{ |
|||
"archivesId": "F70E48134AEA16209994B7", |
|||
"archiveNo": null, |
|||
"archiveCtgNo": "", |
|||
"fondsNo": null, |
|||
"itemNo": null, |
|||
"recordNo": null, |
|||
"pieceNo": "10", |
|||
"docNo": "发文字号003", |
|||
"maintitle": "测试标题003", |
|||
"securityClass": "机密", |
|||
"retention": null, |
|||
"createdDate": "20230606", |
|||
"archiveYear": 2023, |
|||
"responsibleby": null, |
|||
"department": null, |
|||
"filingPerson": null, |
|||
"filingDate": null, |
|||
"archivePerson": null, |
|||
"archiveDate": null, |
|||
"categoryId": "005E76FEC5A2AAB368CA1F", |
|||
"categoryName": "文书档案(资料)", |
|||
"categoryType": 5, |
|||
"archivesTableName": "tb_2023_06_21_1687330804487", |
|||
"caseNo": "ACDDC83264C5EAA41EF0AE", |
|||
"caseName": "39", |
|||
"shelfId": null, |
|||
"folderLocation": "1-2-2-2-2", |
|||
"folderLocationDetails": "5F 档案库 5F_档案库_密集架 1区2列2节2层右", |
|||
"tagNo": null, |
|||
"child": null, |
|||
"pageQty": null, |
|||
"remarks": "", |
|||
"barcode": null, |
|||
"isDeleteTime": null, |
|||
"microfilm": null, |
|||
"arriveDate": "2023/6/30 00:00:00", |
|||
"arriveClass": "收文", |
|||
"arriveNo": "2", |
|||
"arriveMark": "收", |
|||
"sourcePartNo": "", |
|||
"recordType": "命令", |
|||
"organizer": "", |
|||
"undertaker": "", |
|||
"endorsementLeader": "", |
|||
"readingLeader": "", |
|||
"arriveOrgan": "发文机关003", |
|||
"sendOrgan": "", |
|||
"copyOrgan": "", |
|||
"serialNo": "6", |
|||
"keyword": "", |
|||
"tempNo": "39", |
|||
"mediumQty": "3", |
|||
"mediumUnit": "页", |
|||
"mediumSpecs": "", |
|||
"mediumType": null, |
|||
"beginDate": null, |
|||
"endDate": null, |
|||
"fileNo": "", |
|||
"version": "", |
|||
"create_by": "admin", |
|||
"update_by": "admin", |
|||
"create_time": 1689820023398, |
|||
"update_time": 1689820023000 |
|||
} |
|||
] |
|||
}, |
|||
"timestamp": 1690337829945 |
|||
} |
@ -0,0 +1,340 @@ |
|||
<template> |
|||
<div class="upload-file"> |
|||
<!-- 上传附件curd --> |
|||
<div v-if="isUploadDetail" class="upload-curd"> |
|||
<div class="upload-btn"> |
|||
<el-button icon="el-icon-plus" size="small" type="primary">添加</el-button> |
|||
<input id="upFile" type="file" name="upFile" @change="changeFile($event)"> |
|||
</div> |
|||
<el-button icon="el-icon-delete" :disabled="selections.length === 0" @click="toDelete(selections)">删除</el-button> |
|||
<el-button icon="el-icon-sort" @click="showSort">排序</el-button> |
|||
</div> |
|||
|
|||
<!--表格渲染--> |
|||
<el-table |
|||
ref="table" |
|||
:data="tableData" |
|||
style="min-width: 100%" |
|||
height="calc(100vh - 382px)" |
|||
@row-click="clickRowHandler" |
|||
@selection-change="selectionChangeHandler" |
|||
> |
|||
<el-table-column v-if="isUploadDetail" type="selection" width="55" 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_type" label="格式" min-width="60" align="center" /> |
|||
<el-table-column prop="file_size" label="大小" min-width="85" align="center"> |
|||
<template slot-scope="scope"> |
|||
{{ (scope.row.file_size / 1024).toFixed(2) + 'kB' }} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="file_dpi" label="分辨率" min-width="85" align="center" /> |
|||
<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)"> |
|||
</div> |
|||
<div v-else> |
|||
<svg-icon icon-class="fujian" class-name="svg-style" /> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="create_time" label="创建时间" min-width="110" align="center" /> |
|||
<el-table-column v-if="!isUploadDetail && !recycleMain.isRecycle" label="操作" min-width="100" align="center"> |
|||
<template slot-scope="scope"> |
|||
<el-button class="file-down iconfont icon-weibiaoti-2" @click="downloadFile(scope.row)">下载</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
|
|||
<!-- 点击缩略图看大图 --> |
|||
<el-dialog class="preview-dialog" :append-to-body="true" :close-on-click-modal="false" :before-close="handleClose" :visible="showCoverVisible" title="查看大图"> |
|||
<span class="dialog-right-top" /> |
|||
<span class="dialog-left-bottom" /> |
|||
<div class="setting-dialog" style="max-height:calc(100vh - 230px); overflow:auto;"> |
|||
<img style="max-width:100%; object-fit: contain;" :src="previewSrc" :onerror="defaultImg"> |
|||
</div> |
|||
</el-dialog> |
|||
|
|||
<!-- 排序 --> |
|||
<el-dialog :close-on-click-modal="false" :append-to-body="true" title="排序" :visible.sync="sortVisible" @opened="opened"> |
|||
<span class="dialog-right-top" /> |
|||
<span class="dialog-left-bottom" /> |
|||
<div class="setting-dialog"> |
|||
<i class="drag-tip">提示:请通过拖动鼠标来调整当前顺序</i> |
|||
<el-table :data="sortTableData" class="file-sort" style="width: 100%;max-height: 70vh;" row-key="id"> |
|||
<el-table-column type="index" label="序号" width="100" align="center" /> |
|||
<el-table-column prop="file_name" label="文件名称" /> |
|||
</el-table> |
|||
<div slot="footer" class="dialog-footer"> |
|||
<el-button type="primary" @click.native="handleSort">保存</el-button> |
|||
</div> |
|||
</div> |
|||
</el-dialog> |
|||
|
|||
<!-- 删除附件 --> |
|||
<el-dialog title="删除附件" :append-to-body="true" :close-on-click-modal="false" :visible.sync="deleteVisible" :before-close="handleClose"> |
|||
<span class="dialog-right-top" /> |
|||
<span class="dialog-left-bottom" /> |
|||
<div class="setting-dialog"> |
|||
<div class="dialog-delt"> |
|||
<p><span>确定删除已选择的附件吗?</span></p> |
|||
</div> |
|||
<div slot="footer" class="dialog-footer"> |
|||
<el-button type="primary" @click.native="handleDeltConfirm">确定</el-button> |
|||
</div> |
|||
</div> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { FetchInitArchiveFilesView, FetchEditFile, FetchDeleteFile, FetchFileSort } from '@/api/archivesManage/archivesList' |
|||
import { archivesUpload } from '@/utils/upload' |
|||
import { downloadFile, getCurrentTime } from '@/utils/index' |
|||
import { mapGetters } from 'vuex' |
|||
import { form } from '@crud/crud' |
|||
import Sortable from 'sortablejs' |
|||
export default { |
|||
name: 'UploadFile', |
|||
components: {}, |
|||
mixins: [ |
|||
form({}) |
|||
], |
|||
inject: ['recycleMain'], |
|||
props: { |
|||
isUploadDetail: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
categoryId: { |
|||
type: String, |
|||
default: function() { |
|||
return '' |
|||
} |
|||
}, |
|||
arcId: { |
|||
type: String, |
|||
default: function() { |
|||
return '' |
|||
} |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
defaultImg: 'this.src="' + require('@/assets/images/cover-bg.png') + '"', |
|||
tableData: [], // 附件list |
|||
selections: [], // table - 选中的 |
|||
showCoverVisible: false, // 查看大图dialog |
|||
sortTableData: [], // 排序data |
|||
sortVisible: false, // 排序dialog |
|||
deleteVisible: false, // 删除附件 dialog |
|||
deleteData: [], // 删除选中的data |
|||
file: null, // 附件 change |
|||
fileNames: '', // 附件 - name |
|||
formatType: '', // 附件 - type |
|||
postfix: '', // 附件 - 文件后缀 |
|||
fileSize: '', // 附件 - 大小 |
|||
filePath: '', // 附件 - path |
|||
px: '', // 附件 - 分辨率 |
|||
nowDate: '', // 当前时间 |
|||
previewSrc: '' // 查看大图src |
|||
} |
|||
}, |
|||
computed: { |
|||
...mapGetters([ |
|||
'baseApi' |
|||
]) |
|||
}, |
|||
watch: { |
|||
arcId: function(newValue, oldValue) { |
|||
} |
|||
}, |
|||
methods: { |
|||
// 选择附件 |
|||
async changeFile(e) { |
|||
this.file = e.target.files[0] |
|||
this.fileSize = this.file.size |
|||
this.formatType = this.file.type.substring(0, this.file.type.indexOf('/')) |
|||
this.fileNames = this.file.name |
|||
this.postfix = this.file.name.substring( |
|||
this.fileNames.lastIndexOf('.') + 1, |
|||
this.fileNames.length |
|||
) |
|||
if (this.formatType === 'image') { |
|||
const fileBase64 = await this.getBase64(this.file) |
|||
const res = await this.getImgPx(fileBase64) |
|||
this.px = res.width + 'px*' + res.height + 'px' |
|||
} else { |
|||
this.px = '' |
|||
} |
|||
// 上传附件 |
|||
archivesUpload(this.baseApi + '/api/archives/uploadFile', this.file, this.categoryId).then(res => { |
|||
if (res.data.code === 200) { |
|||
this.filePath = res.data.data |
|||
this.uploadSave() |
|||
} |
|||
}) |
|||
}, |
|||
// 上传附件 - 选择上传即保存 |
|||
uploadSave() { |
|||
this.nowDate = getCurrentTime() |
|||
const json = { |
|||
'file_name': this.fileNames, |
|||
'file_size': this.fileSize, |
|||
'file_type': this.postfix, |
|||
'file_path': this.filePath, |
|||
'sequence': null, |
|||
'archive_id': this.arcId, |
|||
'file_dpi': this.px, |
|||
'file_thumbnail': '', |
|||
'create_time': this.nowDate, |
|||
'id': null |
|||
} |
|||
const arrayUpload = [] |
|||
arrayUpload.push(json) |
|||
const params = { |
|||
'categoryId': this.categoryId, |
|||
'jsonString': JSON.stringify(arrayUpload) |
|||
} |
|||
FetchEditFile(params).then(data => { |
|||
this.$message.success('上传附件成功!') |
|||
this.crud.refresh() |
|||
this.getFileList() |
|||
}) |
|||
}, |
|||
// 将上传的图片转为base64 |
|||
getBase64(file) { |
|||
const reader = new FileReader() |
|||
reader.readAsDataURL(file) |
|||
return new Promise((resolve) => { |
|||
reader.onload = () => { |
|||
resolve(reader.result) |
|||
} |
|||
}) |
|||
}, |
|||
// 获取图片的分辨率 |
|||
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 }) |
|||
} |
|||
}) |
|||
}, |
|||
// 上传list |
|||
getFileList() { |
|||
const params = { |
|||
'categoryId': this.categoryId, |
|||
'archiveId': this.arcId |
|||
} |
|||
FetchInitArchiveFilesView(params).then(data => { |
|||
this.tableData = data.returnlist |
|||
}) |
|||
}, |
|||
// 下载附件 |
|||
downloadFile(row) { |
|||
const url = this.baseApi + '/downloadFile' + row.file_path |
|||
fetch(url).then(res => res.blob()).then(blob => { |
|||
downloadFile(blob, row.file_name.split('.')[0], row.file_type) |
|||
}).catch(() => { |
|||
this.$message.error('下载文件失败!') |
|||
}) |
|||
}, |
|||
// 选择删除 |
|||
toDelete(data) { |
|||
this.deleteData = data |
|||
this.deleteVisible = true |
|||
}, |
|||
// 确认删除 |
|||
handleDeltConfirm() { |
|||
this.deleteVisible = false |
|||
const ids = [] |
|||
this.deleteData.forEach(val => { |
|||
ids.push(val.id) |
|||
}) |
|||
const params = { |
|||
'ids': ids, |
|||
'categoryId': this.categoryId |
|||
} |
|||
// 删除fetch |
|||
FetchDeleteFile(params).then(res => { |
|||
this.crud.delAllLoading = false |
|||
this.$message.success('删除成功!') |
|||
this.crud.refresh() |
|||
this.getFileList() |
|||
}) |
|||
}, |
|||
// 排序 - 行拖拽 |
|||
rowDrop(className, targetName) { |
|||
// 此时找到的元素是要拖拽元素的父容器 |
|||
const tbody = document.querySelector('.' + className + ' .el-table__body-wrapper tbody') |
|||
const that = this |
|||
Sortable.create(tbody, { |
|||
// 指定父元素下可被拖拽的子元素 |
|||
draggable: '.el-table__row', |
|||
onEnd({ newIndex, oldIndex }) { |
|||
if (newIndex === oldIndex) return |
|||
that[targetName].splice(newIndex, 0, that[targetName].splice(oldIndex, 1)[0]) |
|||
} |
|||
}) |
|||
}, |
|||
// 排序 |
|||
opened() { |
|||
this.rowDrop('file-sort', 'sortTableData') |
|||
}, |
|||
showSort() { |
|||
this.sortVisible = true |
|||
this.sortTableData = JSON.parse(JSON.stringify(this.tableData)) |
|||
}, |
|||
// 排序 - 保存 |
|||
handleSort() { |
|||
const ids = [] |
|||
const sequences = [] |
|||
this.sortTableData.map((value, index) => { |
|||
ids.push(value.id) |
|||
sequences.push(index + 1) |
|||
}) |
|||
const params = { |
|||
'categoryId': this.categoryId, |
|||
'ids': ids, |
|||
'sequences': sequences |
|||
} |
|||
FetchFileSort(params).then((res) => { |
|||
this.sortVisible = false |
|||
this.$message.success('附件排序成功!') |
|||
this.crud.refresh() |
|||
this.getFileList() |
|||
}) |
|||
}, |
|||
// table |
|||
clickRowHandler(row) { |
|||
this.$refs.table.toggleRowSelection(row) |
|||
}, |
|||
// table |
|||
selectionChangeHandler(val) { |
|||
this.selections = val |
|||
}, |
|||
// dialog - close |
|||
handleClose(done) { |
|||
this.showCoverVisible = false |
|||
done() |
|||
}, |
|||
// 查看大图 |
|||
showCoverPreview(row) { |
|||
this.showCoverVisible = true |
|||
this.previewSrc = this.baseApi + '/downloadFile' + row.file_path |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.svg-style{ |
|||
width: 60px; |
|||
height: 32px; |
|||
} |
|||
</style> |
@ -0,0 +1,177 @@ |
|||
<template> |
|||
<div class="collect-no-tab"> |
|||
<CollectHeader ref="collectHeaderRef" :is-title-type="isTitleType" :selected-category="selectedCategory" :arc-id="arcId" :selections="selections" :is-recycle="isRecycle" /> |
|||
<!-- <el-button type="text" @click="openAnjuan">打开案卷的Drawer</el-button> --> |
|||
<el-table |
|||
ref="table" |
|||
v-loading="crud.loading || getTableDisplayFieldsLoading" |
|||
class="archives-table" |
|||
:data="projectData" |
|||
highlight-current-row |
|||
style="width: 100%;" |
|||
:row-key="rowKey" |
|||
:row-class-name="tableRowClassName" |
|||
@select-all="selectAll" |
|||
@selection-change="crud.selectionChangeHandler" |
|||
@row-click="clickRowHandler" |
|||
@cell-dblclick="tableDoubleClick" |
|||
@select="handleCurrentChange" |
|||
> |
|||
<el-table-column type="selection" :reserve-selection="true" width="55" align="center" /> |
|||
<el-table-column type="index" label="序号" width="55" align="center" /> |
|||
<el-table-column label="案卷" prop="children_num" width="55" align="center" /> |
|||
<el-table-column v-for="field in tableDisplayFields" :key="field.id" :label="field.fieldCnName" :align="field.displayformatType" :width="field.displayLength" show-overflow-tooltip> |
|||
<template slot="header"> |
|||
<el-tooltip |
|||
class="item" |
|||
effect="dark" |
|||
:content="field.fieldCnName" |
|||
placement="top-start" |
|||
> |
|||
<span>{{ field.fieldCnName }}</span> |
|||
</el-tooltip> |
|||
</template> |
|||
<template slot-scope="scope"> |
|||
{{ scope.row[field.fieldName] }} |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!--分页组件--> |
|||
<el-pagination |
|||
v-if="projectData.length !== 0" |
|||
: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" |
|||
/> |
|||
<!-- 档案详情 --> |
|||
<ArchivesInfo ref="archivesInfo" :category-id="categoryId" :arc-id="arcId" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { collectionLibraryCrud } from '../mixins/index' |
|||
import { header, form } from '@crud/crud' |
|||
import CollectHeader from '../module/collectHeader.vue' |
|||
import ArchivesInfo from '../module/archivesInfo/index' |
|||
|
|||
import tableData from '../anjuan/table.json' |
|||
import jsonData from '../anjuan/data.json' |
|||
|
|||
export default { |
|||
name: 'Project', |
|||
components: { CollectHeader, ArchivesInfo }, |
|||
mixins: [ |
|||
header(), |
|||
form({}), |
|||
collectionLibraryCrud |
|||
], |
|||
props: { |
|||
data: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
selectedCategory: { |
|||
type: Object, |
|||
default: function() { |
|||
return {} |
|||
} |
|||
}, |
|||
isRecycle: { |
|||
type: Boolean, |
|||
default: false |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
isTitleType: 2, |
|||
categoryId: 'B073E8430B85B4821E7360', |
|||
arcId: '2946C34412182B73FBC287', |
|||
activeIndex: '1' |
|||
} |
|||
}, |
|||
watch: { |
|||
selectedCategory: function(newValue, oldValue) { |
|||
}, |
|||
tableDisplayFields(val) { |
|||
this.doLayout() |
|||
} |
|||
}, |
|||
created() { |
|||
this.tableDisplayFields = tableData.data |
|||
this.projectData = jsonData.data.list.content |
|||
}, |
|||
mounted() { |
|||
}, |
|||
methods: { |
|||
getCommonData(type) { |
|||
this.getViewTable(type) |
|||
}, |
|||
openAnjuan(data) { |
|||
// this.$emit('openAnjuan', '传值') |
|||
this.$emit('openAnjuan', data) |
|||
}, |
|||
rowKey(row) { |
|||
return row.id |
|||
}, |
|||
// table选中加上选中状态 |
|||
tableRowClassName({ row, rowIndex }) { |
|||
// console.log('添加类名', row, rowIndex) |
|||
let color = '' |
|||
this.selections.forEach(item => { |
|||
if (item.id === row.id) { |
|||
color = 'rowStyle' |
|||
} |
|||
}) |
|||
return color |
|||
}, |
|||
// table - 全选 |
|||
selectAll(val) { |
|||
this.selections = val |
|||
}, |
|||
// table - 双击查看详情 |
|||
tableDoubleClick(row) { |
|||
if (this.timer) { |
|||
clearTimeout(this.timer) |
|||
} |
|||
console.log('tableDoubleClick', row) |
|||
this.arcId = row.id |
|||
this.$refs.archivesInfo.detailTitle = '项目详情' |
|||
this.$refs.archivesInfo.archivesInfoVisible = true |
|||
this.$refs.archivesInfo.archivesTabIndex = 0 |
|||
// this.$refs.archivesInfo.getDetial(row.id) |
|||
}, |
|||
// table - 当前选中得row |
|||
clickRowHandler(row) { |
|||
console.log('clickRowHandler', row) |
|||
if (this.timer) { |
|||
clearTimeout(this.timer) |
|||
} |
|||
this.timer = setTimeout(() => { |
|||
this.openAnjuan(row.item_no) |
|||
}, 300) |
|||
this.selections = this.crud.selections |
|||
}, |
|||
// 触发单选 |
|||
handleCurrentChange(selection, row) { |
|||
console.log('触发单选', row) |
|||
this.selections = selection |
|||
}, |
|||
handleSizeChange(size) { |
|||
this.page.size = size |
|||
this.page.page = 1 |
|||
this.getViewTable(1) |
|||
}, |
|||
handleCurrentPage(val) { |
|||
this.page.page = val |
|||
this.getViewTable(1) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang='scss' scoped> |
|||
</style> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue