Browse Source

收集库api调试

master
xuhuajiao 1 year ago
parent
commit
8f73f62ffc
  1. 11
      src/api/collect/collect.js
  2. 3
      src/views/collectReorganizi/collectionLibrary/anjuan/content.vue
  3. 2
      src/views/collectReorganizi/collectionLibrary/anjuan/index.vue
  4. 78
      src/views/collectReorganizi/collectionLibrary/anjuan/tableList.vue
  5. 21
      src/views/collectReorganizi/collectionLibrary/file/index.vue
  6. 53
      src/views/collectReorganizi/collectionLibrary/index.vue
  7. 28
      src/views/collectReorganizi/collectionLibrary/juannei/index.vue
  8. 86
      src/views/collectReorganizi/collectionLibrary/mixins/index.js
  9. 134
      src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue
  10. 25
      src/views/collectReorganizi/collectionLibrary/project/index.vue
  11. 95
      src/views/components/category/PreviewForm.vue

11
src/api/collect/collect.js

@ -54,4 +54,13 @@ export function FetchDetailsById(params) {
}) })
} }
export default { collectAdd, collectEdit, collectDel, FetchInitCategoryViewTable, FetchInitCategoryView, FetchDetailsById }
// 移出卷内
export function FetchRemoveArchivesSingle(data) {
return request({
url: 'api/collect/removeArchivesSingle',
method: 'post',
data
})
}
export default { collectAdd, collectEdit, collectDel, FetchInitCategoryViewTable, FetchInitCategoryView, FetchDetailsById, FetchRemoveArchivesSingle }

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

