Browse Source

收集库api调试

master
xuhuajiao 1 year ago
parent
commit
13bd9f17b0
  1. 38
      src/api/collect/collect.js
  2. 20
      src/assets/styles/archives-manage.scss
  3. 15
      src/views/archivesManage/managementLibrary/anjuan/tableList.vue
  4. 20
      src/views/archivesManage/managementLibrary/index.vue
  5. 2
      src/views/archivesManage/managementLibrary/juannei/index.vue
  6. 125
      src/views/archivesManage/managementLibrary/module/collectHeader.vue
  7. 2
      src/views/archivesManage/managementLibrary/project/index.vue
  8. 6
      src/views/collectReorganizi/collectionLibrary/anjuan/content.vue
  9. 2
      src/views/collectReorganizi/collectionLibrary/anjuan/index.vue
  10. 37
      src/views/collectReorganizi/collectionLibrary/anjuan/tableList.vue
  11. 11
      src/views/collectReorganizi/collectionLibrary/file/index.vue
  12. 85
      src/views/collectReorganizi/collectionLibrary/index.vue
  13. 8
      src/views/collectReorganizi/collectionLibrary/juannei/index.vue
  14. 7
      src/views/collectReorganizi/collectionLibrary/mixins/index.js
  15. 201
      src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue
  16. 2
      src/views/collectReorganizi/collectionLibrary/module/fourTest/index.vue
  17. 19
      src/views/collectReorganizi/collectionLibrary/project/index.vue
  18. 72
      src/views/components/category/PreviewForm.vue

38
src/api/collect/collect.js

@ -18,4 +18,40 @@ export function FetchInitCategoryView(params) {
}) })
} }
export default { FetchInitCategoryViewTable, FetchInitCategoryView }
// 添加项目/卷内/文件
export function collectAdd(data) {
return request({
url: 'api/collect/addArchives',
method: 'post',
data
})
}
// 添加项目/卷内/文件
export function collectEdit(data) {
return request({
url: 'api/collect/editArchives',
method: 'post',
data
})
}
// 删除
export function collectDel(data) {
return request({
url: 'api/collect/delArchives',
method: 'post',
data
})
}
// 根据门类父id获取卷内列表
export function FetchDetailsById(params) {
return request({
url: 'api/collect/getDetailsById',
method: 'get',
params
})
}
export default { collectAdd, collectEdit, collectDel, FetchInitCategoryViewTable, FetchInitCategoryView, FetchDetailsById }

20
src/assets/styles/archives-manage.scss

@ -938,13 +938,27 @@
} }
} }
.collect-filter{
display: flex;
// width: 360px;
height: 32px;
justify-content: flex-end;
.vue-treeselect{
font-size: 12px;
margin-right: 10px !important;
.vue-treeselect__control{
height: 33px !important;
}
}
}
.mangement-fixed-top{ .mangement-fixed-top{
padding: 0 20px 10px 20px;
// padding: 0 20px 10px 20px;
text-align: right; text-align: right;
flex: 1;
color: #545B65; color: #545B65;
} }
.drag-tip { .drag-tip {
display: block; display: block;
padding-left: 20px; padding-left: 20px;
@ -952,4 +966,4 @@
font-style: normal; font-style: normal;
font-weight: bold; font-weight: bold;
font-size: 12px; font-size: 12px;
}
}

15
src/views/archivesManage/managementLibrary/anjuan/tableList.vue

@ -132,13 +132,19 @@ export default {
data() { data() {
return { return {
categoryId: 'F0F59CC713C83AE4BAB99B', categoryId: 'F0F59CC713C83AE4BAB99B',
arcId: '256E752BC0280618840600'
arcId: '256E752BC0280618840600',
title: ''
} }
}, },
watch: { watch: {
selectedCategory: function(newValue, oldValue) { selectedCategory: function(newValue, oldValue) {
this.selections = [] this.selections = []
this.$refs.table.clearSelection() this.$refs.table.clearSelection()
if (newValue.arrangeType === 1) {
this.title = '文件'
} else {
this.title = '案卷'
}
}, },
tableDisplayFields(val) { tableDisplayFields(val) {
this.doLayout() this.doLayout()
@ -205,11 +211,16 @@ export default {
// table - row // table - row
clickRowHandler(row) { clickRowHandler(row) {
console.log('clickRowHandler', row) console.log('clickRowHandler', row)
if (this.selectedCategory.arrangeType === 1) {
this.title = '文件'
} else {
this.title = '案卷'
}
if (this.timer) { if (this.timer) {
clearTimeout(this.timer) clearTimeout(this.timer)
} }
this.timer = setTimeout(() => { this.timer = setTimeout(() => {
this.openJuannei(row.archive_no)
this.openJuannei('所属' + this.title + ':' + row.archive_no)
}, 300) }, 300)
this.selections = this.crud.selections this.selections = this.crud.selections
}, },

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

@ -32,10 +32,11 @@
node-key="id" node-key="id"
:expand-on-click-node="false" :expand-on-click-node="false"
highlight-current highlight-current
@node-click="handleNodeFilter"
> >
<span slot-scope="{ node, data }" class="custom-tree-node"> <span slot-scope="{ node, data }" class="custom-tree-node">
<span v-if="data.childDictionarys !== null " class="iconClassify">
{{ data.dictionaryName }}
<span v-if="data.childDictionarys || data.fondsName" class="iconClassify">
{{ data.dictionaryName || data.fondsName }}
</span> </span>
<span v-else class="iconClassify-child"> <span v-else class="iconClassify-child">
{{ data.dictionaryName }} {{ data.dictionaryName }}
@ -195,7 +196,7 @@ export default {
this.selectedCategory = val this.selectedCategory = val
if (this.selectedCategory.isType !== 1) { if (this.selectedCategory.isType !== 1) {
this.getInitArchivesClass(val.id)
this.getDictionaryTreeByCategoryId(val.id)
} else { } else {
this.classifyTree = [] this.classifyTree = []
} }
@ -222,18 +223,27 @@ export default {
} }
}) })
}, },
getInitArchivesClass(categoryId) {
getDictionaryTreeByCategoryId(categoryId) {
this.classifyLoading = true this.classifyLoading = true
const params = { const params = {
'categoryId': categoryId 'categoryId': categoryId
} }
FetchDictionaryTreeByCategoryId(params).then((res) => { FetchDictionaryTreeByCategoryId(params).then((res) => {
this.classifyTree = res
let fonds
if (res.fonds.length <= 1) {
fonds = []
} else {
fonds = res.fonds
}
this.classifyTree = res.dictionarys.concat(fonds)
this.classifyLoading = false this.classifyLoading = false
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
}) })
}, },
handleNodeFilter(val) {
console.log('val', val)
},
handleOpenAnjuan(data) { handleOpenAnjuan(data) {
this.$refs.anjuanEle.anjuanDrawer = true this.$refs.anjuanEle.anjuanDrawer = true
// this.$refs.anjuanEle.$refs.ajContent.activeIndex = 0 // this.$refs.anjuanEle.$refs.ajContent.activeIndex = 0

2
src/views/archivesManage/managementLibrary/juannei/index.vue

@ -195,7 +195,7 @@ export default {
clearTimeout(this.timer) clearTimeout(this.timer)
} }
this.timer = setTimeout(() => { this.timer = setTimeout(() => {
this.openFile(row.archive_no)
this.openFile('所属卷内:' + row.archive_no)
}, 300) }, 300)
this.selections = this.crud.selections this.selections = this.crud.selections
}, },

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

