Browse Source

bug修复

master
xuhuajiao 1 year ago
parent
commit
637ad77214
  1. 1
      src/views/archivesManage/managementLibrary/anjuan/index.vue
  2. 8
      src/views/archivesManage/managementLibrary/index.vue
  3. 81
      src/views/archivesManage/managementLibrary/mixins/index.js
  4. 104
      src/views/archivesManage/managementLibrary/module/collectHeader.vue
  5. 7
      src/views/archivesManage/managementLibrary/project/index.vue
  6. 2
      src/views/collectReorganizi/batchConnection/module/detail.vue
  7. 8
      src/views/collectReorganizi/collectionLibrary/index.vue
  8. 80
      src/views/collectReorganizi/collectionLibrary/mixins/index.js
  9. 126
      src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue
  10. 25
      src/views/collectReorganizi/collectionLibrary/module/fileSeqAdjustment/index.vue
  11. 1
      src/views/collectReorganizi/collectionLibrary/project/index.vue
  12. 1
      src/views/components/categoryTree.vue

1
src/views/archivesManage/managementLibrary/anjuan/index.vue

@ -58,6 +58,7 @@ export default {
closeDrawer() { closeDrawer() {
this.anjuanDrawer = false this.anjuanDrawer = false
this.$parent.parentsProjectId = null this.$parent.parentsProjectId = null
this.$parent.parentsProjectRow = null
} }
} }
} }

8
src/views/archivesManage/managementLibrary/index.vue

