Browse Source

预归档库/需求修改

master
xuhuajiao 1 year ago
parent
commit
87106a877d
  1. 6
      src/views/archivesConfig/dict/dictDetail.vue
  2. 20
      src/views/components/category/PreviewForm.vue
  3. 4
      src/views/prearchiveLibrary/index.vue
  4. 69
      src/views/prearchiveLibrary/module/batchFile.vue
  5. 2
      src/views/system/dept/index.vue
  6. 2
      src/views/system/fileLibraryManage/fieldManage/index.vue
  7. 2
      src/views/system/user/index.vue

6
src/views/archivesConfig/dict/dictDetail.vue

@ -2,12 +2,12 @@
<div>
<!--工具栏-->
<div class="head-container" style="padding:0 0 20px 0">
<crudOperation :permission="permission">
<crudOperation>
<template v-slot:left>
<el-button v-permission="permission.add" size="mini" type="primary" icon="el-icon-plus" :disabled="!activeAddBtn" @click="crud.toAdd">新增</el-button>
<el-button size="mini" type="primary" icon="el-icon-plus" :disabled="!activeAddBtn" @click="crud.toAdd">新增</el-button>
</template>
<template v-slot:right>
<el-button v-permission="permission.del" icon="el-icon-delete" size="mini" :loading="crud.delAllLoading" :disabled="crud.selections.length === 0" @click="toDelete(crud.selections)">删除</el-button>
<el-button icon="el-icon-delete" size="mini" :loading="crud.delAllLoading" :disabled="crud.selections.length === 0" @click="toDelete(crud.selections)">删除</el-button>
</template>
</crudOperation>
</div>

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