@ -1,14 +1,37 @@
<template> <template>
<div> <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="[ isTitleType === 6 || isTitleType === 2 ? 'collect-header manage-fixed-style' : 'collect-header']"> -->
<div class="collect-header">
<h4 :class="classType">{{ collectTitle }} </h4>
<div class="collect-filter">
<treeselect
v-if="selectedCategory.arrangeType === 3 && isTitleType !== 4 && isTitleType !== 6 && activeIndex !== 1"
v-model="query.projectClass"
:options="projectOptions"
style="width: 160px;"
flat
:multiple="false"
:normalizer="normalizerProject"
placeholder="请选择"
/>
<treeselect
v-if="isTitleType !== 6"
v-model="query.classify"
:options="classifyOptions"
style="width: 160px;"
flat
:multiple="false"
:normalizer="normalizer"
placeholder="请选择档案分类"
/>
</div>
<div class="head-search"> <div class="head-search">
<el-select <el-select
v-if="isTitleType === 3 && selectedCategory.arrangeType !== 3" v-if="isTitleType === 3 && selectedCategory.arrangeType !== 3"
v-model="selectStatus" v-model="selectStatus"
multiple multiple
collapse-tags collapse-tags
style="margin-right: 10px;"
style="margin-right: 10px; width: 160px;"
placeholder="请选择" placeholder="请选择"
> >
<el-option <el-option
@ -157,9 +180,11 @@
</div> </div>
</el-dialog> </el-dialog>
</div> </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 style="display: flex; justify-content: space-between; height: 30px; line-height: 30px; padding: 0 10px; ">
<span v-if="(isTitleType !== 2 && selectedCategory.arrangeType === 3 ) || ((isTitleType === 4 || isTitleType === 6) && selectedCategory.arrangeType === 2) || (isTitleType === 6 && selectedCategory.arrangeType === 1)" style="font-size: 12px;">{{ test }}</span>
<div v-if="isTitleType !== 2 && !isRecycle && isTitleType !== 6" class="mangement-fixed-top">
<el-checkbox v-model="fixedStatusBar" @change="statusBarChecked">隐藏状态栏</el-checkbox>
</div>
</div> </div>
</div> </div>
</template> </template>
@ -167,6 +192,10 @@
<script> <script>
import { manageLibraryCrud } from '../mixins/index' import { manageLibraryCrud } from '../mixins/index'
import { FetchInitCategoryInputFieldByPid } from '@/api/system/category/category' import { FetchInitCategoryInputFieldByPid } from '@/api/system/category/category'
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' import PreviewForm from '@/views/components/category/PreviewForm'
import Print from './print/index' import Print from './print/index'
import BindingTagDlg from '@/views/components/BindingTagDlg' import BindingTagDlg from '@/views/components/BindingTagDlg'
@ -174,7 +203,7 @@ import BindingTagDlg from '@/views/components/BindingTagDlg'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
export default { export default {
name: 'CollectHeader', name: 'CollectHeader',
components: { PreviewForm, BindingTagDlg, Print },
components: { Treeselect, PreviewForm, BindingTagDlg, Print },
mixins: [manageLibraryCrud], mixins: [manageLibraryCrud],
props: { props: {
selectedCategory: { selectedCategory: {
@ -255,6 +284,12 @@ export default {
formVisible: false, formVisible: false,
formTitle: '项目', formTitle: '项目',
formPreviewData: [], // data formPreviewData: [], // data
query: {
projectClass: null,
classify: null
},
projectOptions: [],
classifyOptions: [],
deleteVisible: false, deleteVisible: false,
moveVisible: false, moveVisible: false,
exportVisible: false, exportVisible: false,
@ -304,16 +339,18 @@ export default {
}, },
placeholderType() { placeholderType() {
if (this.isTitleType === 2) { if (this.isTitleType === 2) {
return '输入项目名称或项目编号搜索'
return '输入项目名称或编号搜索'
} else if (this.isTitleType === 3 || this.isTitleType === 4) { } else if (this.isTitleType === 3 || this.isTitleType === 4) {
return '输入题名或档号搜索' return '输入题名或档号搜索'
} }
return '输入项目名称或项目编号搜索'
return '输入项目名称或编号搜索'
} }
}, },
created() { created() {
}, },
mounted() { mounted() {
this.getInitArchivesClass()
this.getDictsList()
if (localStorage.getItem('statusBarFixedType') !== 'undefined') { if (localStorage.getItem('statusBarFixedType') !== 'undefined') {
this.fixedStatusBar = JSON.parse(localStorage.getItem('statusBarFixedType')) === true this.fixedStatusBar = JSON.parse(localStorage.getItem('statusBarFixedType')) === true
this.$emit('status-bar-checked-changed', this.fixedStatusBar) this.$emit('status-bar-checked-changed', this.fixedStatusBar)
@ -327,6 +364,76 @@ export default {
this.$emit('status-bar-checked-changed', this.fixedStatusBar) this.$emit('status-bar-checked-changed', this.fixedStatusBar)
localStorage.setItem('statusBarFixedType', val) localStorage.setItem('statusBarFixedType', val)
}, },
getInitArchivesClass() {
this.classifyOptions = []
const params = {
'categoryId': this.selectedCategory.id
}
FetchArchivesClassTree(params).then((res) => {
this.classifyOptions = JSON.parse(JSON.stringify(res))
}).catch(err => {
console.log(err)
})
},
normalizer(node) {
if (node.childArchivesClass === null) {
delete node.childArchivesClass
}
return {
id: node.code,
label: node.name,
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
// console.log(this.projectOptions)
} 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
},
normalizerProject(node) {
if ((node.childDictionarys && !node.childDictionarys.length) || node.childDictionarys === null) {
delete node.childDictionarys
}
return {
id: node.dictionaryCode,
label: 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)
}, },

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

@ -140,7 +140,7 @@ export default {
clearTimeout(this.timer) clearTimeout(this.timer)
} }
this.timer = setTimeout(() => { this.timer = setTimeout(() => {
this.openAnjuan(row.item_no)
this.openAnjuan('所属项目:' + row.archive_no)
}, 300) }, 300)
this.selections = this.crud.selections this.selections = this.crud.selections
}, },

6
src/views/collectReorganizi/collectionLibrary/anjuan/content.vue

@ -41,9 +41,9 @@ export default {
created() { created() {
}, },
mounted() { mounted() {
console.log((!this.isRecycle && this.selectedCategory.arrangeType !== 1))
console.log('isRecycle', this.isRecycle)
console.log('test', this.test)
// console.log((!this.isRecycle && this.selectedCategory.arrangeType !== 1))
// console.log('isRecycle', this.isRecycle)
// console.log('test', this.test)
}, },
methods: { methods: {
changeActiveTab(data) { changeActiveTab(data) {

2
src/views/collectReorganizi/collectionLibrary/anjuan/index.vue

@ -47,7 +47,7 @@ export default {
created() { created() {
}, },
mounted() { mounted() {
console.log('nei', this.selectedCategory.arrangeType)
// console.log('nei', this.selectedCategory.arrangeType)
}, },
methods: { methods: {
closeDrawer() { closeDrawer() {

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

@ -59,8 +59,8 @@ import { collectionLibraryCrud } from '../mixins/index'
import ArchivesInfo from '../module/archivesInfo/index' import ArchivesInfo from '../module/archivesInfo/index'
import CollectHeader from '../module/collectHeader.vue' import CollectHeader from '../module/collectHeader.vue'
import tableData from '@/views/archivesManage/managementLibrary/anjuan/table.json'
import jsonData from '@/views/archivesManage/managementLibrary/anjuan/data.json'
// import tableData from '@/views/archivesManage/managementLibrary/anjuan/table.json'
// import jsonData from '@/views/archivesManage/managementLibrary/anjuan/data.json'
export default { export default {
name: 'Sorted', name: 'Sorted',
components: { ArchivesInfo, CollectHeader }, components: { ArchivesInfo, CollectHeader },
@ -97,13 +97,19 @@ export default {
return { return {
categoryId: 'F0F59CC713C83AE4BAB99B', categoryId: 'F0F59CC713C83AE4BAB99B',
arcId: '256E752BC0280618840600', arcId: '256E752BC0280618840600',
title: '案卷'
title: '',
selections: []
} }
}, },
watch: { watch: {
selectedCategory: function(newValue, oldValue) { selectedCategory: function(newValue, oldValue) {
this.selections = [] this.selections = []
this.$refs.table.clearSelection() this.$refs.table.clearSelection()
if (newValue.arrangeType !== 1) {
this.title = '案卷'
} else {
this.title = '文件'
}
}, },
tableDisplayFields(val) { tableDisplayFields(val) {
this.doLayout() this.doLayout()
@ -119,11 +125,10 @@ export default {
} }
}, },
created() { created() {
this.tableDisplayFields = tableData.data
this.anjuanData = jsonData.data.list.content
// this.tableDisplayFields = tableData.data
// this.anjuanData = jsonData.data.list.content
}, },
mounted() { mounted() {
}, },
methods: { methods: {
getCommonData(type) { getCommonData(type) {
@ -160,22 +165,18 @@ export default {
if (this.timer) { if (this.timer) {
clearTimeout(this.timer) clearTimeout(this.timer)
} }
console.log('tableDoubleClick', row)
// console.log('tableDoubleClick', row)
this.arcId = row.id this.arcId = row.id
if (this.selectedCategory.arrangeType !== 1) { if (this.selectedCategory.arrangeType !== 1) {
this.title = '案卷'
this.$refs.archivesInfo.isHasFile = false this.$refs.archivesInfo.isHasFile = false
if (this.activeIndex === 1) { if (this.activeIndex === 1) {
this.title = '文件'
this.$refs.archivesInfo.detailTitle = '文件详情' this.$refs.archivesInfo.detailTitle = '文件详情'
this.$refs.archivesInfo.isHasFile = true this.$refs.archivesInfo.isHasFile = true
} else { } else {
this.title = '案卷'
this.$refs.archivesInfo.detailTitle = '案卷详情' this.$refs.archivesInfo.detailTitle = '案卷详情'
} }
} else { } else {
this.title = '文件'
this.$refs.archivesInfo.isHasFile = true this.$refs.archivesInfo.isHasFile = true
this.$refs.archivesInfo.detailTitle = '文件详情' this.$refs.archivesInfo.detailTitle = '文件详情'
} }
@ -185,18 +186,26 @@ export default {
}, },
// table - row // table - row
clickRowHandler(row) { clickRowHandler(row) {
console.log('clickRowHandler', row)
if (this.selectedCategory.arrangeType === 1) {
if (this.activeIndex === 0) {
this.title = '文件'
}
} else {
if (this.activeIndex === 0) {
this.title = '案卷'
}
}
if (this.timer) { if (this.timer) {
clearTimeout(this.timer) clearTimeout(this.timer)
} }
this.timer = setTimeout(() => { this.timer = setTimeout(() => {
this.openJuannei('所属' + this.title + row.archive_no)
this.openJuannei('所属' + this.title + ':' + row.archive_no)
}, 300) }, 300)
this.selections = this.crud.selections this.selections = this.crud.selections
}, },
// //
handleCurrentChange(selection, row) { handleCurrentChange(selection, row) {
console.log('触发单选', row)
// console.log('', row)
this.selections = selection this.selections = selection
}, },
handleSizeChange(size) { handleSizeChange(size) {

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

@ -97,7 +97,8 @@ export default {
isTitleType: 6, isTitleType: 6,
fileDrawer: false, fileDrawer: false,
test: '', test: '',
isAjNo: 0
isAjNo: 0,
selections: []
} }
}, },
watch: { watch: {
@ -131,18 +132,18 @@ export default {
}, },
// table - // table -
tableDoubleClick(row) { tableDoubleClick(row) {
console.log('tableDoubleClick', row)
// console.log('tableDoubleClick', row)
// this.arcId = row.id // this.arcId = row.id
console.log(this.selectedCategory.isType)
// console.log(this.selectedCategory.isType)
}, },
// table - row // table - row
clickRowHandler(row) { clickRowHandler(row) {
console.log('clickRowHandler', row)
// console.log('clickRowHandler', row)
this.selections = this.crud.selections this.selections = this.crud.selections
}, },
// //
handleCurrentChange(selection, row) { handleCurrentChange(selection, row) {
console.log('触发单选', row)
// console.log('', row)
this.selections = selection this.selections = selection
}, },
handleSizeChange(size) { handleSizeChange(size) {

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

@ -23,41 +23,26 @@
</el-tree> </el-tree>
</div> </div>
<h3 class="arc-title arc-title-bottom">快速筛选</h3> <h3 class="arc-title arc-title-bottom">快速筛选</h3>
<div class="arc-tree arc-tree-02">
<el-tree
ref="classifyTree"
v-loading="classifyLoading"
:data="classifyTree"
:props="defaultClassifyProps"
node-key="id"
:expand-on-click-node="false"
highlight-current
>
<span slot-scope="{ node, data }" class="custom-tree-node">
<span v-if="data.childDictionarys !== null " class="iconClassify">
{{ data.dictionaryName }}
</span>
<span v-else class="iconClassify-child">
{{ data.dictionaryName }}
</span>
<el-tree
ref="classifyTree"
v-loading="classifyLoading"
class="arc-tree arc-tree-02"
:data="classifyTree"
:props="defaultClassifyProps"
node-key="id"
:expand-on-click-node="false"
highlight-current
@node-click="handleNodeFilter"
>
<span slot-scope="{ node, data }" class="custom-tree-node">
<span v-if="data.childDictionarys || data.fondsName" class="iconClassify">
{{ data.dictionaryName || data.fondsName }}
</span> </span>
</el-tree>
<el-tree
ref="fondsTree"
v-loading="classifyLoading"
:data="fondsTree"
:props="defaultFondsProps"
node-key="id"
:expand-on-click-node="false"
highlight-current
>
<span slot-scope="{ node, data }" class="custom-tree-node">
<span class="iconClassify">
{{ data.fondsName }}
</span>
<span v-else class="iconClassify-child">
{{ data.dictionaryName }}
</span> </span>
</el-tree>
</div>
</span>
</el-tree>
</div> </div>
</div> </div>
</div> </div>
@ -118,8 +103,8 @@ export default {
label: 'cnName' label: 'cnName'
}, },
defaultClassifyProps: { defaultClassifyProps: {
children: 'childDictionarys',
label: 'dictionaryName'
children: 'childDictionarys' || null,
label: 'dictionaryName' || 'fondsName'
}, },
defaultFondsProps: { defaultFondsProps: {
children: 'children', children: 'children',
@ -128,7 +113,6 @@ export default {
sharedData: '', sharedData: '',
selectedCategory: {}, selectedCategory: {},
classifyTree: [], classifyTree: [],
fondsTree: [],
classifyLoading: false classifyLoading: false
} }
}, },
@ -213,23 +197,23 @@ export default {
handleNodeClick(val) { handleNodeClick(val) {
// //
localStorage.setItem('currentArchivesKey', JSON.stringify(val)) localStorage.setItem('currentArchivesKey', JSON.stringify(val))
this.selectedCategory = val this.selectedCategory = val
if (this.selectedCategory.isType !== 1) { if (this.selectedCategory.isType !== 1) {
this.FetchDictionaryTreeByCategoryId(val.id)
this.getDictionaryTreeByCategoryId(val.id)
} else { } else {
this.classifyTree = [] this.classifyTree = []
this.fondsTree = []
} }
this.$nextTick(() => { this.$nextTick(() => {
if (this.selectedCategory.arrangeType === 3) { if (this.selectedCategory.arrangeType === 3) {
// this.$refs.projectEle.getCommonData(1)
//
this.$refs.projectEle.getCommonData(1)
} else if (this.selectedCategory.arrangeType === 2) { } else if (this.selectedCategory.arrangeType === 2) {
// this.$refs.anjuanEle.$refs.ajContent.$refs.tableList.getCommonData(2)
//
this.$refs.anjuanEle.$refs.ajContent.$refs.tableList.getCommonData(2)
} else if (this.selectedCategory.arrangeType === 1) { } else if (this.selectedCategory.arrangeType === 1) {
// this.$refs.anjuanEle.$refs.ajContent.$refs.tableList.getCommonData(3)
//
this.$refs.anjuanEle.$refs.ajContent.$refs.tableList.getCommonData(3)
} }
if (this.$refs.anjuanEle) { if (this.$refs.anjuanEle) {
this.$refs.anjuanEle.anjuanDrawer = false this.$refs.anjuanEle.anjuanDrawer = false
@ -245,19 +229,27 @@ export default {
} }
}) })
}, },
FetchDictionaryTreeByCategoryId(categoryId) {
getDictionaryTreeByCategoryId(categoryId) {
this.classifyLoading = true this.classifyLoading = true
const params = { const params = {
'categoryId': categoryId 'categoryId': categoryId
} }
FetchDictionaryTreeByCategoryId(params).then((res) => { FetchDictionaryTreeByCategoryId(params).then((res) => {
this.classifyTree = res.dictionarys
this.fondsTree = res.fonds
let fonds
if (res.fonds.length <= 1) {
fonds = []
} else {
fonds = res.fonds
}
this.classifyTree = res.dictionarys.concat(fonds)
this.classifyLoading = false this.classifyLoading = false
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
}) })
}, },
handleNodeFilter(val) {
console.log('val', val)
},
handleOpenAnjuan(data) { handleOpenAnjuan(data) {
this.$refs.anjuanEle.anjuanDrawer = true this.$refs.anjuanEle.anjuanDrawer = true
this.activeIndex = 0 this.activeIndex = 0
@ -357,7 +349,6 @@ export default {
} }
.arc-tree-02{ .arc-tree-02{
margin: 20px 0;
height: calc(100vh - 720px); height: calc(100vh - 720px);
overflow: hidden; overflow: hidden;
overflow-y: scroll; overflow-y: scroll;

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

@ -95,14 +95,15 @@ export default {
juanneiDrawer: false, juanneiDrawer: false,
categoryId: 'CD135F6A77018CE04D4FDB', categoryId: 'CD135F6A77018CE04D4FDB',
arcId: '256E752BC0280618840600', arcId: '256E752BC0280618840600',
test: ''
test: '',
selections: []
} }
}, },
watch: { watch: {
selectedCategory: function(newValue, oldValue) { selectedCategory: function(newValue, oldValue) {
}, },
tableDisplayFields(val) { tableDisplayFields(val) {
this.doLayout()
// this.doLayout()
} }
}, },
created() { created() {
@ -110,7 +111,6 @@ export default {
this.junneiData = jsonData.data.list.content this.junneiData = jsonData.data.list.content
}, },
mounted() { mounted() {
console.log('nei2', this.selectedCategory.arrangeType)
}, },
methods: { methods: {
getCommonData(type) { getCommonData(type) {
@ -161,7 +161,7 @@ export default {
clearTimeout(this.timer) clearTimeout(this.timer)
} }
this.timer = setTimeout(() => { this.timer = setTimeout(() => {
this.openFile('所属卷内' + row.archive_no)
this.openFile('所属卷内' + row.archive_no)
}, 300) }, 300)
this.selections = this.crud.selections this.selections = this.crud.selections
}, },

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

@ -11,7 +11,6 @@ export const collectionLibraryCrud = {
anjuanData: [], anjuanData: [],
junneiData: [], junneiData: [],
fileData: [], fileData: [],
selections: [],
arrySort: [], arrySort: [],
page: { page: {
page: 1, page: 1,
@ -75,7 +74,11 @@ export const collectionLibraryCrud = {
if (this.isTitleType === 6) { if (this.isTitleType === 6) {
this.fileData = res.list.content this.fileData = res.list.content
} else { } else {
this.junneiData = res.list.content
if (this.selectedCategory.arrangeType === 1) {
this.anjuanData = res.list.content
} else {
this.junneiData = res.list.content
}
} }
} }
this.page.total = res.list.totalElements this.page.total = res.list.totalElements

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

@ -115,9 +115,20 @@
<span class="dialog-right-top" /> <span class="dialog-right-top" />
<span class="dialog-left-bottom" /> <span class="dialog-left-bottom" />
<div class="setting-dialog"> <div class="setting-dialog">
<!-- form -->
<!-- @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" />
<!-- form @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"
:collect-level="collectLevel"
@close-dialog="closeDialog"
/>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="handlerArchivesSubmit">保存</el-button> <el-button type="primary" @click="handlerArchivesSubmit">保存</el-button>
</div> </div>
@ -236,7 +247,7 @@
</div> </div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="text" @click="downloadVisible = false">取消</el-button> <el-button type="text" @click="downloadVisible = false">取消</el-button>
<el-button type="primary" @click.native="handleExportConfirm">确定</el-button>
<el-button v-loading="delAllLoading" type="primary" @click.native="handleExportConfirm">确定</el-button>
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
@ -291,13 +302,15 @@
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
<div style="height: 30px; line-height: 30px; padding: 0 20px;"> <span v-if="(isTitleType !== 2 && selectedCategory.arrangeType === 3 ) || ((isTitleType === 4 || isTitleType === 6) && selectedCategory.arrangeType === 2) || (isTitleType === 6 && selectedCategory.arrangeType === 1)">{{ test }}</span></div>
<div style="height: 30px; line-height: 30px; padding: 0 20px; font-size: 12px;"> <span v-if="(isTitleType !== 2 && selectedCategory.arrangeType === 3 ) || ((isTitleType === 4 || isTitleType === 6) && selectedCategory.arrangeType === 2) || (isTitleType === 6 && selectedCategory.arrangeType === 1)">{{ test }}</span></div>
</div> </div>
</template> </template>
<script> <script>
import 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'
import { FetchDetailsById, collectDel } from '@/api/collect/collect'
import { FetchArchivesClassTree } from '@/api/system/archivesClass' import { FetchArchivesClassTree } from '@/api/system/archivesClass'
import { FetchDictionaryTree } from '@/api/system/dict' import { FetchDictionaryTree } from '@/api/system/dict'
import Treeselect from '@riophae/vue-treeselect' import Treeselect from '@riophae/vue-treeselect'
@ -333,18 +346,10 @@ export default {
type: Number, type: Number,
default: 2 default: 2
}, },
arcId: {
type: String,
default: function() {
return ''
}
selections: {
type: Array,
default: () => []
}, },
// selections: {
// type: Array,
// default: function() {
// return []
// }
// },
activeIndex: { activeIndex: {
type: Number, type: Number,
default: 0 default: 0
@ -372,6 +377,7 @@ export default {
}, },
projectOptions: [], projectOptions: [],
classifyOptions: [], classifyOptions: [],
delAllLoading: false,
deleteVisible: false, deleteVisible: false,
moveVisible: false, moveVisible: false,
updateVisible: false, updateVisible: false,
@ -383,7 +389,9 @@ export default {
recoverVisible: false, recoverVisible: false,
completelyDeleteVisible: false, completelyDeleteVisible: false,
parentsId: null, // id parentsId: null, // id
isDesFormType: 'arcives' //
isDesFormType: 'arcives', //
collectLevel: null,
arcId: null
} }
}, },
computed: { computed: {
@ -437,6 +445,31 @@ export default {
this.getInitArchivesClass() this.getInitArchivesClass()
this.getDictsList() this.getDictsList()
} }
},
isTitleType: function(newValue, oldValue) {
switch (newValue) {
case 2:
//
this.collectLevel = 1
break
case 3:
if (this.selectedCategory.arrangeType === 1 || this.activeIndex === 1) {
//
this.collectLevel = 3
} else {
//
this.collectLevel = 2
}
break
case 4:
//
this.collectLevel = 3
break
case 6:
//
this.collectLevel = 4
break
}
} }
}, },
created() { created() {
@ -444,8 +477,10 @@ export default {
mounted() { mounted() {
this.getInitArchivesClass() this.getInitArchivesClass()
this.getDictsList() this.getDictsList()
this.getLevel()
}, },
methods: { methods: {
// -
getInitArchivesClass() { getInitArchivesClass() {
this.classifyOptions = [] this.classifyOptions = []
const params = { const params = {
@ -467,16 +502,16 @@ export default {
children: node.childArchivesClass children: node.childArchivesClass
} }
}, },
// -
getDictsList() { getDictsList() {
this.projectOptions = [] this.projectOptions = []
FetchDictionaryTree().then((res) => { FetchDictionaryTree().then((res) => {
console.log(res)
const filterCodes = ['project_class'] const filterCodes = ['project_class']
let filteredItems = JSON.parse(JSON.stringify(res)).filter(item => filterCodes.includes(item.dictionaryCode)) let filteredItems = JSON.parse(JSON.stringify(res)).filter(item => filterCodes.includes(item.dictionaryCode))
filteredItems = this.addLevelToDictionaryList(filteredItems, 1) filteredItems = this.addLevelToDictionaryList(filteredItems, 1)
if (this.selectedCategory.arrangeType === 3 && this.isTitleType === 3) { if (this.selectedCategory.arrangeType === 3 && this.isTitleType === 3) {
this.projectOptions = filteredItems this.projectOptions = filteredItems
console.log(this.projectOptions)
// console.log(this.projectOptions)
} else { } else {
this.projectOptions = this.filterData(filteredItems, filteredItems[0].id) this.projectOptions = this.filterData(filteredItems, filteredItems[0].id)
} }
@ -507,7 +542,7 @@ export default {
return dictionaryList return dictionaryList
}, },
normalizerProject(node) { normalizerProject(node) {
if (node.childDictionarys && !node.childDictionarys.length) {
if ((node.childDictionarys && !node.childDictionarys.length) || node.childDictionarys === null) {
delete node.childDictionarys delete node.childDictionarys
} }
return { return {
@ -525,10 +560,9 @@ export default {
if (type === 'add') { if (type === 'add') {
this.formVisible = true this.formVisible = true
this.formTitle = '新增' + this.collectTitle this.formTitle = '新增' + this.collectTitle
// this.arcId = null
this.arcId = null
} else if (type === 'edit') { } else if (type === 'edit') {
console.log(this.selections)
// this.arcId = this.selections[0].id
this.arcId = this.selections[0].id
if (this.selections.length === 0) { if (this.selections.length === 0) {
this.$message('您还未勾选需要操作的条目,请先确认!') this.$message('您还未勾选需要操作的条目,请先确认!')
return false return false
@ -544,40 +578,71 @@ export default {
// //
this.getFormInfo(type) 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
handleFromEdit() {
},
getLevel() {
switch (this.isTitleType) {
case 2:
//
this.collectLevel = 1
break
case 3:
if (this.selectedCategory.arrangeType === 1 || this.activeIndex === 1) {
//
this.collectLevel = 3
} else { } 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.collectLevel = 2
} }
this.isDesFormType = 'arcives'
this.$refs.previewForm.FetchNoFormatField(this.selectedCategory.id)
break
case 4:
//
this.collectLevel = 3
break
case 6:
//
this.collectLevel = 4
break
}
},
getFormInfo(type) {
if (type === 'edit') {
const params = {
'categoryId': this.selectedCategory.id,
'categoryLevel': this.collectLevel,
'id': this.arcId
}
FetchDetailsById(params).then(data => {
const showFiledAll = data.showFiled.filter(item => item.isSequence).sort((a, b) => a.isSequence - b.isSequence)
this.$nextTick(() => {
this.formPreviewData = showFiledAll
this.isDesFormType = 'arcives'
this.$nextTick(() => {
this.$refs.previewForm.archivesType = 'edit'
this.$refs.previewForm.addOrUpdateForm = data.echo
this.$refs.previewForm.FetchNoFormatField(this.selectedCategory.id)
})
})
}) })
})
} else {
const params = {
'categoryId': this.selectedCategory.id,
'categoryLevel': this.collectLevel
}
FetchInitCategoryInputFieldByPid(params).then(data => {
this.formPreviewData = data
this.$nextTick(() => {
this.isDesFormType = 'arcives'
this.$refs.previewForm.archivesType = 'add'
this.$refs.previewForm.FetchNoFormatField(this.selectedCategory.id)
})
})
}
}, },
// form - submit // form - submit
handlerArchivesSubmit() { handlerArchivesSubmit() {
this.formVisible = false
this.$refs.previewForm.submitForm('addOrUpdateForm', this.selectedCategory.id) this.$refs.previewForm.submitForm('addOrUpdateForm', this.selectedCategory.id)
this.selections = []
}, },
// - // -
handleClose(done) { handleClose(done) {
@ -602,7 +667,25 @@ export default {
}, },
// - // -
handleDelConfirm() { handleDelConfirm() {
this.deleteVisible = false
this.delAllLoading = true
const archivesIds = []
this.selections.forEach(val => {
archivesIds.push(val.id)
})
const params = {
'categoryId': this.selectedCategory.id,
'categoryLevel': this.collectLevel,
'archivesIds': archivesIds
}
collectDel(params).then(() => {
this.crud.notify('删除成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.deleteVisible = false
this.crud.refresh()
this.delAllLoading = false
}).catch(err => {
this.delAllLoading = false
console.log(err)
})
}, },
// - // -
handleMoveConfirm() { handleMoveConfirm() {
@ -823,24 +906,14 @@ export default {
}, },
handleCompletelyDelete() { handleCompletelyDelete() {
this.completelyDeleteVisible = false this.completelyDeleteVisible = false
},
closeDialog() {
this.formVisible = false
} }
} }
} }
</script> </script>
<style lang='scss' scoped> <style lang='scss' scoped>
.collect-filter{
display: flex;
// width: 360px;
height: 32px;
justify-content: flex-end;
::v-deep .vue-treeselect{
font-size: 12px;
margin-right: 10px !important;
.vue-treeselect__control{
height: 33px !important;
}
}
}
</style> </style>

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

@ -52,7 +52,7 @@ export default {
}, },
mounted() { mounted() {
console.log(this.tableData)
// console.log(this.tableData)
}, },
methods: { methods: {
handleComfireTest() { handleComfireTest() {

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

@ -60,8 +60,8 @@ import { header, form } from '@crud/crud'
import CollectHeader from '../module/collectHeader.vue' import CollectHeader from '../module/collectHeader.vue'
import ArchivesInfo from '../module/archivesInfo/index' import ArchivesInfo from '../module/archivesInfo/index'
import tableData from '@/views/archivesManage/managementLibrary/anjuan/table.json'
import jsonData from '@/views/archivesManage/managementLibrary/anjuan/data.json'
// import tableData from '@/views/archivesManage/managementLibrary/anjuan/table.json'
// import jsonData from '@/views/archivesManage/managementLibrary/anjuan/data.json'
export default { export default {
name: 'Project', name: 'Project',
components: { CollectHeader, ArchivesInfo }, components: { CollectHeader, ArchivesInfo },
@ -91,19 +91,20 @@ export default {
isTitleType: 2, isTitleType: 2,
categoryId: 'B073E8430B85B4821E7360', categoryId: 'B073E8430B85B4821E7360',
arcId: '2946C34412182B73FBC287', arcId: '2946C34412182B73FBC287',
activeIndex: '1'
activeIndex: '1',
selections: []
} }
}, },
watch: { watch: {
selectedCategory: function(newValue, oldValue) { selectedCategory: function(newValue, oldValue) {
}, },
tableDisplayFields(val) { tableDisplayFields(val) {
this.doLayout()
// this.doLayout()
} }
}, },
created() { created() {
this.tableDisplayFields = tableData.data
this.projectData = jsonData.data.list.content
// this.tableDisplayFields = tableData.data
// this.projectData = jsonData.data.list.content
}, },
mounted() { mounted() {
}, },
@ -138,7 +139,7 @@ export default {
if (this.timer) { if (this.timer) {
clearTimeout(this.timer) clearTimeout(this.timer)
} }
console.log('tableDoubleClick', row)
// console.log('tableDoubleClick', row)
this.arcId = row.id this.arcId = row.id
this.$refs.archivesInfo.detailTitle = '项目详情' this.$refs.archivesInfo.detailTitle = '项目详情'
this.$refs.archivesInfo.archivesInfoVisible = true this.$refs.archivesInfo.archivesInfoVisible = true
@ -147,12 +148,12 @@ export default {
}, },
// table - row // table - row
clickRowHandler(row) { clickRowHandler(row) {
console.log('clickRowHandler', row)
// console.log('clickRowHandler', row)
if (this.timer) { if (this.timer) {
clearTimeout(this.timer) clearTimeout(this.timer)
} }
this.timer = setTimeout(() => { this.timer = setTimeout(() => {
this.openAnjuan('所属项目' + row.archive_no)
this.openAnjuan('所属项目' + row.archive_no)
}, 300) }, 300)
this.selections = this.crud.selections this.selections = this.crud.selections
}, },

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

@ -113,7 +113,8 @@
<script> <script>
import { crud } from '@crud/crud' import { crud } from '@crud/crud'
import { edit, FetchDoeditIsRepeat } from '@/api/archivesManage/archivesList'
import { FetchDoeditIsRepeat } from '@/api/archivesManage/archivesList'
import { collectAdd, collectEdit } from '@/api/collect/collect'
import { prearchEdit, FetchMergeToFile, FetchReDoeditIsRepeat } from '@/api/prearchiveLibrary/prearchiveLibrary' import { prearchEdit, FetchMergeToFile, FetchReDoeditIsRepeat } from '@/api/prearchiveLibrary/prearchiveLibrary'
import { getNoFormatField } from '@/api/system/category/fileNoFormat' import { getNoFormatField } from '@/api/system/category/fileNoFormat'
import draggable from 'vuedraggable' import draggable from 'vuedraggable'
@ -171,6 +172,10 @@ export default {
isDesFormType: { isDesFormType: {
type: String, type: String,
default: '' default: ''
},
collectLevel: {
type: Number,
default: 1
} }
}, },
data() { data() {
@ -195,7 +200,6 @@ export default {
result: null, result: null,
autoMatic: null, autoMatic: null,
// isType: 'category', // isType: 'category',
file: null, // change file: null, // change
fileNames: '', // - name fileNames: '', // - name
formatType: '', // - type formatType: '', // - type
@ -206,7 +210,8 @@ export default {
nowDate: '', // nowDate: '', //
fileJsonString: null, fileJsonString: null,
mergeFileArcIds: null, mergeFileArcIds: null,
mergeFileCategory: null
mergeFileCategory: null,
archivesType: null
} }
}, },
computed: { computed: {
@ -253,11 +258,11 @@ export default {
} }
}, },
normalizerClassify(node) { normalizerClassify(node) {
if (node.childArchivesClass && !node.childArchivesClass.length) {
if ((node.childArchivesClass && !node.childArchivesClass.length) || node.childArchivesClass === null) {
delete node.childArchivesClass delete node.childArchivesClass
} }
return { return {
id: node.name,
id: node.code,
label: node.name, label: node.name,
children: node.childArchivesClass children: node.childArchivesClass
} }
@ -267,7 +272,7 @@ export default {
delete node.childMenus delete node.childMenus
} }
return { return {
id: node.fondsName,
id: node.fondsNo,
label: node.fondsName, label: node.fondsName,
children: node.childMenus children: node.childMenus
} }
@ -295,13 +300,13 @@ export default {
}) })
return data return data
}, },
getFondsNode(list, fondsName) {
getFondsNode(list, fondsNo) {
let data; let data;
(list || []).map(item => { (list || []).map(item => {
if (item.fondsName === fondsName) {
if (item.fondsNo === fondsNo) {
data = [item] data = [item]
} else { } else {
const child = this.getFondsNode(item.childMenus, fondsName)
const child = this.getFondsNode(item.childMenus, fondsNo)
if (child) { if (child) {
data = child data = child
} }
@ -309,13 +314,13 @@ export default {
}) })
return data return data
}, },
getClassfiyNode(list, name) {
getClassfiyNode(list, code) {
let data; let data;
(list || []).map(item => { (list || []).map(item => {
if (item.name === name) {
if (item.code === code) {
data = [item] data = [item]
} else { } else {
const child = this.getClassfiyNode(item.childArchivesClass, name)
const child = this.getClassfiyNode(item.childArchivesClass, code)
if (child) { if (child) {
data = child data = child
} }
@ -325,6 +330,7 @@ export default {
}, },
// //
handleAuto() { handleAuto() {
console.log('isTableType', this.isTableType)
let string = '' let string = ''
const getAutoFiledVal = [] const getAutoFiledVal = []
this.autoMatic.forEach(async val => { this.autoMatic.forEach(async val => {
@ -349,6 +355,7 @@ export default {
await FetchFondsAll().then(res => { await FetchFondsAll().then(res => {
const option = this.getFondsNode(res, this.addOrUpdateForm[val.fieldName]) const option = this.getFondsNode(res, this.addOrUpdateForm[val.fieldName])
if (option) { if (option) {
console.log('option', option)
const obj = {} const obj = {}
obj.name = val.fieldName obj.name = val.fieldName
obj.val = option[0].fondsNo + val.connector obj.val = option[0].fondsNo + val.connector
@ -402,7 +409,7 @@ export default {
}, },
// //
FetchNoFormatField(categoryId) { FetchNoFormatField(categoryId) {
getNoFormatField({ categoryId: categoryId }).then(res => {
getNoFormatField({ categoryId: categoryId, categoryLevel: this.collectLevel }).then(res => {
this.autoMatic = res this.autoMatic = res
this.handleAuto() this.handleAuto()
}) })
@ -601,9 +608,9 @@ export default {
console.log(val) console.log(val)
if (val.length > 0) { if (val.length > 0) {
if (this.isTableType === 1) { if (this.isTableType === 1) {
this.addOrUpdateForm[this.currentFieldName] = val[0].fondsName
this.addOrUpdateForm[this.currentFieldName] = val[0].fondsNo
} else if (this.isTableType === 2 && this.isDesFormType !== 'prearchiveLibrary') { } else if (this.isTableType === 2 && this.isDesFormType !== 'prearchiveLibrary') {
this.addOrUpdateForm[this.currentFieldName] = val[0].name
this.addOrUpdateForm[this.currentFieldName] = val[0].code
} else { } else {
this.addOrUpdateForm[this.currentFieldName] = val[0].dictionaryName this.addOrUpdateForm[this.currentFieldName] = val[0].dictionaryName
} }
@ -717,7 +724,7 @@ export default {
this.formPreviewData.map(item => { this.formPreviewData.map(item => {
if (item.isInputClass === 'date') { if (item.isInputClass === 'date') {
if (this.addOrUpdateForm[item.fieldName] !== '') { if (this.addOrUpdateForm[item.fieldName] !== '') {
this.$set(this.addOrUpdateForm, item.fieldName, parseTime(this.addOrUpdateForm[item.fieldName]).split('00:00:00')[0])
this.$set(this.addOrUpdateForm, item.fieldName, parseTime(this.addOrUpdateForm[item.fieldName]).split(' ')[0])
} }
} }
}) })
@ -760,6 +767,7 @@ export default {
} }
}) })
} else if (this.isDesFormType === 'mergeFile') { } else if (this.isDesFormType === 'mergeFile') {
//
const params = { const params = {
'archivesId': null, 'archivesId': null,
'archivesIds': this.mergeFileArcIds, 'archivesIds': this.mergeFileArcIds,
@ -776,22 +784,32 @@ export default {
} }
}) })
} else { } else {
//
const params = { const params = {
'id': this.arcId,
'archivesId': this.arcId,
'categoryId': categoryId, 'categoryId': categoryId,
'parentsId': this.setParentsId,
'categoryLevel': this.collectLevel,
'jsonString': JSON.stringify(this.addOrUpdateForm) 'jsonString': JSON.stringify(this.addOrUpdateForm)
} }
console.log(this.addOrUpdateForm) console.log(this.addOrUpdateForm)
edit(params).then(res => {
if (res) {
this.$message.success(res)
this.$emit('emitTableList')
this.crud.refresh()
localStorage.setItem('isForm', true)
localStorage.removeItem('isDelt')
}
})
console.log(params)
if (this.archivesType === 'add') {
collectAdd(params).then(res => {
if (res.code === 200) {
this.$message.success(res)
this.$emit('close-dialog')
this.crud.refresh()
}
})
} else {
collectEdit(params).then(res => {
if (res.code === 200) {
this.$message.success(res)
this.$emit('close-dialog')
this.crud.refresh()
}
})
}
} }
} else { } else {
console.log('error submit!!') console.log('error submit!!')

Loading…
Cancel
Save