@ -129,6 +129,7 @@ export default {
selectedCategory: {}, selectedCategory: {},
yearChildData: '', yearChildData: '',
parentsProjectId: null, parentsProjectId: null,
parentsProjectRow: null,
parentsAnjuanId: null, parentsAnjuanId: null,
parentsJuanneiId: null, parentsJuanneiId: null,
smartQuery: { smartQuery: {
@ -253,6 +254,7 @@ export default {
this.parentsProjectId = null this.parentsProjectId = null
this.parentsAnjuanId = null this.parentsAnjuanId = null
this.parentsJuanneiId = null this.parentsJuanneiId = null
this.parentsProjectRow = null
// //
localStorage.setItem('currentArchivesKey', JSON.stringify(val)) localStorage.setItem('currentArchivesKey', JSON.stringify(val))
this.selectedCategory = val this.selectedCategory = val
@ -264,6 +266,7 @@ export default {
} }
this.$nextTick(() => { this.$nextTick(() => {
this.handlePageList() this.handlePageList()
this.getDictsList()
}) })
}, },
handlePageList(isQuickFilter) { handlePageList(isQuickFilter) {
@ -389,9 +392,9 @@ export default {
} }
} }
}, },
handleOpenAnjuan(data, parentId) {
handleOpenAnjuan(data, parentId, parentsRow) {
this.parentsProjectId = parentId this.parentsProjectId = parentId
console.log('this.parentsProjectId', this.parentsProjectId)
this.parentsProjectRow = parentsRow
this.$refs.anjuanEle.anjuanDrawer = true this.$refs.anjuanEle.anjuanDrawer = true
this.activeIndex = 0 this.activeIndex = 0
if (this.$refs.anjuanEle.$refs.ajContent) { if (this.$refs.anjuanEle.$refs.ajContent) {
@ -509,6 +512,7 @@ export default {
::v-deep .custom-tree-node{ ::v-deep .custom-tree-node{
font-size: 14px; font-size: 14px;
font-weight: normal;
} }
[data-theme=light] .elect-cont-right { [data-theme=light] .elect-cont-right {

81
src/views/archivesManage/managementLibrary/mixins/index.js

@ -1,6 +1,7 @@
import { FetchInitCategoryViewTable } from '@/api/collect/collect' import { FetchInitCategoryViewTable } from '@/api/collect/collect'
import { FetchInitContorlView } from '@/api/archivesManage/library' import { FetchInitContorlView } from '@/api/archivesManage/library'
import { FetchDictionaryTree } from '@/api/system/dict'
import { crud } from '@crud/crud' import { crud } from '@crud/crud'
export const manageLibraryCrud = { export const manageLibraryCrud = {
mixins: [crud()], mixins: [crud()],
@ -84,7 +85,6 @@ export const manageLibraryCrud = {
} }
} }
} }
setTimeout(() => { setTimeout(() => {
this.getViewTable(categoryLevel, this.parentsId, 'search') this.getViewTable(categoryLevel, this.parentsId, 'search')
}, 200) }, 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数据 */ /* 重新渲染table组件 防止table-fixed 错位 配合watch-table数据 */
doLayout() { doLayout() {
this.$nextTick(() => { this.$nextTick(() => {

104
src/views/archivesManage/managementLibrary/module/collectHeader.vue

@ -4,12 +4,12 @@
<h4 :class="classType">{{ collectTitle }} </h4> <h4 :class="classType">{{ collectTitle }} </h4>
<div class="collect-filter"> <div class="collect-filter">
<el-select <el-select
v-if="isTitleType !== 6 && isTitleType !== 2"
v-if="!isRecycle && isTitleType !== 6 && isTitleType !== 2"
v-model="selectStatus" v-model="selectStatus"
multiple multiple
collapse-tags collapse-tags
style="margin-right: 10px; width: 160px;" style="margin-right: 10px; width: 160px;"
placeholder="请选择"
placeholder="请选择状态"
@change="handleSearch(collectLevel)" @change="handleSearch(collectLevel)"
> >
<el-option-group <el-option-group
@ -31,18 +31,19 @@
v-if="selectedCategory.arrangeType === 3 && isTitleType !== 4 && isTitleType !== 6" v-if="selectedCategory.arrangeType === 3 && isTitleType !== 4 && isTitleType !== 6"
v-model="query.project_class" v-model="query.project_class"
:options="projectOptions" :options="projectOptions"
style="width: 160px;"
style="width: 180px;"
flat flat
:multiple="false" :multiple="false"
:normalizer="normalizerProject" :normalizer="normalizerProject"
placeholder="请选择"
:default-expand-level="Infinity"
:placeholder="projectPlaceholder"
@input="handleSearch(collectLevel)" @input="handleSearch(collectLevel)"
@select="handleSearch(collectLevel)" @select="handleSearch(collectLevel)"
> >
<p <p
slot="option-label" slot="option-label"
slot-scope="{node}" slot-scope="{node}"
style="display:flex; justify-content: space-between ;overflow: hidden;white-space: nowrap;text-overflow: ellipsis; width: 90%;"
style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis; width: 100%; padding-left: 10px;"
:title="node.label" :title="node.label"
> >
<template> {{ node.label }} </template> <template> {{ node.label }} </template>
@ -62,7 +63,7 @@
><p ><p
slot="option-label" slot="option-label"
slot-scope="{node}" slot-scope="{node}"
style="display:flex; justify-content: space-between ;overflow: hidden;white-space: nowrap;text-overflow: ellipsis; width: 90%;"
style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis; width: 100%; padding-left: 10px;"
:title="node.label" :title="node.label"
> >
<template> {{ node.label }} </template> <template> {{ node.label }} </template>
@ -197,7 +198,6 @@ import { manageLibraryCrud } from '../mixins/index'
import { FetchInitCategoryInputFieldByPid } from '@/api/system/category/category' import { FetchInitCategoryInputFieldByPid } from '@/api/system/category/category'
import { FetchDetailsById, FetchCompleteDelArchives, FetchRestoreArchives } from '@/api/collect/collect' import { FetchDetailsById, FetchCompleteDelArchives, FetchRestoreArchives } from '@/api/collect/collect'
import { FetchArchivesClassTree } from '@/api/system/archivesClass' import { FetchArchivesClassTree } from '@/api/system/archivesClass'
import { FetchDictionaryTree } from '@/api/system/dict'
import Treeselect from '@riophae/vue-treeselect' import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css' import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import PreviewForm from '@/views/components/category/PreviewForm' import PreviewForm from '@/views/components/category/PreviewForm'
@ -437,13 +437,20 @@ export default {
return '输入题名或档号搜索' return '输入题名或档号搜索'
} }
return '输入项目名称或编号搜索' return '输入项目名称或编号搜索'
},
projectPlaceholder() {
if (this.isTitleType === 2) {
return '请选择项目分类'
} else if (this.isTitleType === 3) {
return '请选择项目阶段'
}
return '请选择项目分类'
} }
}, },
created() { created() {
}, },
mounted() { mounted() {
this.getInitArchivesClass() this.getInitArchivesClass()
this.getDictsList()
if (localStorage.getItem('statusBarFixedType') !== 'undefined') { if (localStorage.getItem('statusBarFixedType') !== 'undefined') {
this.parentsData.fixedStatusBar = JSON.parse(localStorage.getItem('statusBarFixedType')) === true this.parentsData.fixedStatusBar = JSON.parse(localStorage.getItem('statusBarFixedType')) === true
} }
@ -485,58 +492,6 @@ export default {
children: node.childArchivesClass 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) { handleSelect(key, keyPath) {
console.log(key, keyPath) console.log(key, keyPath)
}, },
@ -909,6 +864,33 @@ export default {
} }
} }
::v-deep .vue-treeselect__list-item{ ::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;
} }
</style> </style>

7
src/views/archivesManage/managementLibrary/project/index.vue

@ -125,9 +125,9 @@ export default {
sendYearDataToParent() { sendYearDataToParent() {
this.$emit('myYearEvent', this.yearData) this.$emit('myYearEvent', this.yearData)
}, },
openAnjuan(data, parentId) {
openAnjuan(data, parentId, parentRow) {
// this.$emit('openAnjuan', '') // this.$emit('openAnjuan', '')
this.$emit('openAnjuan', data, parentId)
this.$emit('openAnjuan', data, parentId, parentRow)
}, },
rowKey(row) { rowKey(row) {
return row.id return row.id
@ -175,7 +175,8 @@ export default {
} }
this.timer = setTimeout(() => { this.timer = setTimeout(() => {
this.parentId = row.id this.parentId = row.id
this.openAnjuan('所属项目:' + row.project_no, this.parentId)
this.openAnjuan('所属项目:' + row.project_no, this.parentId, row)
this.getDictsList(1)
}, 300) }, 300)
this.selections = this.crud.selections this.selections = this.crud.selections
}, },

2
src/views/collectReorganizi/batchConnection/module/detail.vue

@ -8,7 +8,7 @@
<li><span>操作人</span>{{ hitchObject && hitchObject.createBy }}</li> <li><span>操作人</span>{{ hitchObject && hitchObject.createBy }}</li>
<li><span style="width: 114px;">操作时间</span>{{ hitchObject && hitchObject.createTime | parseTime }}</li> <li><span style="width: 114px;">操作时间</span>{{ hitchObject && hitchObject.createTime | parseTime }}</li>
<li><span>挂接字段</span>{{ hitchObject && hitchObject.queryDetails.split(",").map(item => "$" + item + "$").join("") }}</li> <li><span>挂接字段</span>{{ hitchObject && hitchObject.queryDetails.split(",").map(item => "$" + item + "$").join("") }}</li>
<li><span style="width: 114px;">匹配模式</span>{{ hitchObject && hitchObject.matchingMode === 1 ? '全量匹配' : (hitchObject && hitchObject.checkRepeatType === 2 ? '前缀模糊匹配' : '后缀模糊匹配') }}</li>
<li><span style="width: 114px;">匹配模式</span>{{ hitchObject && hitchObject.matchingMode === 1 ? '全量匹配' : (hitchObject && hitchObject.matchingMode === 2 ? '前缀模糊匹配' : '后缀模糊匹配') }}</li>
<li style="width: 100%;"><span>挂接结果</span> {{ hitchObject &&hitchObject.total }} 条原文成功 <i class="success-status"> {{ hitchObject &&hitchObject.successNum }}</i> 失败 <i class="error-status"> {{ hitchObject &&hitchObject.failNum }}</i> </li> <li style="width: 100%;"><span>挂接结果</span> {{ hitchObject &&hitchObject.total }} 条原文成功 <i class="success-status"> {{ hitchObject &&hitchObject.successNum }}</i> 失败 <i class="error-status"> {{ hitchObject &&hitchObject.failNum }}</i> </li>
</ul> </ul>
<el-table ref="table" v-loading="tableLoading" :data="tableData" style="width: 100%;" height="calc(100vh - 400px)"> <el-table ref="table" v-loading="tableLoading" :data="tableData" style="width: 100%;" height="calc(100vh - 400px)">

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

@ -149,12 +149,6 @@ export default {
isdel: function(newValue, oldValue) { isdel: function(newValue, oldValue) {
}, },
isRecycle: 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() { created() {
@ -276,6 +270,7 @@ export default {
} }
this.$nextTick(() => { this.$nextTick(() => {
this.handlePageList() this.handlePageList()
this.getDictsList()
}) })
}, },
handlePageList(isQuickFilter) { handlePageList(isQuickFilter) {
@ -522,6 +517,7 @@ export default {
::v-deep .custom-tree-node{ ::v-deep .custom-tree-node{
font-size: 14px; font-size: 14px;
font-weight: normal;
} }
[data-theme=light] .elect-cont-right { [data-theme=light] .elect-cont-right {

80
src/views/collectReorganizi/collectionLibrary/mixins/index.js

@ -1,4 +1,5 @@
import { FetchInitCategoryViewTable, FetchInitCategoryView } from '@/api/collect/collect' import { FetchInitCategoryViewTable, FetchInitCategoryView } from '@/api/collect/collect'
import { FetchDictionaryTree } from '@/api/system/dict'
import { crud } from '@crud/crud' import { crud } from '@crud/crud'
export const collectionLibraryCrud = { export const collectionLibraryCrud = {
mixins: [crud()], 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数据 */ /* 重新渲染table组件 防止table-fixed 错位 配合watch-table数据 */
doLayout() { doLayout() {
this.$nextTick(() => { this.$nextTick(() => {

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

@ -11,14 +11,15 @@
flat flat
:multiple="false" :multiple="false"
:normalizer="normalizerProject" :normalizer="normalizerProject"
placeholder="请选择"
:default-expand-level="Infinity"
:placeholder="projectPlaceholder"
@input="handleSearch(collectLevel)" @input="handleSearch(collectLevel)"
@select="handleSearch(collectLevel)" @select="handleSearch(collectLevel)"
> >
<p <p
slot="option-label" slot="option-label"
slot-scope="{node}" slot-scope="{node}"
style="display:flex; justify-content: space-between ;overflow: hidden;white-space: nowrap;text-overflow: ellipsis; width: 90%;"
style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis; width: 100%; padding-left: 10px;"
:title="node.label" :title="node.label"
> >
<template> {{ node.label }} </template> <template> {{ node.label }} </template>
@ -39,7 +40,7 @@
<p <p
slot="option-label" slot="option-label"
slot-scope="{node}" slot-scope="{node}"
style="display:flex; justify-content: space-between ;overflow: hidden;white-space: nowrap;text-overflow: ellipsis; width: 90%;"
style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis; width: 100%; padding-left: 10px;"
:title="node.label" :title="node.label"
> >
<template> {{ node.label }} </template> <template> {{ node.label }} </template>
@ -215,10 +216,8 @@
import CRUD, { crud } from '@crud/crud' import CRUD, { crud } from '@crud/crud'
import { collectionLibraryCrud } from '../mixins/index' import { collectionLibraryCrud } from '../mixins/index'
import { FetchInitCategoryInputFieldByPid } from '@/api/system/category/category' import { FetchInitCategoryInputFieldByPid } from '@/api/system/category/category'
// FetchBecomeDocumentConfirm
import { FetchDetailsById, collectDel, FetchRemoveArchivesSingle, FetchDeleteArchivesFile, FetchUpdateArchivesNo, FetchDisbandArchives, FetchReturnReDocument, FetchCompleteDelArchives, FetchRestoreArchives } from '@/api/collect/collect' import { FetchDetailsById, collectDel, FetchRemoveArchivesSingle, FetchDeleteArchivesFile, FetchUpdateArchivesNo, FetchDisbandArchives, FetchReturnReDocument, FetchCompleteDelArchives, FetchRestoreArchives } from '@/api/collect/collect'
import { FetchArchivesClassTree } from '@/api/system/archivesClass' import { FetchArchivesClassTree } from '@/api/system/archivesClass'
import { FetchDictionaryTree } from '@/api/system/dict'
import Treeselect from '@riophae/vue-treeselect' import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css' import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import PreviewForm from '@/views/components/category/PreviewForm' import PreviewForm from '@/views/components/category/PreviewForm'
@ -366,13 +365,20 @@ export default {
return '输入题名或档号' return '输入题名或档号'
} }
return '输入项目名称或编号' return '输入项目名称或编号'
},
projectPlaceholder() {
if (this.isTitleType === 2) {
return '请选择项目分类'
} else if (this.isTitleType === 3) {
return '请选择项目阶段'
}
return '请选择项目分类'
} }
}, },
watch: { watch: {
selectedCategory: function(newValue, oldValue) { selectedCategory: function(newValue, oldValue) {
if (newValue && newValue.id) { if (newValue && newValue.id) {
this.getInitArchivesClass() this.getInitArchivesClass()
this.getDictsList()
} }
}, },
isTitleType: function(newValue, oldValue) { isTitleType: function(newValue, oldValue) {
@ -391,7 +397,6 @@ export default {
}, },
mounted() { mounted() {
this.getInitArchivesClass() this.getInitArchivesClass()
this.getDictsList()
}, },
methods: { methods: {
resetQuery() { resetQuery() {
@ -429,83 +434,6 @@ export default {
children: node.childArchivesClass 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) { handleSelect(key, keyPath) {
console.log(key, keyPath) console.log(key, keyPath)
}, },
@ -522,7 +450,6 @@ export default {
return false return false
} }
} }
this.arcId = null this.arcId = null
if (isPaper) { if (isPaper) {
this.quickPaper = true this.quickPaper = true
@ -1222,6 +1149,33 @@ export default {
<style lang='scss' scoped> <style lang='scss' scoped>
::v-deep .vue-treeselect__list-item{ ::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;
} }
</style> </style>

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

@ -1,13 +1,13 @@
<template> <template>
<!-- 卷内顺序调整 --> <!-- 卷内顺序调整 -->
<div> <div>
<el-dialog class="adjust-dialog" :title="titleAdjustment" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="adjustmentVisible" @opened="opened">
<el-dialog class="adjust-dialog" :title="titleAdjustment" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="adjustmentVisible" :before-close="handleCloseDialog" @opened="opened">
<div class="setting-dialog"> <div class="setting-dialog">
<div v-if="isJuannei" class="base-info"> <div v-if="isJuannei" class="base-info">
<p>案卷档号{{ selections.length !== 0 && selections[0].archive_no }}</p> <p>案卷档号{{ selections.length !== 0 && selections[0].archive_no }}</p>
<p>案卷题名{{ selections.length !== 0 && selections[0].maintitle }}</p> <p>案卷题名{{ selections.length !== 0 && selections[0].maintitle }}</p>
</div> </div>
<i class="drag-tip">提示请通过拖动鼠标来调整当前顺序</i>
<i class="drag-tip">提示请通过拖动鼠标来调整当前顺序,系统字段根据门类著录项规则更新案卷号/件号和档号</i>
<el-table <el-table
ref="table" ref="table"
:data="sortTableData" :data="sortTableData"
@ -27,6 +27,17 @@
/> />
</template> </template>
</el-table> </el-table>
<el-form ref="form" :model="form" label-width="80px" style="margin-top: 30px;">
<el-form-item label="起始值" prop="number" :rules="[{ required: true, message: '起始值不可为空',trigger: 'blur' }]">
<el-input-number
v-model="form.number"
:min="1"
:max="999"
placeholder="请输入"
controls-position="right"
/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="adjustmentVisible = false">取消</el-button> <el-button @click="adjustmentVisible = false">取消</el-button>
<el-button type="primary" @click.native="handleSort">确定</el-button> <el-button type="primary" @click.native="handleSort">确定</el-button>
@ -69,7 +80,10 @@ export default {
categoryB: null, categoryB: null,
sortTableData: [], sortTableData: [],
queryCnFields: [], queryCnFields: [],
queryFields: []
queryFields: [],
form: {
number: 0
}
} }
}, },
watch: { watch: {
@ -145,6 +159,11 @@ export default {
this.$message({ message: '调整顺序失败', type: 'error', offset: 8 }) this.$message({ message: '调整顺序失败', type: 'error', offset: 8 })
} }
}) })
},
handleCloseDialog(done) {
//
this.$refs.form.resetFields()
this.adjustmentVisible = false
} }
} }

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

@ -174,6 +174,7 @@ export default {
this.timer = setTimeout(() => { this.timer = setTimeout(() => {
this.parentId = row.id this.parentId = row.id
this.openAnjuan('所属项目:' + row.project_no, this.parentId, row) this.openAnjuan('所属项目:' + row.project_no, this.parentId, row)
this.getDictsList(1)
}, 300) }, 300)
// this.selections = this.crud.selections // this.selections = this.crud.selections
}, },

1
src/views/components/categoryTree.vue

@ -177,5 +177,6 @@ export default {
::v-deep .el-tree-node__children .custom-tree-node{ ::v-deep .el-tree-node__children .custom-tree-node{
font-size: 14px; font-size: 14px;
font-weight: normal;
} }
</style> </style>
Loading…
Cancel
Save