@ -214,7 +214,7 @@ export default {
delete node.childMenus
}
return {
id: node.dictionaryId,
id: node.dictionaryName,
label: node.dictionaryName,
children: node.childMenus
}
@ -260,13 +260,13 @@ export default {
return name
}
},
getNode(list, dicName) {
getNode(list, dictionaryName) {
let data;
(list || []).map(item => {
if (item.dicName === dicName) {
if (item.dictionaryName === dictionaryName) {
data = [item]
} else {
const child = this.getNode(item.childMenus, dicName)
const child = this.getNode(item.childMenus, dictionaryName)
if (child) {
data = child
}
@ -468,8 +468,11 @@ export default {
},
// tree - select
selectTree(val) {
this.addOrUpdateForm[this.treeCurrentFiled.fieldName] = val.dicName
// this.treeName = val.dicName
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)
// this.treeName = val.dictionaryName
// - - treeSelect
if (this.treeCurrentFiled.isRepeat) {
let params
@ -478,14 +481,14 @@ export default {
'categoryId': this.selectedCategory.id,
'archivesId': this.arcId,
'fieldName': this.treeCurrentFiled.fieldName,
'value': val.dicName
'value': val.dictionaryName
}
} else {
params = {
'documentId': this.selectedCategory.id,
'archivesId': null,
'fieldName': this.treeCurrentFiled.fieldName,
'value': val.dicName
'value': val.dictionaryName
}
}
this.handlerIsRepeat(params, this.treeCurrentFiled)
@ -619,6 +622,7 @@ export default {
'jsonString': JSON.stringify(this.addOrUpdateForm),
'fileJsonString': this.fileJsonString
}
console.log('params', params)
prearchEdit(params).then(res => {
if (res) {
this.$message.success(res)

4
src/views/prearchiveLibrary/index.vue

@ -68,7 +68,7 @@
<pagination v-if="crud.data.length !== 0" />
</div>
<!-- 批量成件 -->
<batchFile ref="batchForm" :selected-document="selectedDocument" />
<batchFile ref="batchForm" :selected-document="selectedDocument" @refresh="crud.refresh" />
<!-- 移动 -->
<moveFile ref="moveForm" />
<!-- 合并成件 -->
@ -308,11 +308,13 @@ export default {
'ids': ids
}
exportFile(this.baseApi + '/api/re-document/download?' + qs.stringify(params, { indices: false }))
this.crud.downloadLoading = false
}).catch(() => {
})
},
handleBatch() {
this.$refs.batchForm.batchVisible = true
this.$refs.batchForm.selectionsArc = this.crud.selections
},
handelMerge() {
this.mergeVisible = true

69
src/views/prearchiveLibrary/module/batchFile.vue

@ -97,7 +97,7 @@
</div>
</div>
</div>
<div v-if="allFieldData.length === 0" class="empty-data" />
<div v-if="allFieldData.length === 0 && allCorrField.length === 0" class="empty-data" />
</div>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="batchVisible = false">取消</el-button>
@ -116,7 +116,7 @@ import { FetchInitDocumentFieldByPid } from '@/api/system/fileLibrary/fileLibrar
import { FetchCategoryMenu, FetchInitCategoryFieldByPid } from '@/api/system/category/category'
import { FetchArchivesScopeByCategoryId } from '@/api/system/archivesScope'
import { FetchCheckRepeat } from '@/api/system/fieldMate'
// import { FetchBatchToFile } from '@/api/prearchiveLibrary/prearchiveLibrary'
import { FetchBatchToFile } from '@/api/prearchiveLibrary/prearchiveLibrary'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
// import { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
@ -135,6 +135,7 @@ export default {
},
data() {
return {
selectionsArc: [],
batchVisible: false,
rulesOptions: [],
categoryTree: [],
@ -251,7 +252,7 @@ export default {
}
})
res.forEach((item, index) => {
this.selectStatus.push({ mode: true, fiedType: 2, value: '', field: item, isInput: item.isInput })
this.selectStatus.push({ mode: true, fiedType: 1, value: '', field: item, isInput: item.isInput })
})
this.rightLoading = false
})
@ -297,7 +298,6 @@ export default {
this.$nextTick(() => {
if (this.form.categoryId) {
this.$refs.scopeModule.$refs.tree2.setCurrentKey(this.form.categoryId)
console.log(this.batchCategory)
this.$refs.scopeModule.handleNodeClick2(this.batchCategory)
}
})
@ -345,7 +345,7 @@ export default {
// "" / ""
selectChangeFiedType(index) {
this.options.forEach((item) => {
if (this.selectStatus[index].fiedType === 1) {
if (this.selectStatus[index].fiedType === 2) {
this.selectStatus.splice(index, 1, { mode: false, fiedType: this.selectStatus[index].fiedType, value: this.allFieldData[index].categoryFieldId.isDefaultValue, field: item, isInput: item.isInput })
} else {
this.selectStatus.splice(index, 1, { mode: true, fiedType: this.selectStatus[index].fiedType, value: '', field: item, isInput: item.isInput })
@ -390,33 +390,50 @@ export default {
// }, [])
// }
// const indices = getIndicesByMode(false)
console.log(this.selectStatus)
const filteredDocumentList = this.selectStatus.map(item => {
if (item.hasOwnProperty('field')) {
const fieldValue = item['field'] //
return {
...fieldValue, // field
getType: item.fiedType // fieldgetType
}
} else {
return item
// const arrAL = this.selectStatus.map(item => {
// if (item.hasOwnProperty('field')) {
// return {
// documentValue: item['field'].fieldName,
// getType: item.fiedType // fieldgetType
// }
// } else {
// return item
// }
// })
// console.log(arrAL)
const dtos = this.allFieldData.map((item, index) => {
return {
'categoryValue': item.categoryFieldId.fieldName,
'documentValue': this.selectStatus[index].fiedType === 2 ? item.categoryFieldId.isDefaultValue : this.selectStatus[index].field.fieldName,
'getType': this.selectStatus[index].fiedType,
'isRequired': item.categoryFieldId.isRequired
}
})
console.log('filteredDocumentList', filteredDocumentList)
console.log(this.allFieldData)
const filteredCategoryList = this.allFieldData.map(item => {
const archivesIds = this.selectionsArc.map(item => {
return item.id
})
console.log(filteredCategoryList)
const params = {
'archivesIds': [],
'categoryId': this.selectedDocument.id,
'documentId': this.form.categoryId,
'dtos': []
'archivesIds': archivesIds,
'documentId': this.selectedDocument.id,
'categoryId': this.form.categoryId,
'dtos': dtos
}
console.log(params)
// FetchBatchToFile().then((res) => {
// })
FetchBatchToFile(params).then((res) => {
console.log(res)
if (res === 'SUCCESS') {
this.$emit('refresh')
this.batchVisible = false
Object.assign(this.form, {
ruleName: null,
scope: null,
documentId: null,
categoryId: null
})
this.selectedCategoryName = null
this.allFieldData = []
}
})
},
normalizer(node) {
if (node.children && !node.children.length) {

2
src/views/system/dept/index.vue

@ -160,7 +160,7 @@ import { exportFile } from '@/utils/index'
import qs from 'qs'
import { mapGetters } from 'vuex'
const defaultForm = { id: null, fondsId: null, deptsCode: '', deptsName: '', deptsAbbr: '', isTop: '1', deptsParentsId: null, deptsOrders: 999, deptsStatus: null }
const defaultForm = { id: null, fondsId: null, deptsCode: '', deptsName: '', deptsAbbr: '', isTop: '1', deptsParentsId: null, deptsOrders: 999, deptsStatus: 1 }
export default {
name: 'Dept',
// rrOperation,

2
src/views/system/fileLibraryManage/fieldManage/index.vue

@ -112,7 +112,7 @@ export default {
permission: {
add: ['admin', 'fieldManage:add'],
edit: ['admin', 'fieldManage:edit'],
del: ['admin', 'fieldManage:edit']
del: ['admin', 'fieldManage:del']
},
deleteVisible: false,
deleteData: {},

2
src/views/system/user/index.vue

@ -190,7 +190,7 @@ import { exportFile } from '@/utils/index'
import qs from 'qs'
let userRoles = []
let userPosts = []
const defaultForm = { id: null, username: null, nickName: null, gender: '男', email: null, enabled: null, fonds: { id: null }, roles: [], posts: [], dept: { id: null }, phone: null }
const defaultForm = { id: null, username: null, nickName: null, gender: '男', email: null, enabled: 1, fonds: { id: null }, roles: [], posts: [], dept: { id: null }, phone: null, isAdmin: false }
export default {
name: 'User',
components: { Treeselect, crudOperation, pagination, DateRangePicker },

Loading…
Cancel
Save