diff --git a/src/api/collect/collect.js b/src/api/collect/collect.js index 0db561e..36bb34f 100644 --- a/src/api/collect/collect.js +++ b/src/api/collect/collect.js @@ -10,12 +10,12 @@ export function FetchInitCategoryViewTable(params) { } // 根据门类父id获取卷内列表 -export function FetchInitSingleCategoryView(params) { +export function FetchInitCategoryView(params) { return request({ - url: 'api/collect/initSingleCategoryView', + url: 'api/collect/initCategoryView', method: 'get', params }) } -export default { FetchInitCategoryViewTable, FetchInitSingleCategoryView } +export default { FetchInitCategoryViewTable, FetchInitCategoryView } diff --git a/src/views/collectReorganizi/collectionLibrary/anjuan/tableData.json b/src/views/collectReorganizi/collectionLibrary/anjuan/tableData.json deleted file mode 100644 index 3d505f4..0000000 --- a/src/views/collectReorganizi/collectionLibrary/anjuan/tableData.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "code": 200, - "message": "操作成功", - "data": { - "list": { - "content": [ - { - "case_no": "746DF968E7E629CAEFF889", - "begin_date": "2023-07-02", - "piece_qty": "3", - "children_num": 3, - "tid": "", - "maintitle": "测试案卷001", - "security_class": "秘密", - "archive_year": 2023, - "archive_no": "AA001-Y-WS.W-2023-001", - "id": "256E752BC0280618840600", - "is_storage": 2, - "keyword": "测试主题词001", - "is_borrow": 3 - }, - { - "case_no": "EFF2101F6A116FFC93B35A", - "begin_date": "", - "piece_qty": "2", - "children_num": 2, - "tid": "", - "maintitle": "测试案卷002", - "security_class": "机密", - "archive_year": 2023, - "archive_no": "AA001-Y-WS.W-2023-002", - "id": "F33725454340EA10A2C8B9", - "is_storage": 1, - "keyword": "", - "is_borrow": "" - } - ], - "totalElements": 2 - }, - "yearGroup": [ - 2023 - ] - }, - "timestamp": 1689579707329 -} \ No newline at end of file diff --git a/src/views/collectReorganizi/collectionLibrary/anjuan/tableFields.json b/src/views/collectReorganizi/collectionLibrary/anjuan/tableFields.json deleted file mode 100644 index 1fbaf3f..0000000 --- a/src/views/collectReorganizi/collectionLibrary/anjuan/tableFields.json +++ /dev/null @@ -1,285 +0,0 @@ -{ - "code": 200, - "message": "操作成功", - "data": [ - { - "id": "5385EE4261D5D5D69C86D1", - "categoryId": "F0F59CC713C83AE4BAB99B", - "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": 1687319105000, - "update_time": 1688020466000 - }, - { - "id": "2604E1A40EB3B355A3C370", - "categoryId": "F0F59CC713C83AE4BAB99B", - "dictionaryConfigId": null, - "fieldName": "archive_no", - "fieldCnName": "档号", - "isDefaultValue": "", - "isInputClass": "text", - "isDataType": 1, - "isDataTypeDetails": "varchar", - "isColumnLength": 200, - "isColumnType": 2, - "isSequence": 6, - "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": 2, - "displayOrderBy": "asc", - "isDisplayformat": null, - "displayformatType": "left", - "editLength": 510, - "displayLength": 250, - "queue": 1, - "create_by": "admin", - "update_by": "admin", - "create_time": 1687319105000, - "update_time": 1688020466000 - }, - { - "id": "E8AAD60B450EF88BA7415D", - "categoryId": "F0F59CC713C83AE4BAB99B", - "dictionaryConfigId": null, - "fieldName": "maintitle", - "fieldCnName": "题名", - "isDefaultValue": "", - "isInputClass": "text", - "isDataType": 1, - "isDataTypeDetails": "varchar", - "isColumnLength": 1000, - "isColumnType": 2, - "isSequence": 7, - "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": 3, - "displayOrderBy": null, - "isDisplayformat": null, - "displayformatType": "left", - "editLength": 510, - "displayLength": 450, - "queue": null, - "create_by": "admin", - "update_by": "admin", - "create_time": 1687319105000, - "update_time": 1688020466000 - }, - { - "id": "3DCF574299CB2061F07E06", - "categoryId": "F0F59CC713C83AE4BAB99B", - "dictionaryConfigId": null, - "fieldName": "keyword", - "fieldCnName": "主题词", - "isDefaultValue": "", - "isInputClass": "text", - "isDataType": 1, - "isDataTypeDetails": "varchar", - "isColumnLength": 1000, - "isColumnType": 2, - "isSequence": 8, - "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": "center", - "editLength": 510, - "displayLength": 100, - "queue": null, - "create_by": "admin", - "update_by": "admin", - "create_time": 1687319105000, - "update_time": 1688020466000 - }, - { - "id": "DD1AC11CFC48B42B152DD1", - "categoryId": "F0F59CC713C83AE4BAB99B", - "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": 5, - "displayOrderBy": null, - "isDisplayformat": null, - "displayformatType": "center", - "editLength": 196, - "displayLength": 150, - "queue": null, - "create_by": "admin", - "update_by": "admin", - "create_time": 1687319105000, - "update_time": 1688020466000 - }, - { - "id": "AB02D37F2F2F86A255DE91", - "categoryId": "F0F59CC713C83AE4BAB99B", - "dictionaryConfigId": null, - "fieldName": "begin_date", - "fieldCnName": "开始时间", - "isDefaultValue": "", - "isInputClass": "text", - "isDataType": 1, - "isDataTypeDetails": "varchar", - "isColumnLength": 20, - "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": 6, - "displayOrderBy": null, - "isDisplayformat": null, - "displayformatType": "center", - "editLength": 196, - "displayLength": 100, - "queue": null, - "create_by": "admin", - "update_by": "admin", - "create_time": 1687319105000, - "update_time": 1688020466000 - }, - { - "id": "A9F24C3CDC805513389502", - "categoryId": "F0F59CC713C83AE4BAB99B", - "dictionaryConfigId": null, - "fieldName": "piece_qty", - "fieldCnName": "文件件数", - "isDefaultValue": "", - "isInputClass": "text", - "isDataType": 1, - "isDataTypeDetails": "varchar", - "isColumnLength": 20, - "isColumnType": 2, - "isSequence": 12, - "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": "right", - "editLength": 196, - "displayLength": 150, - "queue": null, - "create_by": "admin", - "update_by": "admin", - "create_time": 1687319105000, - "update_time": 1688020466000 - } - ], - "timestamp": 1689579706946 -} \ No newline at end of file diff --git a/src/views/collectReorganizi/collectionLibrary/anjuan/tableList.vue b/src/views/collectReorganizi/collectionLibrary/anjuan/tableList.vue index e51b220..38b5cad 100644 --- a/src/views/collectReorganizi/collectionLibrary/anjuan/tableList.vue +++ b/src/views/collectReorganizi/collectionLibrary/anjuan/tableList.vue @@ -3,7 +3,7 @@ import { header, form } from '@crud/crud' +import { collectionLibraryCrud } from '../mixins/index' import ArchivesInfo from '../module/archivesInfo/index' import CollectHeader from '../module/collectHeader.vue' -import tableFields from './tableFields.json' -import tableData from './tableData.json' export default { name: 'Sorted', components: { ArchivesInfo, CollectHeader }, mixins: [ header(), - form({}) + form({}), + collectionLibraryCrud ], props: { isTitleType: { @@ -89,18 +90,8 @@ export default { }, data() { return { - anjuanData: [], - tableDisplayFields: [], // table-list-title字段 - getTableDisplayFieldsLoading: false, // table-loading - selections: [], categoryId: 'F0F59CC713C83AE4BAB99B', - arcId: '256E752BC0280618840600', - page: { - page: 1, - size: 10, - total: 0 - }, - timer: null + arcId: '256E752BC0280618840600' } }, watch: { @@ -117,12 +108,17 @@ export default { } }, created() { - this.tableDisplayFields = tableFields.data - this.anjuanData = tableData.data.list.content }, mounted() { + }, methods: { + getCommonData(type) { + this.getViewTable(type) + }, + rowKey(row) { + return row.id + }, openJuannei(data) { // this.$emit('openJuannei', '这是来自案卷的通知') if (this.selectedCategory.arrangeType === 3) { @@ -131,12 +127,6 @@ export default { this.$parent.$parent.$emit('openJuannei', data) } }, - handleSelect(key, keyPath) { - console.log(key, keyPath) - }, - rowKey(row) { - return row.id - }, // table选中加上选中状态 tableRowClassName({ row, rowIndex }) { // console.log('添加类名', row, rowIndex) @@ -172,17 +162,6 @@ export default { this.$refs.archivesInfo.isHasFile = true this.$refs.archivesInfo.detailTitle = '文件详情' } - - // if (this.selectedCategory.arrangeType === 2) { - // if (this.activeIndex === 1) { - // this.$refs.archivesInfo.detailTitle = '文件详情' - // this.$refs.archivesInfo.isHasFile = true - // } else { - // this.$refs.archivesInfo.detailTitle = '案卷详情' - // } - // } else { - // this.$refs.archivesInfo.detailTitle = '文件详情' - // } this.$refs.archivesInfo.archivesInfoVisible = true this.$refs.archivesInfo.archivesTabIndex = 0 // this.$refs.archivesInfo.getDetial(row.id) @@ -206,15 +185,11 @@ export default { handleSizeChange(size) { this.page.size = size this.page.page = 1 + this.getViewTable(2) }, handleCurrentPage(val) { this.page.page = val - }, - /* 重新渲染table组件 防止table-fixed 错位 配合watch-table数据 */ - doLayout() { - this.$nextTick(() => { - this.$refs.table.doLayout() - }) + this.getViewTable(2) } } } diff --git a/src/views/collectReorganizi/collectionLibrary/file/index.vue b/src/views/collectReorganizi/collectionLibrary/file/index.vue index ddf7fc3..aa8c2a2 100644 --- a/src/views/collectReorganizi/collectionLibrary/file/index.vue +++ b/src/views/collectReorganizi/collectionLibrary/file/index.vue @@ -54,6 +54,7 @@