Browse Source

档案管理-query

master
xuhuajiao 3 years ago
parent
commit
bb4e8a9ce7
  1. 45
      src/views/archivesManage/archivesList/archivesAnjuan/index.vue
  2. 3
      src/views/archivesManage/archivesList/archivesJuannei/index.vue
  3. 8
      src/views/archivesManage/archivesList/archivesProject/index.vue
  4. 10
      src/views/archivesManage/archivesList/mixins/archives.js

45
src/views/archivesManage/archivesList/archivesAnjuan/index.vue

@ -235,10 +235,7 @@ export default {
return { return {
anjuanData: [], anjuanData: [],
anjuanQuery: {}, anjuanQuery: {},
queryOption: [
{ value: 'queryTitle', label: '题名' },
{ value: 'archiveNo', label: '档号' }
],
queryOption: [],
anjuanInputSelect: '', anjuanInputSelect: '',
isAnjuan: true, // -/ isAnjuan: true, // -/
lengingVisible: false // lengingVisible: false //
@ -251,6 +248,11 @@ export default {
}, },
watch: { watch: {
selectedCategory: function(newValue, oldValue) { selectedCategory: function(newValue, oldValue) {
this.query.queryTitle = ''
this.query.archiveNo = ''
this.query.archiveCtgNo = ''
this.query.responsibleby = ''
this.resetQuery()
}, },
tableDisplayFields(val) { tableDisplayFields(val) {
this.doLayout() this.doLayout()
@ -268,38 +270,51 @@ export default {
} }
}, },
created() { created() {
// select -
this.anjuanInputSelect = this.queryOption[0].value
this.resetQuery()
this.selections = [] this.selections = []
if (this.selectedCategory.isType === 5) {
this.queryOption.push({ value: 'responsibleby', label: '责任者' })
} else {
this.queryOption.push({ value: 'archiveCtgNo', label: '实体分类号' })
}
}, },
mounted() { mounted() {
}, },
methods: { methods: {
// /query
resetQuery() {
if (this.selectedCategory.isType === 5) {
this.queryOption = [
{ value: 'queryTitle', label: '题名' },
{ value: 'archiveNo', label: '档号' },
{ value: 'responsibleby', label: '责任者' }
]
} else {
this.queryOption = [
{ value: 'queryTitle', label: '题名' },
{ value: 'archiveNo', label: '档号' },
{ value: 'archiveCtgNo', label: '实体分类号' }
]
}
this.anjuanInputSelect = this.queryOption[0].value
},
// //
getTableDisplayFields(type) { getTableDisplayFields(type) {
this.getTableItemCommon(type) this.getTableItemCommon(type)
}, },
// list // list
getTableList(page) { getTableList(page) {
this.query.queryTitle = ''
this.query.archiveNo = ''
this.query.archiveCtgNo = ''
this.query.responsibleby = ''
switch (this.anjuanInputSelect) { switch (this.anjuanInputSelect) {
case 'queryTitle': // case 'queryTitle': //
this.query.queryTitle = this.anjuanQuery[this.anjuanInputSelect] this.query.queryTitle = this.anjuanQuery[this.anjuanInputSelect]
this.query.archiveNo = ''
break break
case 'archiveNo': // case 'archiveNo': //
this.query.archiveNo = this.anjuanQuery[this.anjuanInputSelect] this.query.archiveNo = this.anjuanQuery[this.anjuanInputSelect]
this.query.queryTitle = ''
break break
case 'archiveCtgNo': // case 'archiveCtgNo': //
this.query.archiveCtgNo = this.anjuanQuery[this.juanneiInputSelect]
this.query.archiveCtgNo = this.anjuanQuery[this.anjuanInputSelect]
break break
case 'responsibleby': // case 'responsibleby': //
this.query.responsibleby = this.anjuanQuery[this.juanneiInputSelect]
this.query.responsibleby = this.anjuanQuery[this.anjuanInputSelect]
break break
} }
this.getListCommon('anjuanData', page, 1) this.getListCommon('anjuanData', page, 1)

3
src/views/archivesManage/archivesList/archivesJuannei/index.vue

@ -224,6 +224,9 @@ export default {
}, },
// list // list
getTableList(page) { getTableList(page) {
this.query.queryTitle = ''
this.query.archiveNo = ''
this.query.responsibleby = ''
switch (this.juanneiInputSelect) { switch (this.juanneiInputSelect) {
case 'queryTitle': // case 'queryTitle': //
this.query.queryTitle = this.juanneiQuery[this.juanneiInputSelect] this.query.queryTitle = this.juanneiQuery[this.juanneiInputSelect]

8
src/views/archivesManage/archivesList/archivesProject/index.vue

@ -140,7 +140,7 @@ export default {
projectQuery: {}, projectQuery: {},
queryOption: [ queryOption: [
{ value: 'queryTitle', label: '题名' }, { value: 'queryTitle', label: '题名' },
{ value: 'recordNo', label: '项目代号' }
{ value: 'itemNo', label: '项目代号' }
], ],
projectInputSelect: '', projectInputSelect: '',
isProject: true // -/ isProject: true // -/
@ -172,12 +172,14 @@ export default {
}, },
// table - list // table - list
getTableList(page) { getTableList(page) {
this.query.queryTitle = ''
this.query.itemNo = ''
switch (this.projectInputSelect) { switch (this.projectInputSelect) {
case 'queryTitle': // case 'queryTitle': //
this.query.queryTitle = this.projectQuery[this.projectInputSelect] this.query.queryTitle = this.projectQuery[this.projectInputSelect]
break break
case 'record_no': // -
this.query.recordNo = this.projectQuery[this.projectInputSelect]
case 'itemNo': // -
this.query.itemNo = this.projectQuery[this.projectInputSelect]
break break
} }
this.getListCommon('projectData', page, 0) this.getListCommon('projectData', page, 0)

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

@ -16,14 +16,6 @@ export const archivesCrud = {
size: 10, size: 10,
total: 0 total: 0
}, },
query: {
'queryType': null,
'queryTitle': null,
'recordNo': null,
'archiveCtgNo': null,
'archiveNo': null,
'responsibleby': null
},
stateOptions: [ // 搜索 - 状态选择 stateOptions: [ // 搜索 - 状态选择
{ key: '1', label: '全部' }, { key: '1', label: '全部' },
{ key: '2', label: '未装' }, { key: '2', label: '未装' },
@ -143,7 +135,7 @@ export const archivesCrud = {
'sort': this.arrySort, 'sort': this.arrySort,
'queryType': this.query.queryType, 'queryType': this.query.queryType,
'queryTitle': this.query.queryTitle, 'queryTitle': this.query.queryTitle,
'recordNo': this.query.recordNo,
'itemNo': this.query.itemNo,
'archiveCtgNo': this.query.archiveCtgNo, 'archiveCtgNo': this.query.archiveCtgNo,
'responsibleby': this.query.responsibleby, 'responsibleby': this.query.responsibleby,
'archiveNo': this.query.archiveNo, 'archiveNo': this.query.archiveNo,

Loading…
Cancel
Save