Browse Source

档案管理bug修复

master
xuhuajiao 3 years ago
parent
commit
39da013769
  1. 28
      src/views/archivesManage/archivesList/index.vue
  2. 3
      src/views/archivesManage/archivesList/mixins/archives.js
  3. 2
      src/views/components/echarts/lendAcross.vue

28
src/views/archivesManage/archivesList/index.vue

@ -39,7 +39,7 @@
/> />
<!-- 案卷 --> <!-- 案卷 -->
<archivesAnjuan <archivesAnjuan
v-if="selectedCategory.isType === 2 || selectedCategory.isType === 3 || selectedCategory.isType === 5"
v-if="( selectedCategory.isType === 2 && selectedCategory.children.length !==0 ) || selectedCategory.isType === 3 || selectedCategory.isType === 5"
ref="anjuan" ref="anjuan"
:selected-category="selectedCategory" :selected-category="selectedCategory"
:is-project="isProject" :is-project="isProject"
@ -52,7 +52,7 @@
/> />
<!-- 卷内 --> <!-- 卷内 -->
<archivesJuannei <archivesJuannei
v-if="selectedCategory.isType === 2 || selectedCategory.isType === 3 || selectedCategory.isType === 4"
v-if="( selectedCategory.isType === 2 && selectedCategory.children.length !==0 && this.selectedCategory.children[0].children.length !==0 ) || ( selectedCategory.isType === 3 && selectedCategory.children.length !==0 ) || selectedCategory.isType === 4"
ref="file" ref="file"
:is-anjuan="isAnjuan" :is-anjuan="isAnjuan"
:anjuan-selection="anjuanSelection" :anjuan-selection="anjuanSelection"
@ -251,24 +251,30 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
if (this.$refs.anjuan) { if (this.$refs.anjuan) {
this.$refs.anjuan.anjuanData = [] this.$refs.anjuan.anjuanData = []
if (this.$refs.file) {
this.$refs.file.junneiData = [] this.$refs.file.junneiData = []
} }
}
}) })
} else if (selectData && selectData.length === 1) { } else if (selectData && selectData.length === 1) {
this.projectSelection = selectData[0] this.projectSelection = selectData[0]
this.$nextTick(() => { this.$nextTick(() => {
if (this.$refs.anjuan) { if (this.$refs.anjuan) {
this.$refs.anjuan.getTableList() this.$refs.anjuan.getTableList()
if (this.$refs.file) {
this.$refs.file.junneiData = [] this.$refs.file.junneiData = []
} }
}
}) })
} else { } else {
this.projectSelection = data this.projectSelection = data
this.$nextTick(() => { this.$nextTick(() => {
if (this.$refs.anjuan) { if (this.$refs.anjuan) {
this.$refs.anjuan.getTableList() this.$refs.anjuan.getTableList()
if (this.$refs.file) {
this.$refs.file.junneiData = [] this.$refs.file.junneiData = []
} }
}
}) })
} }
}, },
@ -380,13 +386,21 @@ export default {
handleTableList() { handleTableList() {
if (this.selectedCategory.isType === 2) { if (this.selectedCategory.isType === 2) {
this.$nextTick(() => { this.$nextTick(() => {
if (this.$refs.anjuan) {
this.$refs.anjuan.anjuanData = [] this.$refs.anjuan.anjuanData = []
}
if (this.$refs.file) {
this.$refs.file.junneiData = [] this.$refs.file.junneiData = []
}
this.$refs.project.getTableDisplayFields(0) this.$refs.project.getTableDisplayFields(0)
if (this.selectedCategory.children.length !== 0) { if (this.selectedCategory.children.length !== 0) {
if (this.$refs.anjuan) {
this.$refs.anjuan.getTableDisplayFields(1) this.$refs.anjuan.getTableDisplayFields(1)
}
if (this.$refs.file) {
this.$refs.file.getTableDisplayFields(2) this.$refs.file.getTableDisplayFields(2)
} }
}
setTimeout(() => { setTimeout(() => {
this.$refs.project.getTableList() this.$refs.project.getTableList()
}, 200) }, 200)
@ -396,12 +410,18 @@ export default {
}) })
} else if (this.selectedCategory.isType === 3) { } else if (this.selectedCategory.isType === 3) {
this.$nextTick(() => { this.$nextTick(() => {
if (this.$refs.anjuan) {
this.$refs.anjuan.anjuanData = [] this.$refs.anjuan.anjuanData = []
}
if (this.$refs.file) {
this.$refs.file.junneiData = [] this.$refs.file.junneiData = []
}
this.$refs.anjuan.getTableDisplayFields(1) this.$refs.anjuan.getTableDisplayFields(1)
if (this.selectedCategory.children.length !== 0) { if (this.selectedCategory.children.length !== 0) {
if (this.$refs.file) {
this.$refs.file.getTableDisplayFields(2) this.$refs.file.getTableDisplayFields(2)
} }
}
setTimeout(() => { setTimeout(() => {
this.$refs.anjuan.getTableList() this.$refs.anjuan.getTableList()
}, 200) }, 200)
@ -411,7 +431,9 @@ export default {
}) })
} else if (this.selectedCategory.isType === 4) { } else if (this.selectedCategory.isType === 4) {
this.$nextTick(() => { this.$nextTick(() => {
if (this.$refs.file) {
this.$refs.file.junneiData = [] this.$refs.file.junneiData = []
}
this.$refs.file.getTableDisplayFields(2) this.$refs.file.getTableDisplayFields(2)
setTimeout(() => { setTimeout(() => {
this.$refs.file.getTableList() this.$refs.file.getTableList()
@ -422,7 +444,9 @@ export default {
}) })
} else if (this.selectedCategory.isType === 5) { } else if (this.selectedCategory.isType === 5) {
this.$nextTick(() => { this.$nextTick(() => {
if (this.$refs.anjuan) {
this.$refs.anjuan.anjuanData = [] this.$refs.anjuan.anjuanData = []
}
this.$refs.anjuan.getTableDisplayFields(1) this.$refs.anjuan.getTableDisplayFields(1)
setTimeout(() => { setTimeout(() => {
this.$refs.anjuan.getTableList() this.$refs.anjuan.getTableList()

3
src/views/archivesManage/archivesList/mixins/archives.js

@ -91,6 +91,7 @@ export const archivesCrud = {
this.categoryId = this.selectedCategory.id this.categoryId = this.selectedCategory.id
} }
} }
this.getTableDisplayFieldsLoading = true this.getTableDisplayFieldsLoading = true
this.selections = [] this.selections = []
FetchTableDisplayFields({ categoryId: this.categoryId }).then(data => { FetchTableDisplayFields({ categoryId: this.categoryId }).then(data => {
@ -122,6 +123,7 @@ export const archivesCrud = {
this.parentsId = null this.parentsId = null
} }
} }
if (this.categoryId !== null) { // 防止项目下无案卷门类情况
this.selections = [] this.selections = []
this.page.page = isNaN(page - 1) ? 0 : page - 1 this.page.page = isNaN(page - 1) ? 0 : page - 1
this.formVisible = false this.formVisible = false
@ -191,6 +193,7 @@ export const archivesCrud = {
} }
} }
}) })
}
}, },
// 著录界面-form/详情-api // 著录界面-form/详情-api
handleForm(type, title) { handleForm(type, title) {

2
src/views/components/echarts/lendAcross.vue

@ -111,14 +111,12 @@ export default {
// return colorList[params.dataIndex] // return colorList[params.dataIndex]
// } // }
color: function(params) { color: function(params) {
console.log(params)
var colorList = [ var colorList = [
['#5FA2E2', '#1C54EE'], ['#5FA2E2', '#1C54EE'],
['#84DFC0', '#0D9D81'], ['#84DFC0', '#0D9D81'],
['#FBCE9B', '#FF801E'], ['#FBCE9B', '#FF801E'],
['#FF7A7D', '#FF3438'] ['#FF7A7D', '#FF3438']
] ]
var colorItem = colorList[params.dataIndex] var colorItem = colorList[params.dataIndex]
return new echarts.graphic.LinearGradient(0, 0, 1, 0, [{ return new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
offset: 0, offset: 0,

Loading…
Cancel
Save