@ -41,9 +41,6 @@ export default {
created() { created() {
}, },
mounted() { mounted() {
// 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,11 +47,11 @@ export default {
created() { created() {
}, },
mounted() { mounted() {
// console.log('nei', this.selectedCategory.arrangeType)
}, },
methods: { methods: {
closeDrawer() { closeDrawer() {
this.anjuanDrawer = false this.anjuanDrawer = false
this.$parent.parentsProjectId = null
} }
} }
} }

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

@ -58,9 +58,6 @@ import { header, form } from '@crud/crud'
import { collectionLibraryCrud } from '../mixins/index' 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'
export default { export default {
name: 'Sorted', name: 'Sorted',
components: { ArchivesInfo, CollectHeader }, components: { ArchivesInfo, CollectHeader },
@ -93,12 +90,15 @@ export default {
default: false default: false
} }
}, },
inject: ['parentsData'],
data() { data() {
return { return {
categoryId: 'F0F59CC713C83AE4BAB99B',
arcId: '256E752BC0280618840600',
categoryId: '',
arcId: '',
title: '', title: '',
selections: []
selections: [],
yearData: [],
parentId: null
} }
}, },
watch: { watch: {
@ -117,37 +117,47 @@ export default {
activeIndex(newValue) { activeIndex(newValue) {
if (newValue === 1) { if (newValue === 1) {
this.title = '文件' this.title = '文件'
if (this.selectedCategory.arrangeType === 3) {
this.getCommonData(3, this.parentsData.parentsProjectId)
} else {
this.getCommonData(3, null)
}
} else { } else {
this.title = '案卷' this.title = '案卷'
if (this.selectedCategory.arrangeType === 3) {
this.getCommonData(2, this.parentsData.parentsProjectId)
} else {
this.getCommonData(2, null)
}
} }
this.selections = [] this.selections = []
this.$refs.table.clearSelection() this.$refs.table.clearSelection()
} }
}, },
created() { created() {
// this.tableDisplayFields = tableData.data
// this.anjuanData = jsonData.data.list.content
}, },
mounted() { mounted() {
}, },
methods: { methods: {
getCommonData(type) {
this.getViewTable(type)
getCommonData(type, parentId) {
this.getViewTable(type, parentId)
}, },
rowKey(row) { rowKey(row) {
return row.id return row.id
}, },
openJuannei(data) {
sendYearDataToParent() {
this.$parent.$parent.$emit('myYearEvent', this.yearData)
},
openJuannei(data, parentId) {
// this.$emit('openJuannei', '') // this.$emit('openJuannei', '')
if (this.selectedCategory.arrangeType === 3) { if (this.selectedCategory.arrangeType === 3) {
this.$parent.$parent.$parent.$emit('openJuannei', data)
this.$parent.$parent.$parent.$emit('openJuannei', data, parentId)
} else { } else {
this.$parent.$parent.$emit('openJuannei', data)
this.$parent.$parent.$emit('openJuannei', data, parentId)
} }
}, },
// table // table
tableRowClassName({ row, rowIndex }) { tableRowClassName({ row, rowIndex }) {
// console.log('', row, rowIndex)
let color = '' let color = ''
this.selections.forEach(item => { this.selections.forEach(item => {
if (item.id === row.id) { if (item.id === row.id) {
@ -165,9 +175,7 @@ export default {
if (this.timer) { if (this.timer) {
clearTimeout(this.timer) clearTimeout(this.timer)
} }
// console.log('tableDoubleClick', row)
this.arcId = row.id this.arcId = row.id
if (this.selectedCategory.arrangeType !== 1) { if (this.selectedCategory.arrangeType !== 1) {
this.$refs.archivesInfo.isHasFile = false this.$refs.archivesInfo.isHasFile = false
if (this.activeIndex === 1) { if (this.activeIndex === 1) {
@ -186,6 +194,9 @@ export default {
}, },
// table - row // table - row
clickRowHandler(row) { clickRowHandler(row) {
if (this.timer) {
clearTimeout(this.timer)
}
if (this.selectedCategory.arrangeType === 1) { if (this.selectedCategory.arrangeType === 1) {
if (this.activeIndex === 0) { if (this.activeIndex === 0) {
this.title = '文件' this.title = '文件'
@ -195,27 +206,48 @@ export default {
this.title = '案卷' this.title = '案卷'
} }
} }
if (this.timer) {
clearTimeout(this.timer)
}
this.timer = setTimeout(() => { this.timer = setTimeout(() => {
this.openJuannei('所属' + this.title + ':' + row.archive_no)
this.parentId = row.id
this.openJuannei('所属' + this.title + ':' + row.archive_no, this.parentId)
}, 300) }, 300)
this.selections = this.crud.selections this.selections = this.crud.selections
}, },
// //
handleCurrentChange(selection, row) { handleCurrentChange(selection, row) {
// console.log('', row)
this.selections = selection this.selections = selection
}, },
handleSizeChange(size) { handleSizeChange(size) {
this.page.size = size this.page.size = size
this.page.page = 1 this.page.page = 1
this.getViewTable(2)
if (this.activeIndex === 1) {
if (this.selectedCategory.arrangeType === 3) {
this.getViewTable(3, this.parentsData.parentsProjectId)
} else {
this.getViewTable(3, null)
}
} else {
if (this.selectedCategory.arrangeType === 3) {
this.getViewTable(2, this.parentsData.parentsProjectId)
} else {
this.getViewTable(2, null)
}
}
}, },
handleCurrentPage(val) { handleCurrentPage(val) {
this.page.page = val this.page.page = val
this.getViewTable(2)
if (this.activeIndex === 1) {
if (this.selectedCategory.arrangeType === 3) {
this.getViewTable(3, this.parentsData.parentsProjectId)
} else {
this.getViewTable(3, null)
}
} else {
if (this.selectedCategory.arrangeType === 3) {
this.getViewTable(2, this.parentsData.parentsProjectId)
} else {
this.getViewTable(2, null)
}
}
} }
} }
} }

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

@ -92,6 +92,7 @@ export default {
default: false default: false
} }
}, },
inject: ['parentsData'],
data() { data() {
return { return {
isTitleType: 6, isTitleType: 6,
@ -110,8 +111,16 @@ export default {
mounted() { mounted() {
}, },
methods: { methods: {
getCommonData(type, parentId) {
this.getViewTable(type, parentId)
},
closeDrawer() { closeDrawer() {
this.fileDrawer = false this.fileDrawer = false
if (this.selectedCategory.arrangeType === 1) {
this.$parent.parentsAnjuanId = null
} else {
this.$parent.parentsJuanneiId = null
}
}, },
rowKey(row) { rowKey(row) {
return row.id return row.id
@ -149,11 +158,19 @@ export default {
handleSizeChange(size) { handleSizeChange(size) {
this.page.size = size this.page.size = size
this.page.page = 1 this.page.page = 1
this.getViewTable(3)
if (this.selectedCategory.arrangeType === 1) {
this.getViewTable(4, this.parentsData.parentsAnjuanId)
} else {
this.getViewTable(4, this.parentsData.parentsJuanneiId)
}
}, },
handleCurrentPage(val) { handleCurrentPage(val) {
this.page.page = val this.page.page = val
this.getViewTable(3)
if (this.selectedCategory.arrangeType === 1) {
this.getViewTable(4, this.parentsData.parentsAnjuanId)
} else {
this.getViewTable(4, this.parentsData.parentsJuanneiId)
}
} }
} }
} }

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

@ -51,8 +51,8 @@
<div class="container-right tab-content"> <div class="container-right tab-content">
<span class="right-top-line" /> <span class="right-top-line" />
<span class="left-bottom-line" /> <span class="left-bottom-line" />
<Project v-if="selectedCategory.arrangeType === 3" ref="projectEle" :selected-category="selectedCategory" :data="sharedData" :is-recycle="isRecycle" @openAnjuan="handleOpenAnjuan" />
<Anjuan v-if="selectedCategory.arrangeType === 1 || selectedCategory.arrangeType === 2 || selectedCategory.arrangeType === 3" ref="anjuanEle" :selected-category="selectedCategory" :data="sharedData" :is-recycle="isRecycle" @openJuannei="handleOpenJuannei" />
<Project v-if="selectedCategory.arrangeType === 3" ref="projectEle" :selected-category="selectedCategory" :data="sharedData" :is-recycle="isRecycle" @openAnjuan="handleOpenAnjuan" @myYearEvent="handleYearData" />
<Anjuan v-if="selectedCategory.arrangeType === 1 || selectedCategory.arrangeType === 2 || selectedCategory.arrangeType === 3" ref="anjuanEle" :selected-category="selectedCategory" :data="sharedData" :is-recycle="isRecycle" @openJuannei="handleOpenJuannei" @myYearEvent="handleYearData" />
<Juannei v-if="selectedCategory.arrangeType === 2 || selectedCategory.arrangeType === 3" ref="juanneiEle" :data="sharedData" :selected-category="selectedCategory" :is-recycle="isRecycle" @openFile="handleOpenFile" /> <Juannei v-if="selectedCategory.arrangeType === 2 || selectedCategory.arrangeType === 3" ref="juanneiEle" :data="sharedData" :selected-category="selectedCategory" :is-recycle="isRecycle" @openFile="handleOpenFile" />
<File v-if="selectedCategory.arrangeType === 1 || selectedCategory.arrangeType === 2 || selectedCategory.arrangeType === 3" ref="fileEle" :is-recycle="isRecycle" :selected-category="selectedCategory" /> <File v-if="selectedCategory.arrangeType === 1 || selectedCategory.arrangeType === 2 || selectedCategory.arrangeType === 3" ref="fileEle" :is-recycle="isRecycle" :selected-category="selectedCategory" />
</div> </div>
@ -96,6 +96,11 @@ export default {
default: false default: false
} }
}, },
provide() {
return {
parentsData: this
}
},
data() { data() {
return { return {
defaultProps: { defaultProps: {
@ -112,8 +117,10 @@ export default {
}, },
sharedData: '', sharedData: '',
selectedCategory: {}, selectedCategory: {},
classifyTree: [],
classifyLoading: false
yearChildData: '',
parentsProjectId: null,
parentsAnjuanId: null,
parentsJuanneiId: null
} }
}, },
watch: { watch: {
@ -125,6 +132,26 @@ export default {
mounted() { mounted() {
}, },
methods: { methods: {
handleYearData(data) {
this.yearChildData = data
this.classifyLoading = true
setTimeout(() => {
if (this.classifyTree[0].dictionaryName === '年度') {
this.classifyTree = this.classifyTree.slice(1)
}
if (this.yearChildData.length !== 0) {
const newYearArr = this.yearChildData.map((item, index) => {
const json = {}
json.id = index
json.dictionaryName = item
json.childDictionarys = []
return json
})
this.classifyTree.unshift({ id: -1, dictionaryName: '年度', dicCode: 'Search_year', childDictionarys: newYearArr })
}
this.classifyLoading = false
}, 500)
},
filterData(data) { filterData(data) {
return data.filter(node => { return data.filter(node => {
if (node.children && node.children.length > 0) { if (node.children && node.children.length > 0) {
@ -248,36 +275,46 @@ export default {
}) })
}, },
handleNodeFilter(val) { handleNodeFilter(val) {
console.log('val', val)
// console.log('val', val)
}, },
handleOpenAnjuan(data) {
handleOpenAnjuan(data, parentId) {
this.parentsProjectId = parentId
console.log('this.parentsProjectId', this.parentsProjectId)
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) {
this.$refs.anjuanEle.$refs.ajContent.activeIndex = 0 this.$refs.anjuanEle.$refs.ajContent.activeIndex = 0
} }
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.anjuanEle.$refs.ajContent.$refs.tableList.getCommonData(2, this.parentsProjectId)
this.$refs.anjuanEle.$refs.ajContent.test = data this.$refs.anjuanEle.$refs.ajContent.test = data
}) })
}, },
handleOpenJuannei(data) {
handleOpenJuannei(data, parentId) {
this.parentsAnjuanId = parentId
console.log('this.parentsAnjuanId', this.parentsAnjuanId)
if (this.selectedCategory.arrangeType === 1 || (this.selectedCategory.arrangeType === 3 && this.$refs.anjuanEle.$refs.ajContent.activeIndex === 1) || (this.selectedCategory.arrangeType === 2 && this.$refs.anjuanEle.$refs.ajContent.activeIndex === 1)) { if (this.selectedCategory.arrangeType === 1 || (this.selectedCategory.arrangeType === 3 && this.$refs.anjuanEle.$refs.ajContent.activeIndex === 1) || (this.selectedCategory.arrangeType === 2 && this.$refs.anjuanEle.$refs.ajContent.activeIndex === 1)) {
this.$refs.fileEle.fileDrawer = true this.$refs.fileEle.fileDrawer = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.fileEle.getCommonData(4, this.parentsAnjuanId)
this.$refs.fileEle.test = data this.$refs.fileEle.test = data
this.$refs.fileEle.isAjNo = 1 this.$refs.fileEle.isAjNo = 1
}) })
} else { } else {
this.$refs.juanneiEle.juanneiDrawer = true this.$refs.juanneiEle.juanneiDrawer = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.juanneiEle.getCommonData(3, this.parentsAnjuanId)
this.$refs.juanneiEle.test = data this.$refs.juanneiEle.test = data
this.$refs.fileEle.isAjNo = 0 this.$refs.fileEle.isAjNo = 0
}) })
} }
}, },
handleOpenFile(data) {
handleOpenFile(data, parentId) {
this.parentsJuanneiId = parentId
console.log('this.parentsJuanneiId', this.parentsJuanneiId)
this.$refs.fileEle.fileDrawer = true this.$refs.fileEle.fileDrawer = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.fileEle.getCommonData(4, this.parentsJuanneiId)
this.$refs.fileEle.test = data this.$refs.fileEle.test = data
}) })
} }

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

@ -67,8 +67,6 @@ import { collectionLibraryCrud } from '../mixins/index'
import { header, form } from '@crud/crud' 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'
export default { export default {
name: 'Juannei', name: 'Juannei',
components: { CollectHeader, ArchivesInfo }, components: { CollectHeader, ArchivesInfo },
@ -89,14 +87,16 @@ export default {
default: false default: false
} }
}, },
inject: ['parentsData'],
data() { data() {
return { return {
isTitleType: 4, isTitleType: 4,
juanneiDrawer: false, juanneiDrawer: false,
categoryId: 'CD135F6A77018CE04D4FDB',
arcId: '256E752BC0280618840600',
categoryId: '',
arcId: '',
test: '', test: '',
selections: []
selections: [],
parentId: null
} }
}, },
watch: { watch: {
@ -107,21 +107,20 @@ export default {
} }
}, },
created() { created() {
this.tableDisplayFields = tableData.data
this.junneiData = jsonData.data.list.content
}, },
mounted() { mounted() {
}, },
methods: { methods: {
getCommonData(type) {
this.getViewTable(type)
getCommonData(type, parentId) {
this.getViewTable(type, parentId)
}, },
openFile(data) {
openFile(data, parentId) {
// this.$emit('openFile', '') // this.$emit('openFile', '')
this.$emit('openFile', data)
this.$emit('openFile', data, parentId)
}, },
closeDrawer() { closeDrawer() {
this.juanneiDrawer = false this.juanneiDrawer = false
this.$parent.parentsAnjuanId = null
}, },
rowKey(row) { rowKey(row) {
return row.id return row.id
@ -161,7 +160,8 @@ export default {
clearTimeout(this.timer) clearTimeout(this.timer)
} }
this.timer = setTimeout(() => { this.timer = setTimeout(() => {
this.openFile('所属卷内:' + row.archive_no)
this.parentId = row.id
this.openFile('所属卷内:' + row.archive_no, this.parentId)
}, 300) }, 300)
this.selections = this.crud.selections this.selections = this.crud.selections
}, },
@ -173,11 +173,11 @@ export default {
handleSizeChange(size) { handleSizeChange(size) {
this.page.size = size this.page.size = size
this.page.page = 1 this.page.page = 1
this.getViewTable(3)
this.getViewTable(3, this.parentsData.parentsAnjuanId)
}, },
handleCurrentPage(val) { handleCurrentPage(val) {
this.page.page = val this.page.page = val
this.getViewTable(3)
this.getViewTable(3, this.parentsData.parentsAnjuanId)
} }
} }
} }

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

