diff --git a/src/views/archivesManage/managementLibrary/anjuan/index.vue b/src/views/archivesManage/managementLibrary/anjuan/index.vue index 5682a6b..0f03e9b 100644 --- a/src/views/archivesManage/managementLibrary/anjuan/index.vue +++ b/src/views/archivesManage/managementLibrary/anjuan/index.vue @@ -58,6 +58,7 @@ export default { closeDrawer() { this.anjuanDrawer = false this.$parent.parentsProjectId = null + this.$parent.parentsProjectRow = null } } } diff --git a/src/views/archivesManage/managementLibrary/index.vue b/src/views/archivesManage/managementLibrary/index.vue index b29c09f..d7c7b79 100644 --- a/src/views/archivesManage/managementLibrary/index.vue +++ b/src/views/archivesManage/managementLibrary/index.vue @@ -129,6 +129,7 @@ export default { selectedCategory: {}, yearChildData: '', parentsProjectId: null, + parentsProjectRow: null, parentsAnjuanId: null, parentsJuanneiId: null, smartQuery: { @@ -253,6 +254,7 @@ export default { this.parentsProjectId = null this.parentsAnjuanId = null this.parentsJuanneiId = null + this.parentsProjectRow = null // 缓存当前的选中的 localStorage.setItem('currentArchivesKey', JSON.stringify(val)) this.selectedCategory = val @@ -264,6 +266,7 @@ export default { } this.$nextTick(() => { this.handlePageList() + this.getDictsList() }) }, handlePageList(isQuickFilter) { @@ -389,9 +392,9 @@ export default { } } }, - handleOpenAnjuan(data, parentId) { + handleOpenAnjuan(data, parentId, parentsRow) { this.parentsProjectId = parentId - console.log('this.parentsProjectId', this.parentsProjectId) + this.parentsProjectRow = parentsRow this.$refs.anjuanEle.anjuanDrawer = true this.activeIndex = 0 if (this.$refs.anjuanEle.$refs.ajContent) { @@ -509,6 +512,7 @@ export default { ::v-deep .custom-tree-node{ font-size: 14px; + font-weight: normal; } [data-theme=light] .elect-cont-right { diff --git a/src/views/archivesManage/managementLibrary/mixins/index.js b/src/views/archivesManage/managementLibrary/mixins/index.js index efcd0ea..2d5f6b7 100644 --- a/src/views/archivesManage/managementLibrary/mixins/index.js +++ b/src/views/archivesManage/managementLibrary/mixins/index.js @@ -1,6 +1,7 @@ import { FetchInitCategoryViewTable } from '@/api/collect/collect' import { FetchInitContorlView } from '@/api/archivesManage/library' +import { FetchDictionaryTree } from '@/api/system/dict' import { crud } from '@crud/crud' export const manageLibraryCrud = { mixins: [crud()], @@ -84,7 +85,6 @@ export const manageLibraryCrud = { } } } - setTimeout(() => { this.getViewTable(categoryLevel, this.parentsId, 'search') }, 200) @@ -234,7 +234,86 @@ export const manageLibraryCrud = { } }) }, + // 项目级别 - 阶段分类 + getDictsList(type) { + FetchDictionaryTree().then((res) => { + const filterCodes = ['project_class'] + let filteredItems = JSON.parse(JSON.stringify(res)).filter(item => filterCodes.includes(item.dictionaryCode)) + filteredItems = this.addLevelToDictionaryList(filteredItems, 1) + if (type === 1) { + let fiterData = [] + fiterData = filteredItems.flatMap(item => { + const level2Childs = item.childDictionarys.filter(child => { + return child.dictionaryParents === item.id && child.level === 2 + }) + return level2Childs + }) + if (this.parentsData.parentsProjectRow) { + console.log(this.parentsData.parentsProjectRow.project_class) + const anjuanObj = this.parentsData.$refs.anjuanEle.$refs.ajContent.$refs.tableList + anjuanObj.$refs.collectHeaderRef.projectOptions = [] + if (this.parentsData.parentsProjectRow.project_class !== '') { + const findDic = fiterData.find(item => item.dictionaryName === this.parentsData.parentsProjectRow.project_class) + anjuanObj.$refs.collectHeaderRef.projectOptions.push(findDic) + } else { + console.log(fiterData) + anjuanObj.$refs.collectHeaderRef.projectOptions = fiterData + } + } + } else { + if (this.selectedCategory.arrangeType === 3) { + const projectObj = this.$refs.projectEle + // this.projectOptions = this.filterData(filteredItems, filteredItems[0].id) + projectObj.$refs.collectHeaderRef.projectOptions = filteredItems.flatMap(item => { + const level2Childs = item.childDictionarys.filter(child => { + return child.dictionaryParents === item.id && child.level === 2 + }) + // 将满足条件的子项目的childDictionarys设置为空数组,因为项目页不需要 + level2Childs.forEach(child => { + child.childDictionarys = [] + }) + return level2Childs + }) + } + } + }).catch(err => { + console.log(err) + }) + }, + // 显示第一级和第二级 + // filterData(data, targetId) { + // return data.filter(item => { + // if (item.id === targetId || item.dictionaryParents === targetId) { + // if (item.childDictionarys && item.childDictionarys.length > 0) { + // item.childDictionarys = this.filterData(item.childDictionarys, targetId) + // } + // return true + // } + // return false + // }) + // }, + // 给筛选出来的数据加level 方便后面是否可点击 + addLevelToDictionaryList(dictionaryList, level) { + dictionaryList.forEach(dictionary => { + dictionary.level = level + if (dictionary.childDictionarys) { + dictionary.childDictionarys = this.addLevelToDictionaryList(dictionary.childDictionarys, level + 1) + } + }) + return dictionaryList + }, + normalizerProject(node) { + if ((node.childDictionarys && !node.childDictionarys.length) || node.childDictionarys === null) { + delete node.childDictionarys + } + return { + id: node.dictionaryName, + label: `${node.dictionaryName} - ${node.dictionaryCode}`, + children: node.childDictionarys, + isDisabled: this.isTitleType === 3 ? node.level !== 3 : node.level === 1 + } + }, /* 重新渲染table组件 防止table-fixed 错位 配合watch-table数据 */ doLayout() { this.$nextTick(() => { diff --git a/src/views/archivesManage/managementLibrary/module/collectHeader.vue b/src/views/archivesManage/managementLibrary/module/collectHeader.vue index 36c02b1..373de62 100644 --- a/src/views/archivesManage/managementLibrary/module/collectHeader.vue +++ b/src/views/archivesManage/managementLibrary/module/collectHeader.vue @@ -4,12 +4,12 @@

{{ collectTitle }}

@@ -62,7 +63,7 @@ >

@@ -197,7 +198,6 @@ import { manageLibraryCrud } from '../mixins/index' import { FetchInitCategoryInputFieldByPid } from '@/api/system/category/category' import { FetchDetailsById, FetchCompleteDelArchives, FetchRestoreArchives } from '@/api/collect/collect' import { FetchArchivesClassTree } from '@/api/system/archivesClass' -import { FetchDictionaryTree } from '@/api/system/dict' import Treeselect from '@riophae/vue-treeselect' import '@riophae/vue-treeselect/dist/vue-treeselect.css' import PreviewForm from '@/views/components/category/PreviewForm' @@ -437,13 +437,20 @@ export default { return '输入题名或档号搜索' } return '输入项目名称或编号搜索' + }, + projectPlaceholder() { + if (this.isTitleType === 2) { + return '请选择项目分类' + } else if (this.isTitleType === 3) { + return '请选择项目阶段' + } + return '请选择项目分类' } }, created() { }, mounted() { this.getInitArchivesClass() - this.getDictsList() if (localStorage.getItem('statusBarFixedType') !== 'undefined') { this.parentsData.fixedStatusBar = JSON.parse(localStorage.getItem('statusBarFixedType')) === true } @@ -485,58 +492,6 @@ export default { children: node.childArchivesClass } }, - // 项目级别 - 阶段分类 - getDictsList() { - this.projectOptions = [] - FetchDictionaryTree().then((res) => { - const filterCodes = ['project_class'] - let filteredItems = JSON.parse(JSON.stringify(res)).filter(item => filterCodes.includes(item.dictionaryCode)) - filteredItems = this.addLevelToDictionaryList(filteredItems, 1) - if (this.selectedCategory.arrangeType === 3 && this.isTitleType === 3) { - this.projectOptions = filteredItems - } else { - this.projectOptions = this.filterData(filteredItems, filteredItems[0].id) - } - }).catch(err => { - console.log(err) - }) - }, - // 显示第一级和第二级 - filterData(data, targetId) { - return data.filter(item => { - if (item.id === targetId || item.dictionaryParents === targetId) { - if (item.childDictionarys && item.childDictionarys.length > 0) { - item.childDictionarys = this.filterData(item.childDictionarys, targetId) - } - return true - } - return false - }) - }, - // 给筛选出来的数据加level 方便后面是否可点击 - addLevelToDictionaryList(dictionaryList, level) { - dictionaryList.forEach(dictionary => { - dictionary.level = level - if (dictionary.childDictionarys) { - dictionary.childDictionarys = this.addLevelToDictionaryList(dictionary.childDictionarys, level + 1) - } - }) - return dictionaryList - }, - getLabel(node) { - return `ID: ${node.id}, Name: ${node.label}` - }, - normalizerProject(node) { - if ((node.childDictionarys && !node.childDictionarys.length) || node.childDictionarys === null) { - delete node.childDictionarys - } - return { - id: node.dictionaryName, - label: node.level !== 1 ? `${node.dictionaryName} - ${node.dictionaryCode}` : `${node.dictionaryName}`, - children: node.childDictionarys, - isDisabled: this.isTitleType === 3 ? node.level !== 3 : node.level === 1 - } - }, handleSelect(key, keyPath) { console.log(key, keyPath) }, @@ -909,6 +864,33 @@ export default { } } ::v-deep .vue-treeselect__list-item{ - width: 200px; + width: 220px; +} +::v-deep .vue-treeselect__menu { + padding: 20px 0; +} +::v-deep .vue-treeselect__option--highlight{ + background: #f5f9fc !important; + color: #0348f3 !important; +} +::v-deep .vue-treeselect__option-arrow-container .vue-treeselect__option-arrow{ + color: #1c1c1c !important; +} +::v-deep .vue-treeselect__placeholder{ + font-size: 14px; +} +::v-deep .vue-treeselect__label-container{ + font-size: 14px; + height: 34px; + line-height: 34px; + color: #1c1c1c; +} +::v-deep .vue-treeselect__option.vue-treeselect__option--disabled{ + .vue-treeselect__label-container{ + color: #545b65 !important; + } +} +::v-deep.vue-treeselect--has-value .vue-treeselect__single-value{ + font-size: 14px; } diff --git a/src/views/archivesManage/managementLibrary/project/index.vue b/src/views/archivesManage/managementLibrary/project/index.vue index 751101f..17aa740 100644 --- a/src/views/archivesManage/managementLibrary/project/index.vue +++ b/src/views/archivesManage/managementLibrary/project/index.vue @@ -125,9 +125,9 @@ export default { sendYearDataToParent() { this.$emit('myYearEvent', this.yearData) }, - openAnjuan(data, parentId) { + openAnjuan(data, parentId, parentRow) { // this.$emit('openAnjuan', '传值') - this.$emit('openAnjuan', data, parentId) + this.$emit('openAnjuan', data, parentId, parentRow) }, rowKey(row) { return row.id @@ -175,7 +175,8 @@ export default { } this.timer = setTimeout(() => { this.parentId = row.id - this.openAnjuan('所属项目:' + row.project_no, this.parentId) + this.openAnjuan('所属项目:' + row.project_no, this.parentId, row) + this.getDictsList(1) }, 300) this.selections = this.crud.selections }, diff --git a/src/views/collectReorganizi/batchConnection/module/detail.vue b/src/views/collectReorganizi/batchConnection/module/detail.vue index 497e358..978308c 100644 --- a/src/views/collectReorganizi/batchConnection/module/detail.vue +++ b/src/views/collectReorganizi/batchConnection/module/detail.vue @@ -8,7 +8,7 @@

  • 操作人:{{ hitchObject && hitchObject.createBy }}
  • 操作时间:{{ hitchObject && hitchObject.createTime | parseTime }}
  • 挂接字段:{{ hitchObject && hitchObject.queryDetails.split(",").map(item => "$" + item + "$").join("") }}
  • -
  • 匹配模式:{{ hitchObject && hitchObject.matchingMode === 1 ? '全量匹配' : (hitchObject && hitchObject.checkRepeatType === 2 ? '前缀模糊匹配' : '后缀模糊匹配') }}
  • +
  • 匹配模式:{{ hitchObject && hitchObject.matchingMode === 1 ? '全量匹配' : (hitchObject && hitchObject.matchingMode === 2 ? '前缀模糊匹配' : '后缀模糊匹配') }}
  • 挂接结果:共 {{ hitchObject &&hitchObject.total }} 条原文,成功 {{ hitchObject &&hitchObject.successNum }} 条,失败 {{ hitchObject &&hitchObject.failNum }}
  • diff --git a/src/views/collectReorganizi/collectionLibrary/index.vue b/src/views/collectReorganizi/collectionLibrary/index.vue index 8f0329e..e81ac24 100644 --- a/src/views/collectReorganizi/collectionLibrary/index.vue +++ b/src/views/collectReorganizi/collectionLibrary/index.vue @@ -149,12 +149,6 @@ export default { isdel: function(newValue, oldValue) { }, isRecycle: function(newValue, oldValue) { - }, - parentsProjectRow: function(newValue, oldValue) { - console.log('parentsProjectRow - newValue', newValue) - if (newValue) { - this.$refs.projectEle.$refs.collectHeaderRef.getDictsList() - } } }, created() { @@ -276,6 +270,7 @@ export default { } this.$nextTick(() => { this.handlePageList() + this.getDictsList() }) }, handlePageList(isQuickFilter) { @@ -522,6 +517,7 @@ export default { ::v-deep .custom-tree-node{ font-size: 14px; + font-weight: normal; } [data-theme=light] .elect-cont-right { diff --git a/src/views/collectReorganizi/collectionLibrary/mixins/index.js b/src/views/collectReorganizi/collectionLibrary/mixins/index.js index f2368b9..aa0202b 100644 --- a/src/views/collectReorganizi/collectionLibrary/mixins/index.js +++ b/src/views/collectReorganizi/collectionLibrary/mixins/index.js @@ -1,4 +1,5 @@ import { FetchInitCategoryViewTable, FetchInitCategoryView } from '@/api/collect/collect' +import { FetchDictionaryTree } from '@/api/system/dict' import { crud } from '@crud/crud' export const collectionLibraryCrud = { mixins: [crud()], @@ -237,7 +238,86 @@ export const collectionLibraryCrud = { } }) }, + // 项目级别 - 阶段分类 + getDictsList(type) { + FetchDictionaryTree().then((res) => { + const filterCodes = ['project_class'] + let filteredItems = JSON.parse(JSON.stringify(res)).filter(item => filterCodes.includes(item.dictionaryCode)) + filteredItems = this.addLevelToDictionaryList(filteredItems, 1) + if (type === 1) { + let fiterData = [] + fiterData = filteredItems.flatMap(item => { + const level2Childs = item.childDictionarys.filter(child => { + return child.dictionaryParents === item.id && child.level === 2 + }) + return level2Childs + }) + if (this.parentsData.parentsProjectRow) { + console.log(this.parentsData.parentsProjectRow.project_class) + const anjuanObj = this.parentsData.$refs.anjuanEle.$refs.ajContent.$refs.tableList + anjuanObj.$refs.collectHeaderRef.projectOptions = [] + if (this.parentsData.parentsProjectRow.project_class !== '') { + const findDic = fiterData.find(item => item.dictionaryName === this.parentsData.parentsProjectRow.project_class) + anjuanObj.$refs.collectHeaderRef.projectOptions.push(findDic) + } else { + console.log(fiterData) + anjuanObj.$refs.collectHeaderRef.projectOptions = fiterData + } + } + } else { + if (this.selectedCategory.arrangeType === 3) { + const projectObj = this.$refs.projectEle + // this.projectOptions = this.filterData(filteredItems, filteredItems[0].id) + projectObj.$refs.collectHeaderRef.projectOptions = filteredItems.flatMap(item => { + const level2Childs = item.childDictionarys.filter(child => { + return child.dictionaryParents === item.id && child.level === 2 + }) + // 将满足条件的子项目的childDictionarys设置为空数组,因为项目页不需要 + level2Childs.forEach(child => { + child.childDictionarys = [] + }) + return level2Childs + }) + } + } + }).catch(err => { + console.log(err) + }) + }, + // 显示第一级和第二级 + // filterData(data, targetId) { + // return data.filter(item => { + // if (item.id === targetId || item.dictionaryParents === targetId) { + // if (item.childDictionarys && item.childDictionarys.length > 0) { + // item.childDictionarys = this.filterData(item.childDictionarys, targetId) + // } + // return true + // } + // return false + // }) + // }, + // 给筛选出来的数据加level 方便后面是否可点击 + addLevelToDictionaryList(dictionaryList, level) { + dictionaryList.forEach(dictionary => { + dictionary.level = level + if (dictionary.childDictionarys) { + dictionary.childDictionarys = this.addLevelToDictionaryList(dictionary.childDictionarys, level + 1) + } + }) + return dictionaryList + }, + normalizerProject(node) { + if ((node.childDictionarys && !node.childDictionarys.length) || node.childDictionarys === null) { + delete node.childDictionarys + } + return { + id: node.dictionaryName, + label: `${node.dictionaryName} - ${node.dictionaryCode}`, + children: node.childDictionarys, + isDisabled: this.isTitleType === 3 ? node.level !== 3 : node.level === 1 + } + }, /* 重新渲染table组件 防止table-fixed 错位 配合watch-table数据 */ doLayout() { this.$nextTick(() => { diff --git a/src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue b/src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue index 2723aa8..bc93a92 100644 --- a/src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue +++ b/src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue @@ -11,14 +11,15 @@ flat :multiple="false" :normalizer="normalizerProject" - placeholder="请选择" + :default-expand-level="Infinity" + :placeholder="projectPlaceholder" @input="handleSearch(collectLevel)" @select="handleSearch(collectLevel)" >

    @@ -39,7 +40,7 @@

    @@ -215,10 +216,8 @@ import CRUD, { crud } from '@crud/crud' import { collectionLibraryCrud } from '../mixins/index' import { FetchInitCategoryInputFieldByPid } from '@/api/system/category/category' -// FetchBecomeDocumentConfirm import { FetchDetailsById, collectDel, FetchRemoveArchivesSingle, FetchDeleteArchivesFile, FetchUpdateArchivesNo, FetchDisbandArchives, FetchReturnReDocument, FetchCompleteDelArchives, FetchRestoreArchives } from '@/api/collect/collect' import { FetchArchivesClassTree } from '@/api/system/archivesClass' -import { FetchDictionaryTree } from '@/api/system/dict' import Treeselect from '@riophae/vue-treeselect' import '@riophae/vue-treeselect/dist/vue-treeselect.css' import PreviewForm from '@/views/components/category/PreviewForm' @@ -366,13 +365,20 @@ export default { return '输入题名或档号' } return '输入项目名称或编号' + }, + projectPlaceholder() { + if (this.isTitleType === 2) { + return '请选择项目分类' + } else if (this.isTitleType === 3) { + return '请选择项目阶段' + } + return '请选择项目分类' } }, watch: { selectedCategory: function(newValue, oldValue) { if (newValue && newValue.id) { this.getInitArchivesClass() - this.getDictsList() } }, isTitleType: function(newValue, oldValue) { @@ -391,7 +397,6 @@ export default { }, mounted() { this.getInitArchivesClass() - this.getDictsList() }, methods: { resetQuery() { @@ -429,83 +434,6 @@ export default { children: node.childArchivesClass } }, - // 项目级别 - 阶段分类 - getDictsList() { - this.projectOptions = [] - FetchDictionaryTree().then((res) => { - const filterCodes = ['project_class'] - let filteredItems = JSON.parse(JSON.stringify(res)).filter(item => filterCodes.includes(item.dictionaryCode)) - filteredItems = this.addLevelToDictionaryList(filteredItems, 1) - if (this.selectedCategory.arrangeType === 3 && this.isTitleType === 3) { - console.log('项目下的案卷') - let fiterData = [] - fiterData = filteredItems.flatMap(item => { - const level2Childs = item.childDictionarys.filter(child => { - return child.dictionaryParents === item.id && child.level === 2 - }) - return level2Childs - }) - if (this.parentsData.parentsProjectRow) { - if (this.parentsData.parentsProjectRow.project_class !== null || this.parentsData.parentsProjectRow.project_class !== '') { - console.log('project_class', this.parentsData.parentsProjectRow.project_class) - const findDic = fiterData.find(item => item.dictionaryName === this.parentsData.parentsProjectRow.project_class) - console.log('findDic', findDic) - this.projectOptions.push(findDic) - console.log('444', this.projectOptions) - } else { - this.projectOptions = fiterData - } - } - } else { - // this.projectOptions = this.filterData(filteredItems, filteredItems[0].id) - this.projectOptions = filteredItems.flatMap(item => { - const level2Childs = item.childDictionarys.filter(child => { - return child.dictionaryParents === item.id && child.level === 2 - }) - // 将满足条件的子项目的childDictionarys设置为空数组,因为项目页不需要 - level2Childs.forEach(child => { - child.childDictionarys = [] - }) - return level2Childs - }) - } - }).catch(err => { - console.log(err) - }) - }, - // 显示第一级和第二级 - filterData(data, targetId) { - return data.filter(item => { - if (item.id === targetId || item.dictionaryParents === targetId) { - if (item.childDictionarys && item.childDictionarys.length > 0) { - item.childDictionarys = this.filterData(item.childDictionarys, targetId) - } - return true - } - return false - }) - }, - // 给筛选出来的数据加level 方便后面是否可点击 - addLevelToDictionaryList(dictionaryList, level) { - dictionaryList.forEach(dictionary => { - dictionary.level = level - if (dictionary.childDictionarys) { - dictionary.childDictionarys = this.addLevelToDictionaryList(dictionary.childDictionarys, level + 1) - } - }) - return dictionaryList - }, - normalizerProject(node) { - if ((node.childDictionarys && !node.childDictionarys.length) || node.childDictionarys === null) { - delete node.childDictionarys - } - return { - id: node.dictionaryName, - label: `${node.dictionaryName} - ${node.dictionaryCode}`, - children: node.childDictionarys, - isDisabled: this.isTitleType === 3 ? node.level !== 3 : node.level === 1 - } - }, handleSelect(key, keyPath) { console.log(key, keyPath) }, @@ -522,7 +450,6 @@ export default { return false } } - this.arcId = null if (isPaper) { this.quickPaper = true @@ -1222,6 +1149,33 @@ export default { diff --git a/src/views/collectReorganizi/collectionLibrary/module/fileSeqAdjustment/index.vue b/src/views/collectReorganizi/collectionLibrary/module/fileSeqAdjustment/index.vue index 4f54b42..f55ec38 100644 --- a/src/views/collectReorganizi/collectionLibrary/module/fileSeqAdjustment/index.vue +++ b/src/views/collectReorganizi/collectionLibrary/module/fileSeqAdjustment/index.vue @@ -1,13 +1,13 @@ + + + + +