@ -1,11 +1,13 @@
// import qs from 'qs' // import qs from 'qs'
// import { exportFile } from '@/utils/index' // import { exportFile } from '@/utils/index'
import { FetchInitCategoryViewTable, FetchInitCategoryView } from '@/api/collect/collect' import { FetchInitCategoryViewTable, FetchInitCategoryView } from '@/api/collect/collect'
import { crud } from '@crud/crud'
export const collectionLibraryCrud = { export const collectionLibraryCrud = {
mixins: [crud()],
// 组件共用属性 // 组件共用属性
data() { data() {
return { return {
getTableDisplayFieldsLoading: false, // table-loading
getTableDisplayFieldsLoading: false,
tableDisplayFields: [], tableDisplayFields: [],
projectData: [], projectData: [],
anjuanData: [], anjuanData: [],
@ -20,7 +22,10 @@ export const collectionLibraryCrud = {
timer: null, timer: null,
query: { query: {
search: null search: null
}
},
classifyTree: [],
classifyLoading: false,
parentsId: null
} }
}, },
// 组件挂载时的共用方法 // 组件挂载时的共用方法
@ -28,10 +33,33 @@ export const collectionLibraryCrud = {
}, },
// 组件共用方法 // 组件共用方法
methods: { methods: {
handleSearch() {
this.getViewTableList()
handleSearch(categoryLevel) {
let parentsId = null
// 2 项目 3 案卷 /文件 4 卷内 6 文件
if (this.isTitleType === 2) {
parentsId = null
} else if (this.isTitleType === 3) {
console.log('this.isTitleType', this.isTitleType)
if (this.selectedCategory.arrangeType === 1) {
parentsId = null
} else {
parentsId = this.parentsData.parentsProjectId
this.$parent.getTableDisplayFieldsLoading = true
}
} else if (this.isTitleType === 4) {
// 卷内
this.$parent.$parent.getTableDisplayFieldsLoading = true
parentsId = this.parentsData.parentsAnjuanId
} else if (this.isTitleType === 6) {
// 原文
this.$parent.$parent.getTableDisplayFieldsLoading = true
parentsId = this.parentsData.parentsJuanneiId
}
setTimeout(() => {
this.getViewTableList(categoryLevel, 'search', parentsId)
}, 200)
}, },
getViewTable(categoryLevel) {
getViewTable(categoryLevel, parentsId) {
this.getTableDisplayFieldsLoading = true this.getTableDisplayFieldsLoading = true
this.tableDisplayFields = [] this.tableDisplayFields = []
FetchInitCategoryViewTable({ categoryId: this.selectedCategory.id, categoryLevel: categoryLevel }).then((res) => { FetchInitCategoryViewTable({ categoryId: this.selectedCategory.id, categoryLevel: categoryLevel }).then((res) => {
@ -45,15 +73,15 @@ export const collectionLibraryCrud = {
} }
}) })
this.$nextTick(() => { this.$nextTick(() => {
console.log('tableDisplayFields', this.tableDisplayFields)
this.getViewTableList(categoryLevel)
this.getViewTableList(categoryLevel, null, parentsId)
}) })
} }
}) })
}, },
getViewTableList(categoryLevel) {
this.anjuanData = []
getViewTableList(categoryLevel, type, parentsId) {
console.log('list', parentsId)
const params = { const params = {
'parentId': parentsId,
'categoryId': this.selectedCategory.id, 'categoryId': this.selectedCategory.id,
'categoryLevel': categoryLevel, 'categoryLevel': categoryLevel,
'search': this.query.search, 'search': this.query.search,
@ -61,31 +89,63 @@ export const collectionLibraryCrud = {
'size': this.page.size 'size': this.page.size
} }
FetchInitCategoryView(params).then((res) => { FetchInitCategoryView(params).then((res) => {
console.log(res)
if (res.code !== 500) { if (res.code !== 500) {
if (categoryLevel === 1) { if (categoryLevel === 1) {
console.log('111')
this.projectData = res.list.content this.projectData = res.list.content
this.yearData = res.yearGroup
if (this.yearData) {
this.$emit('myYearEvent', this.yearData)
}
if (type === 'search') {
this.$parent.projectData = res.list.content
this.$parent.getTableDisplayFieldsLoading = false
}
} else if (categoryLevel === 2) { } else if (categoryLevel === 2) {
console.log('2222222')
this.anjuanData = res.list.content this.anjuanData = res.list.content
this.yearData = res.yearGroup
if (this.yearData) {
this.$parent.$parent.$emit('myYearEvent', this.yearData)
}
if (type === 'search') {
this.$parent.anjuanData = res.list.content
this.$parent.getTableDisplayFieldsLoading = false
}
} else if (categoryLevel === 3) { } else if (categoryLevel === 3) {
console.log('333')
if (this.isTitleType === 6) { if (this.isTitleType === 6) {
this.fileData = res.list.content this.fileData = res.list.content
} else if (this.isTitleType === 3) {
this.anjuanData = res.list.content
this.yearData = res.yearGroup
if (this.yearData) {
this.$parent.$parent.$emit('myYearEvent', this.yearData)
}
} else { } else {
if (this.selectedCategory.arrangeType === 1) { if (this.selectedCategory.arrangeType === 1) {
this.anjuanData = res.list.content this.anjuanData = res.list.content
this.yearData = res.yearGroup
if (this.yearData) {
this.$parent.$parent.$emit('myYearEvent', this.yearData)
}
if (type === 'search') {
this.$parent.anjuanData = res.list.content
this.$parent.getTableDisplayFieldsLoading = false
}
} else { } else {
this.junneiData = res.list.content this.junneiData = res.list.content
if (type === 'search') {
this.$parent.$parent.junneiData = res.list.content
this.$parent.$parent.getTableDisplayFieldsLoading = false
}
} }
} }
} }
this.page.total = res.list.totalElements this.page.total = res.list.totalElements
} }
this.getTableDisplayFieldsLoading = false this.getTableDisplayFieldsLoading = false
this.$parent.$parent.$refs.table.clearSelection()
}) })
}, },
/* 重新渲染table组件 防止table-fixed 错位 配合watch-table数据 */ /* 重新渲染table组件 防止table-fixed 错位 配合watch-table数据 */
doLayout() { doLayout() {
this.$nextTick(() => { this.$nextTick(() => {

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

@ -27,8 +27,8 @@
</div> </div>
<div v-if="isTitleType !== 6" class="head-search"> <div v-if="isTitleType !== 6" class="head-search">
<!-- 搜索 --> <!-- 搜索 -->
<el-input v-model="query.search" clearable size="small" :placeholder="placeholderType" prefix-icon="el-icon-search" style="width: 200px;" class="filter-item" />
<el-button class="filter-item filter-search" size="mini" type="success" icon="el-icon-search" @click="handleSearch">搜索</el-button>
<el-input v-model="query.search" clearable size="small" :placeholder="placeholderType" prefix-icon="el-icon-search" style="width: 200px;" class="filter-item" @keyup.enter.native="handleSearch(collectLevel)" @clear="handleSearch(collectLevel)" />
<el-button class="filter-item filter-search" size="mini" type="success" icon="el-icon-search" @click="handleSearch(collectLevel)">搜索</el-button>
<el-button class="filter-item filter-refresh" size="mini" type="warning" icon="el-icon-refresh-left">重置</el-button> <el-button class="filter-item filter-refresh" size="mini" type="warning" icon="el-icon-refresh-left">重置</el-button>
</div> </div>
<div v-if="!isRecycle" class="collect-menu"> <div v-if="!isRecycle" class="collect-menu">
@ -123,9 +123,9 @@
:is-disabled="false" :is-disabled="false"
:form-preview-data.sync="formPreviewData" :form-preview-data.sync="formPreviewData"
:selected-category="selectedCategory" :selected-category="selectedCategory"
:parents-id="parentsId"
:arc-id="arcId" :arc-id="arcId"
:is-des-form-type="isDesFormType" :is-des-form-type="isDesFormType"
:is-title-type="isTitleType"
:collect-level="collectLevel" :collect-level="collectLevel"
@close-dialog="closeDialog" @close-dialog="closeDialog"
/> />
@ -307,10 +307,10 @@
</template> </template>
<script> <script>
import 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'
import { FetchDetailsById, collectDel } from '@/api/collect/collect'
import { FetchDetailsById, collectDel, FetchRemoveArchivesSingle } 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'
@ -334,7 +334,7 @@ import { mapGetters } from 'vuex'
export default { export default {
name: 'CollectHeader', name: 'CollectHeader',
components: { Treeselect, PreviewForm, UploadOriginal, BlukImport, BlukEditing, FileNumberAdjustment, FileSeqAdjustment, CombineFile, InsertFile, CollectMoveFile, Print, FourTest, QuickPaper }, components: { Treeselect, PreviewForm, UploadOriginal, BlukImport, BlukEditing, FileNumberAdjustment, FileSeqAdjustment, CombineFile, InsertFile, CollectMoveFile, Print, FourTest, QuickPaper },
mixins: [collectionLibraryCrud],
mixins: [collectionLibraryCrud, crud()],
props: { props: {
selectedCategory: { selectedCategory: {
type: Object, type: Object,
@ -365,6 +365,7 @@ export default {
default: false default: false
} }
}, },
inject: ['parentsData'],
data() { data() {
return { return {
activeMenuIndex: '1', activeMenuIndex: '1',
@ -388,9 +389,7 @@ export default {
downloadVisible: false, downloadVisible: false,
recoverVisible: false, recoverVisible: false,
completelyDeleteVisible: false, completelyDeleteVisible: false,
parentsId: null, // id
isDesFormType: 'arcives', // isDesFormType: 'arcives', //
collectLevel: null,
arcId: null arcId: null
} }
}, },
@ -418,6 +417,26 @@ export default {
} }
return '' return ''
}, },
collectLevel() {
if (this.isTitleType === 2) {
return 1
} else if (this.isTitleType === 3) {
if (this.selectedCategory.arrangeType === 1) {
return 3
} else {
if (this.activeIndex === 1) {
return 3
} else {
return 2
}
}
} else if (this.isTitleType === 4) {
return 3
} else if (this.isTitleType === 6) {
return 4
}
return null
},
classType() { classType() {
if (this.isTitleType === 2) { if (this.isTitleType === 2) {
return '' return ''
@ -447,29 +466,7 @@ export default {
} }
}, },
isTitleType: function(newValue, oldValue) { 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
}
console.log('newValue', newValue)
} }
}, },
created() { created() {
@ -477,7 +474,6 @@ export default {
mounted() { mounted() {
this.getInitArchivesClass() this.getInitArchivesClass()
this.getDictsList() this.getDictsList()
this.getLevel()
}, },
methods: { methods: {
// - // -
@ -558,10 +554,10 @@ export default {
// -form/-api // -form/-api
handleForm(type) { handleForm(type) {
if (type === 'add') { if (type === 'add') {
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('您还未勾选需要操作的条目,请先确认!')
@ -570,41 +566,15 @@ export default {
this.$message('编辑操作只可勾选唯一目标条目,请先确认!') this.$message('编辑操作只可勾选唯一目标条目,请先确认!')
return false return false
} }
this.formVisible = true
this.formTitle = '编辑' + this.collectTitle this.formTitle = '编辑' + this.collectTitle
} }
// this.form.dictionaryConfigId = {} // this.form.dictionaryConfigId = {}
// this.formPreviewData = [] // this.formPreviewData = []
// //
this.getFormInfo(type)
},
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 {
//
this.collectLevel = 2
}
break
case 4:
//
this.collectLevel = 3
break
case 6:
//
this.collectLevel = 4
break
}
this.formVisible = true
this.$nextTick(() => {
this.getFormInfo(type)
})
}, },
getFormInfo(type) { getFormInfo(type) {
if (type === 'edit') { if (type === 'edit') {
@ -632,8 +602,8 @@ export default {
} }
FetchInitCategoryInputFieldByPid(params).then(data => { FetchInitCategoryInputFieldByPid(params).then(data => {
this.formPreviewData = data this.formPreviewData = data
this.isDesFormType = 'arcives'
this.$nextTick(() => { this.$nextTick(() => {
this.isDesFormType = 'arcives'
this.$refs.previewForm.archivesType = 'add' this.$refs.previewForm.archivesType = 'add'
this.$refs.previewForm.FetchNoFormatField(this.selectedCategory.id) this.$refs.previewForm.FetchNoFormatField(this.selectedCategory.id)
}) })
@ -642,7 +612,7 @@ export default {
}, },
// form - submit // form - submit
handlerArchivesSubmit() { handlerArchivesSubmit() {
this.$refs.previewForm.submitForm('addOrUpdateForm', this.selectedCategory.id)
this.$refs.previewForm.submitForm('addOrUpdateForm', this.selectedCategory.id,)
}, },
// - // -
handleClose(done) { handleClose(done) {
@ -677,6 +647,7 @@ export default {
'categoryLevel': this.collectLevel, 'categoryLevel': this.collectLevel,
'archivesIds': archivesIds 'archivesIds': archivesIds
} }
console.log(params)
collectDel(params).then(() => { collectDel(params).then(() => {
this.crud.notify('删除成功', CRUD.NOTIFICATION_TYPE.SUCCESS) this.crud.notify('删除成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.deleteVisible = false this.deleteVisible = false
@ -689,7 +660,29 @@ export default {
}, },
// - // -
handleMoveConfirm() { handleMoveConfirm() {
this.moveVisible = false
const archivesIds = []
this.selections.forEach(val => {
archivesIds.push(val.id)
})
const params = {
'categoryId': this.selectedCategory.id,
'categoryLevel': this.collectLevel,
'archivesIds': archivesIds,
'parentsId': this.parentsData.parentsAnjuanId
}
console.log(params)
FetchRemoveArchivesSingle(params).then((res) => {
console.log(res)
if (res.code !== 500) {
this.crud.notify('移出成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.handleSearch(this.collectLevel)
} else {
this.crud.notify('移出失败', CRUD.NOTIFICATION_TYPE.SUCCESS)
}
this.moveVisible = false
}).catch(err => {
console.log(err)
})
}, },
// //
fileUpload(uploadType) { fileUpload(uploadType) {
@ -849,7 +842,6 @@ export default {
} }
this.$refs.fourTestRef.fourTestVisible = true this.$refs.fourTestRef.fourTestVisible = true
this.$refs.fourTestRef.tableData = this.selections this.$refs.fourTestRef.tableData = this.selections
console.log(this.selections)
}, },
// //
handleCatalogDownload() { handleCatalogDownload() {
@ -907,13 +899,17 @@ export default {
handleCompletelyDelete() { handleCompletelyDelete() {
this.completelyDeleteVisible = false this.completelyDeleteVisible = false
}, },
closeDialog() {
closeDialog(data) {
this.formVisible = false this.formVisible = false
this.$parent.$parent.getTableDisplayFieldsLoading = true
setTimeout(() => {
this.getViewTableList(this.collectLevel, 'search', data)
})
console.log('this', this)
} }
} }
} }
</script> </script>
<style lang='scss' scoped> <style lang='scss' scoped>
</style> </style>

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

@ -5,7 +5,7 @@
<div class="collect-table"> <div class="collect-table">
<el-table <el-table
ref="table" ref="table"
v-loading="crud.loading || getTableDisplayFieldsLoading"
v-loading="getTableDisplayFieldsLoading"
class="archives-table" class="archives-table"
:data="projectData" :data="projectData"
highlight-current-row highlight-current-row
@ -60,8 +60,6 @@ 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'
export default { export default {
name: 'Project', name: 'Project',
components: { CollectHeader, ArchivesInfo }, components: { CollectHeader, ArchivesInfo },
@ -92,7 +90,9 @@ export default {
categoryId: 'B073E8430B85B4821E7360', categoryId: 'B073E8430B85B4821E7360',
arcId: '2946C34412182B73FBC287', arcId: '2946C34412182B73FBC287',
activeIndex: '1', activeIndex: '1',
selections: []
selections: [],
yearData: [],
parentId: null
} }
}, },
watch: { watch: {
@ -103,18 +103,19 @@ export default {
} }
}, },
created() { created() {
// this.tableDisplayFields = tableData.data
// this.projectData = jsonData.data.list.content
}, },
mounted() { mounted() {
}, },
methods: { methods: {
getCommonData(type) {
this.getViewTable(type)
getCommonData(type, parentId) {
this.getViewTable(type, parentId)
}, },
openAnjuan(data) {
sendYearDataToParent() {
this.$emit('myYearEvent', this.yearData)
},
openAnjuan(data, parentId) {
// this.$emit('openAnjuan', '') // this.$emit('openAnjuan', '')
this.$emit('openAnjuan', data)
this.$emit('openAnjuan', data, parentId)
}, },
rowKey(row) { rowKey(row) {
return row.id return row.id
@ -153,13 +154,13 @@ export default {
clearTimeout(this.timer) clearTimeout(this.timer)
} }
this.timer = setTimeout(() => { this.timer = setTimeout(() => {
this.openAnjuan('所属项目:' + row.archive_no)
this.parentId = row.id
this.openAnjuan('所属项目:' + row.project_no, this.parentId)
}, 300) }, 300)
this.selections = this.crud.selections this.selections = this.crud.selections
}, },
// //
handleCurrentChange(selection, row) { handleCurrentChange(selection, row) {
console.log('触发单选', row)
this.selections = selection this.selections = selection
}, },
handleSizeChange(size) { handleSizeChange(size) {

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

@ -132,6 +132,7 @@ export default {
name: 'PreviewForm', name: 'PreviewForm',
components: { draggable, Treeselect }, components: { draggable, Treeselect },
mixins: [crud()], mixins: [crud()],
inject: ['parentsData'],
props: { props: {
isDisabled: { isDisabled: {
type: Boolean, type: Boolean,
@ -157,10 +158,6 @@ export default {
type: String, type: String,
default: '' default: ''
}, },
parentsId: {
type: String,
default: ''
},
isHasCode: { isHasCode: {
type: Boolean, type: Boolean,
required: true required: true
@ -176,8 +173,13 @@ export default {
collectLevel: { collectLevel: {
type: Number, type: Number,
default: 1 default: 1
},
isTitleType: {
type: Number,
default: 2
} }
}, },
data() { data() {
return { return {
fileOriginal: null, fileOriginal: null,
@ -196,7 +198,6 @@ export default {
currentFieldName: null, // popover fieldName currentFieldName: null, // popover fieldName
treeCurrentFiled: null, treeCurrentFiled: null,
categoryId: null, categoryId: null,
setParentsId: null,
result: null, result: null,
autoMatic: null, autoMatic: null,
// isType: 'category', // isType: 'category',
@ -211,7 +212,8 @@ export default {
fileJsonString: null, fileJsonString: null,
mergeFileArcIds: null, mergeFileArcIds: null,
mergeFileCategory: null, mergeFileCategory: null,
archivesType: null
archivesType: null,
setParentsId: null
} }
}, },
computed: { computed: {
@ -226,10 +228,16 @@ export default {
}, },
arcId: function(newValue, oldValue) { arcId: function(newValue, oldValue) {
}, },
parentsId: function(newValue, oldValue) {
},
isDesFormType: function(newValue, oldValue) { isDesFormType: function(newValue, oldValue) {
}, },
parentsId: {
handler(newValue, oldValue) {
console.log(newValue)
this.setParentsId = newValue
},
immediate: true,
deep: true
},
formPreviewData: function() { formPreviewData: function() {
this.editFormRow() this.editFormRow()
// //
@ -245,6 +253,7 @@ export default {
// if (this.isType !== 'arcives') { // if (this.isType !== 'arcives') {
// this.FetchNoFormatField(this.selectedCategory.id) // this.FetchNoFormatField(this.selectedCategory.id)
// } // }
console.log('parentsId-in', this.parentsData.parentsId)
}, },
methods: { methods: {
normalizer(node) { normalizer(node) {
@ -330,7 +339,7 @@ export default {
}, },
// //
handleAuto() { handleAuto() {
console.log('isTableType', this.isTableType)
// console.log('isTableType', this.isTableType)
let string = '' let string = ''
const getAutoFiledVal = [] const getAutoFiledVal = []
this.autoMatic.forEach(async val => { this.autoMatic.forEach(async val => {
@ -355,7 +364,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)
// 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
@ -416,7 +425,7 @@ export default {
}, },
// //
getAllSubset(item) { getAllSubset(item) {
console.log('item', item)
// console.log('item', item)
if (item.mateData === 1) { if (item.mateData === 1) {
this.getFondsDatas(item) this.getFondsDatas(item)
} else if (item.mateData === 2) { } else if (item.mateData === 2) {
@ -457,7 +466,7 @@ export default {
}) })
}, },
getClassifyTree(item) { getClassifyTree(item) {
console.log('666', this.selectedCategory)
// console.log('666', this.selectedCategory)
this.isTableType = 2 this.isTableType = 2
this.tableTitle = '分类列表' this.tableTitle = '分类列表'
let categoryId let categoryId
@ -543,7 +552,7 @@ export default {
if (this.isDesFormType !== 'prearchiveLibrary' && this.isDesFormType !== 'mergeFile') { if (this.isDesFormType !== 'prearchiveLibrary' && this.isDesFormType !== 'mergeFile') {
if (!item.isAutomatic) { if (!item.isAutomatic) {
console.log('this.autoMatic', this.autoMatic)
// console.log('this.autoMatic', this.autoMatic)
const index = this.autoMatic.findIndex(i => item.fieldName === i.fieldName) const index = this.autoMatic.findIndex(i => item.fieldName === i.fieldName)
if (index !== -1) { if (index !== -1) {
this.handleAuto() this.handleAuto()
@ -566,9 +575,9 @@ export default {
} else { } else {
this.addOrUpdateForm[this.treeCurrentFiled.fieldName] = val.dictionaryName this.addOrUpdateForm[this.treeCurrentFiled.fieldName] = val.dictionaryName
} }
console.log('this.treeCurrentFiled.fieldName', this.treeCurrentFiled.fieldName)
console.log('val', val)
console.log('val.dictionaryName', val.dictionaryName)
// console.log('this.treeCurrentFiled.fieldName', this.treeCurrentFiled.fieldName)
// console.log('val', val)
// console.log('val.dictionaryName', val.dictionaryName)
// this.treeName = val.dictionaryName // this.treeName = val.dictionaryName
// - - treeSelect // - - treeSelect
if (this.treeCurrentFiled.isRepeat) { if (this.treeCurrentFiled.isRepeat) {
@ -592,7 +601,7 @@ export default {
} }
if (this.isDesFormType !== 'prearchiveLibrary' && this.isDesFormType !== 'mergeFile') { if (this.isDesFormType !== 'prearchiveLibrary' && this.isDesFormType !== 'mergeFile') {
const index = this.autoMatic.findIndex(i => this.treeCurrentFiled.fieldName === i.fieldName) const index = this.autoMatic.findIndex(i => this.treeCurrentFiled.fieldName === i.fieldName)
console.log('index', index)
// console.log('index', index)
if (index !== -1) { if (index !== -1) {
this.handleAuto() this.handleAuto()
} }
@ -605,7 +614,7 @@ export default {
}, },
// popover - table // popover - table
handleSelectionChange(val) { handleSelectionChange(val) {
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].fondsNo this.addOrUpdateForm[this.currentFieldName] = val[0].fondsNo
@ -719,7 +728,7 @@ export default {
this.formPreviewData[newIndex] = index this.formPreviewData[newIndex] = index
} }
}, },
submitForm(formName, categoryId) {
submitForm(formName, categoryId, parentArc) {
// //
this.formPreviewData.map(item => { this.formPreviewData.map(item => {
if (item.isInputClass === 'date') { if (item.isInputClass === 'date') {
@ -728,16 +737,6 @@ export default {
} }
} }
}) })
if (this.selectedCategory.isType !== 4 || this.selectedCategory.isType !== 3) {
this.setParentsId = this.parentsId
} else {
const parent_id = this.selectedCategory.pid
if (parseInt(parent_id) === 0) {
this.setParentsId = null
} else {
this.setParentsId = parent_id
}
}
delete this.addOrUpdateForm.id delete this.addOrUpdateForm.id
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
@ -758,7 +757,7 @@ export default {
'jsonString': JSON.stringify(this.addOrUpdateForm), 'jsonString': JSON.stringify(this.addOrUpdateForm),
'fileJsonString': this.fileJsonString 'fileJsonString': this.fileJsonString
} }
console.log('params', params)
// console.log('params', params)
prearchEdit(params).then(res => { prearchEdit(params).then(res => {
if (res) { if (res) {
this.$message.success(res) this.$message.success(res)
@ -775,7 +774,7 @@ export default {
'categoryId': this.mergeFileCategory, 'categoryId': this.mergeFileCategory,
'jsonString': JSON.stringify(this.addOrUpdateForm) 'jsonString': JSON.stringify(this.addOrUpdateForm)
} }
console.log('params', params)
// console.log('params', params)
FetchMergeToFile(params).then(res => { FetchMergeToFile(params).then(res => {
if (res) { if (res) {
this.$message.success(res) this.$message.success(res)
@ -785,28 +784,50 @@ export default {
}) })
} else { } else {
// //
let parentsId = null
console.log('this.isTitleType', this.isTitleType)
// 2 3 / 4 6
if (this.isTitleType === 2) {
parentsId = null
} else if (this.isTitleType === 3) {
if (this.selectedCategory.arrangeType === 1) {
parentsId = null
} else {
parentsId = this.parentsData.parentsProjectId
}
} else if (this.isTitleType === 4) {
//
parentsId = this.parentsData.parentsAnjuanId
} else if (this.isTitleType === 6) {
//
parentsId = this.parentsData.parentsJuanneiId
}
console.log('hhhparentsId', parentsId)
const params = { const params = {
'archivesId': this.arcId, 'archivesId': this.arcId,
'categoryId': categoryId, 'categoryId': categoryId,
'parentsId': parentsId,
'categoryLevel': this.collectLevel, 'categoryLevel': this.collectLevel,
'jsonString': JSON.stringify(this.addOrUpdateForm) 'jsonString': JSON.stringify(this.addOrUpdateForm)
} }
console.log('submitparentsId', this.parentsData.parentsId)
console.log(this.addOrUpdateForm) console.log(this.addOrUpdateForm)
console.log(params) console.log(params)
if (this.archivesType === 'add') { if (this.archivesType === 'add') {
collectAdd(params).then(res => { collectAdd(params).then(res => {
if (res.code === 200) { if (res.code === 200) {
this.$message.success(res) this.$message.success(res)
this.$emit('close-dialog')
this.crud.refresh()
this.$emit('close-dialog', parentsId)
// this.crud.refresh()
// this.getCommonData(this.isTitleType, parentsId)
} }
}) })
} else { } else {
collectEdit(params).then(res => { collectEdit(params).then(res => {
if (res.code === 200) { if (res.code === 200) {
this.$message.success(res) this.$message.success(res)
this.$emit('close-dialog')
this.crud.refresh()
this.$emit('close-dialog', parentsId)
// this.crud.refresh()
} }
}) })
} }
@ -869,10 +890,10 @@ export default {
} }
const arrayUpload = [] const arrayUpload = []
arrayUpload.push(json) arrayUpload.push(json)
console.log(arrayUpload)
// console.log(arrayUpload)
this.fileOriginal = this.fileNames this.fileOriginal = this.fileNames
this.fileJsonString = JSON.stringify(arrayUpload) this.fileJsonString = JSON.stringify(arrayUpload)
console.log(this.fileJsonString)
// console.log(this.fileJsonString)
}, },
// base64 // base64
getBase64(file) { getBase64(file) {

Loading…
Cancel
Save