Browse Source

项目分类筛选问题

master
xuhuajiao 1 year ago
parent
commit
32ecf1e963
  1. 10
      src/api/collect/collect.js
  2. 2
      src/views/collectReorganizi/collectionLibrary/anjuan/tableList.vue
  3. 2
      src/views/collectReorganizi/collectionLibrary/juannei/index.vue
  4. 13
      src/views/collectReorganizi/collectionLibrary/mixins/index.js
  5. 15
      src/views/collectReorganizi/collectionLibrary/module/archivesInfo/index.vue
  6. 237
      src/views/collectReorganizi/collectionLibrary/module/blukEditing/index.vue
  7. 7
      src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue
  8. 2
      src/views/collectReorganizi/collectionLibrary/project/index.vue
  9. 93
      src/views/components/category/PreviewForm.vue
  10. 6
      src/views/prearchiveLibrary/module/batchFile.vue

10
src/api/collect/collect.js

@ -54,6 +54,15 @@ export function FetchDetailsById(params) {
}) })
} }
// 收集库元数据
export function FetchArchivesMetadata(params) {
return request({
url: 'api/collect/archivesMetadata',
method: 'get',
params
})
}
// 根据门类父id获取电子原文列表 // 根据门类父id获取电子原文列表
export function FetchInitFileCategoryView(params) { export function FetchInitFileCategoryView(params) {
return request({ return request({
@ -106,6 +115,7 @@ export default {
FetchInitCategoryViewTable, FetchInitCategoryViewTable,
FetchInitCategoryView, FetchInitCategoryView,
FetchDetailsById, FetchDetailsById,
FetchArchivesMetadata,
FetchInitFileCategoryView, FetchInitFileCategoryView,
FetchRemoveArchivesSingle, FetchRemoveArchivesSingle,
FetchAddArchivesFile, FetchAddArchivesFile,

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

@ -19,7 +19,7 @@
> >
<el-table-column type="selection" :reserve-selection="true" width="55" align="center" /> <el-table-column type="selection" :reserve-selection="true" width="55" align="center" />
<el-table-column type="index" label="序号" width="55" align="center" /> <el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column :label="selectedCategory.arrangeType === 1 || (selectedCategory.arrangeType !==1 && activeIndex===1) ? '原文':'卷内'" prop="children_num" width="55" align="center" />
<el-table-column :label="selectedCategory.arrangeType === 1 || (selectedCategory.arrangeType !==1 && activeIndex===1) ? '原文':'卷内'" prop="child" width="55" align="center" />
<el-table-column v-for="field in tableDisplayFields" :key="field.id" :label="field.fieldCnName" :align="field.displayformatType" :width="field.displayLength" show-overflow-tooltip> <el-table-column v-for="field in tableDisplayFields" :key="field.id" :label="field.fieldCnName" :align="field.displayformatType" :width="field.displayLength" show-overflow-tooltip>
<template slot="header"> <template slot="header">
<el-tooltip <el-tooltip

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

@ -27,7 +27,7 @@
> >
<el-table-column type="selection" width="55" :reserve-selection="true" align="center" /> <el-table-column type="selection" width="55" :reserve-selection="true" align="center" />
<el-table-column type="index" label="序号" width="55" align="center" /> <el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column label="原文" prop="children_num" width="55" align="center" />
<el-table-column label="原文" prop="child" width="55" align="center" />
<el-table-column v-for="field in tableDisplayFields" :key="field.id" :label="field.fieldCnName" :align="field.displayformatType" :width="field.displayLength" show-overflow-tooltip> <el-table-column v-for="field in tableDisplayFields" :key="field.id" :label="field.fieldCnName" :align="field.displayformatType" :width="field.displayLength" show-overflow-tooltip>
<template slot="header"> <template slot="header">
<el-tooltip <el-tooltip

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

@ -63,9 +63,18 @@ export const collectionLibraryCrud = {
this.parentsId = this.parentsData.parentsAnjuanId this.parentsId = this.parentsData.parentsAnjuanId
} else if (this.isTitleType === 6) { } else if (this.isTitleType === 6) {
// 原文 // 原文
this.$parent.$parent.getTableDisplayFieldsLoading = true
this.parentsId = this.parentsData.parentsJuanneiId
console.log('fff')
if (this.selectedCategory.arrangeType === 1) {
console.log('ggg')
this.parentsId = this.parentsData.parentsAnjuanId
this.$parent.getTableDisplayFieldsLoading = true
} else {
console.log('ddd')
this.$parent.$parent.getTableDisplayFieldsLoading = true
this.parentsId = this.parentsData.parentsJuanneiId
}
} }
setTimeout(() => { setTimeout(() => {
this.getViewTableList(categoryLevel, this.parentsId, 'search') this.getViewTableList(categoryLevel, this.parentsId, 'search')
}, 200) }, 200)

15
src/views/collectReorganizi/collectionLibrary/module/archivesInfo/index.vue

@ -36,8 +36,7 @@
<script> <script>
import { form } from '@crud/crud' import { form } from '@crud/crud'
import { FetchDetailsById } from '@/api/collect/collect'
// import { FetchArchivesMetadata } from '@/api/archivesManage/archivesList'
import { FetchDetailsById, FetchArchivesMetadata } from '@/api/collect/collect'
import UploadFile from '../uploadFile/index' import UploadFile from '../uploadFile/index'
export default { export default {
name: 'ArchivesInfo', name: 'ArchivesInfo',
@ -95,9 +94,15 @@ export default {
context: data.echo[field.fieldName] context: data.echo[field.fieldName]
})) }))
}) })
// FetchArchivesMetadata(params).then(data => {
// this.archivesDetailsMetadata = data
// })
const metaDataParams = {
'categoryId': this.selectedCategory.id,
'categoryLevel': collectLevel,
'archivesId': rowId
}
console.log('metaData', metaDataParams)
FetchArchivesMetadata(metaDataParams).then(data => {
this.archivesDetailsMetadata = data
})
}, },
setXml() { setXml() {
const xmlstr = this.archivesDetailsMetadata const xmlstr = this.archivesDetailsMetadata

237
src/views/collectReorganizi/collectionLibrary/module/blukEditing/index.vue

@ -1,6 +1,6 @@
<template> <template>
<!--批量修改--> <!--批量修改-->
<el-dialog class="fileUpload-dialog" title="批量修改" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="bulkEditingVisible">
<el-dialog class="fileUpload-dialog" title="批量修改" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="bulkEditingVisible" :before-close="handleCloseDialog">
<div class="setting-dialog"> <div class="setting-dialog">
<div class="bulk-editing-container"> <div class="bulk-editing-container">
<el-form ref="editForm" :model="editForm" :rules="editRules" label-width="100px"> <el-form ref="editForm" :model="editForm" :rules="editRules" label-width="100px">
@ -28,35 +28,65 @@
<el-input v-model="editForm.oldContext" style="width: 360px;" /> <el-input v-model="editForm.oldContext" style="width: 360px;" />
</el-form-item> </el-form-item>
<el-form-item label="更新内容" prop="updateContext"> <el-form-item label="更新内容" prop="updateContext">
<el-input v-if="editForm.updateField.mateData !== 3 && editForm.updateField.isInputClass !== 'date' && editForm.updateField.isInputClass !== 'number'" v-model="editForm.updateContext" style="width: 360px;" />
<el-select v-if="editForm.updateField.mateData === 3" v-model="editForm.updateContext" placeholder="请选择" style="width: 360px;">
<!-- <el-select v-if="editForm.updateField.mateData === 3" v-model="editForm.updateContext" placeholder="请选择" style="width: 360px;">
<el-option <el-option
v-for="item in dictionaryOptions" v-for="item in dictionaryOptions"
:key="item.dictionaryId" :key="item.dictionaryId"
:label="item.dictionaryName" :label="item.dictionaryName"
:value="item.dictionaryCode"
:value="item.dictionaryName"
/>
</el-select> -->
<treeselect
v-if="editForm.updateField.mateData === 3"
v-model="editForm.updateContext"
:options="dictionaryOptions"
style="width: 360px;"
flat
:multiple="false"
:normalizer="normalizerProject"
placeholder="请选择"
><div slot="value-label" slot-scope="{ node }">{{ getAutoNameUnknown(node.label) }}</div></treeselect>
<el-select v-else-if="editForm.updateField.mateData === 1" v-model="editForm.updateContext" placeholder="请选择" style="width: 360px;">
<el-option
v-for="item in fondsOptions"
:key="item.fondsNo"
:label="item.fondsName"
:value="item.fondsNo"
/> />
</el-select> </el-select>
<treeselect
v-else-if="editForm.updateField.mateData === 2"
v-model="editForm.updateContext"
:options="classifyOptions"
style="width: 360px;"
flat
:multiple="false"
:normalizer="normalizer"
placeholder="请选择"
><div slot="value-label" slot-scope="{ node }">{{ getAutoNameUnknown(node.label) }}</div></treeselect>
<el-date-picker <el-date-picker
v-if="editForm.updateField.isInputClass === 'date'"
v-else-if="editForm.updateField.isInputClass === 'date'"
v-model="editForm.updateContext" v-model="editForm.updateContext"
type="date" type="date"
placeholder="选择日期" placeholder="选择日期"
style="width: 360px;" style="width: 360px;"
/> />
<el-input-number <el-input-number
v-if="editForm.updateField.isInputClass === 'number'"
v-else-if="editForm.updateField.isInputClass === 'number'"
v-model.number="editForm.initialValue" v-model.number="editForm.initialValue"
:min="0" :min="0"
:max="999" :max="999"
controls-position="right" controls-position="right"
style="width: 360px;" style="width: 360px;"
/> />
<el-input v-else v-model="editForm.updateContext" style="width: 360px;" />
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="text" @click="bulkEditingVisible = false">取消</el-button>
<el-button type="text" @click="handleCloseDialog">取消</el-button>
<el-button type="primary" @click.native="onSubmitBlukEditing('editForm')">确定</el-button> <el-button type="primary" @click.native="onSubmitBlukEditing('editForm')">确定</el-button>
</div> </div>
</div> </div>
@ -65,12 +95,15 @@
<script> <script>
import { FetchInitCategoryInputFieldByPid } from '@/api/system/category/category' import { FetchInitCategoryInputFieldByPid } from '@/api/system/category/category'
import { FetchSonDictionaryList } from '@/api/system/dict'
import { FetchSonDictionaryList, FetchDictionaryTree } from '@/api/system/dict'
import { FetchFondsAll } from '@/api/system/fonds'
import { FetchArchivesClassTree } from '@/api/system/archivesClass'
import { FetchBatchUpdate } from '@/api/collect/collect' import { FetchBatchUpdate } from '@/api/collect/collect'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
export default { export default {
name: 'BlukEditing', name: 'BlukEditing',
components: { },
components: { Treeselect },
mixins: [], mixins: [],
props: { props: {
selectedCategory: { selectedCategory: {
@ -105,7 +138,9 @@ export default {
value: 1, value: 1,
label: '填充' label: '填充'
}], }],
dictionaryOptions: []
dictionaryOptions: [],
fondsOptions: [],
classifyOptions: []
} }
}, },
computed: { computed: {
@ -124,9 +159,9 @@ export default {
{ required: true } { required: true }
] ]
} }
if (this.editForm.updateField.mateData === 3) {
if (this.editForm.updateField.mateData !== null) {
this.$set(validateRule, 'updateContext', [ this.$set(validateRule, 'updateContext', [
{ required: true, message: '请选择更新内容得字典项', trigger: 'change' }
{ required: true, message: '请选择更新内容', trigger: 'change' }
]) ])
} else if (this.editForm.updateField.isInputClass === 'date') { } else if (this.editForm.updateField.isInputClass === 'date') {
this.$set(validateRule, 'updateContext', [ this.$set(validateRule, 'updateContext', [
@ -142,44 +177,43 @@ export default {
}, },
watch: { watch: {
'editForm.updateField'(newVal) { 'editForm.updateField'(newVal) {
console.log('item', newVal)
console.log('mateData', newVal.mateData)
console.log('isInputClass', newVal.isInputClass)
this.$refs.editForm.clearValidate()
this.editForm.updateContext = ''
this.editForm.updateType = 1
if (newVal.mateData === 3 || newVal.isInputClass === 'date') {
this.editTypeOptions = [{
value: 1,
label: '填充'
}]
} else if (newVal.isInputClass === 'number') {
this.editTypeOptions = [{
value: 1,
label: '填充'
},
{
value: 2,
label: '替换'
},
{
value: 3,
label: '增加'
},
{
value: 4,
label: '减少'
}]
} else {
this.editTypeOptions = [{
value: 1,
label: '填充'
},
{
value: 2,
label: '替换'
}]
}
this.$nextTick(() => {
this.$refs.editForm.clearValidate()
this.editForm.updateContext = ''
this.editForm.updateType = 1
if (newVal.mateData !== null || newVal.isInputClass === 'date') {
this.editTypeOptions = [{
value: 1,
label: '填充'
}]
} else if (newVal.isInputClass === 'number') {
this.editTypeOptions = [{
value: 1,
label: '填充'
},
{
value: 2,
label: '替换'
},
{
value: 3,
label: '增加'
},
{
value: 4,
label: '减少'
}]
} else {
this.editTypeOptions = [{
value: 1,
label: '填充'
},
{
value: 2,
label: '替换'
}]
}
})
} }
}, },
mounted() { mounted() {
@ -188,6 +222,15 @@ export default {
}) })
}, },
methods: { methods: {
// vue-treeSelectunknown
getAutoNameUnknown(name) {
if (name.lastIndexOf('unknown') > -1) {
// treeselectnameidid
return name.split('(')[0]
} else {
return name
}
},
getInitCategoryInputFieldByPid() { getInitCategoryInputFieldByPid() {
const params = { const params = {
'categoryId': this.selectedCategory.id, 'categoryId': this.selectedCategory.id,
@ -201,15 +244,96 @@ export default {
selectField(val) { selectField(val) {
console.log(val) console.log(val)
if (val.mateData === 3) { if (val.mateData === 3) {
this.getSonDictionaryList(val.dictionaryId.id)
if (this.selectedCategory.arrangeType === 3 && val.fieldName === 'project_class') {
this.getDictsList()
} else {
this.getSonDictionaryList(val.dictionaryId.id)
}
} else if (val.mateData === 1) {
this.getFondsDatas()
} else {
this.getInitArchivesClass()
} }
}, },
getSonDictionaryList(dictionaryId) { getSonDictionaryList(dictionaryId) {
FetchSonDictionaryList({ 'pid': dictionaryId }).then(res => { FetchSonDictionaryList({ 'pid': dictionaryId }).then(res => {
console.log(res)
this.dictionaryOptions = res this.dictionaryOptions = res
}) })
}, },
// -
getDictsList() {
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.collectLevel !== 1) {
this.dictionaryOptions = filteredItems
} else {
this.dictionaryOptions = 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.dictionaryName,
label: node.dictionaryName,
children: node.childDictionarys,
isDisabled: (this.collectLevel !== 1 && node.level && node.level !== 3) || (this.collectLevel === 1 && node.level === 1)
}
},
getFondsDatas() {
FetchFondsAll().then(res => {
this.fondsOptions = res
})
},
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
}
},
onSubmitBlukEditing(formName) { onSubmitBlukEditing(formName) {
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
@ -234,6 +358,13 @@ export default {
return false return false
} }
}) })
},
handleCloseDialog(done) {
//
this.$refs.editForm.resetFields()
this.bulkEditingVisible = false
//
// done()
} }
} }
} }

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

@ -333,6 +333,7 @@ import Print from './print/index'
import FourTest from './fourTest/index' import FourTest from './fourTest/index'
import QuickPaper from './quickPaper/index' import QuickPaper from './quickPaper/index'
// import { exportFile } from '@/utils/index' // import { exportFile } from '@/utils/index'
import { downloadFile } from '@/utils/index'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
export default { export default {
@ -929,6 +930,12 @@ export default {
this.$message('下载操作只可勾选唯一目标条目,请先确认!') this.$message('下载操作只可勾选唯一目标条目,请先确认!')
return false return false
} }
const url = this.baseApi + '/downloadFile' + this.selections[0].file_path
fetch(url).then(res => res.blob()).then(blob => {
downloadFile(blob, this.selections[0].file_name.split('.')[0], this.selections[0].file_type)
}).catch(() => {
this.$message.error('下载文件失败!')
})
}, },
// - // -
toRecover() { toRecover() {

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

@ -20,7 +20,7 @@
> >
<el-table-column type="selection" :reserve-selection="true" width="55" align="center" /> <el-table-column type="selection" :reserve-selection="true" width="55" align="center" />
<el-table-column type="index" label="序号" width="55" align="center" /> <el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column label="案卷" prop="children_num" width="55" align="center" />
<el-table-column label="案卷" prop="child" width="55" align="center" />
<el-table-column v-for="field in tableDisplayFields" :key="field.id" :label="field.fieldCnName" :align="field.displayformatType" :width="field.displayLength" show-overflow-tooltip> <el-table-column v-for="field in tableDisplayFields" :key="field.id" :label="field.fieldCnName" :align="field.displayformatType" :width="field.displayLength" show-overflow-tooltip>
<template slot="header"> <template slot="header">
<el-tooltip <el-tooltip

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

@ -13,6 +13,7 @@
:normalizer=" isTableType === 1 ? normalizerFonds : (isTableType === 2 ? normalizerClassify : normalizer)" :normalizer=" isTableType === 1 ? normalizerFonds : (isTableType === 2 ? normalizerClassify : normalizer)"
:clearable="false" :clearable="false"
placeholder="" placeholder=""
flat
:style="{ width: item.editLength+'px'}" :style="{ width: item.editLength+'px'}"
:disabled="isDisabled" :disabled="isDisabled"
:validate-event="!isDisabled" :validate-event="!isDisabled"
@ -75,8 +76,8 @@
<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">
<el-table ref="popoverTable" :data="popoverTableData" highlight-current-row row-key="dictionaryId" :tree-props="{children: 'childMenus', hasChildren: 'hasChildren'}" height="600" style="width: 100%;" @selection-change="handleSelectionChange" @row-click="clickRowHandler">
<el-table-column type="selection" width="55" />
<el-table ref="popoverTable" :data="popoverTableData" highlight-current-row row-key="dictionaryCode" :tree-props="{children: 'childDictionarys', hasChildren: 'hasChildren'}" height="600" style="width: 100%;" @selection-change="handleSelectionChange" @row-click="clickRowHandler">
<el-table-column :selectable="checkboxT" type="selection" width="55" />
<el-table-column prop="dictionaryName" label="字典名称" show-overflow-tooltip /> <el-table-column prop="dictionaryName" label="字典名称" show-overflow-tooltip />
<el-table-column prop="dictionaryCode" label="字典代码" /> <el-table-column prop="dictionaryCode" label="字典代码" />
<el-table-column prop="dictionaryRemarks" label="内容说明" show-overflow-tooltip /> <el-table-column prop="dictionaryRemarks" label="内容说明" show-overflow-tooltip />
@ -121,7 +122,7 @@ import draggable from 'vuedraggable'
import Treeselect from '@riophae/vue-treeselect' import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css' import '@riophae/vue-treeselect/dist/vue-treeselect.css'
// import { FetchFindAllSubsetById } from '@/api/archivesConfig/dictDetail' // import { FetchFindAllSubsetById } from '@/api/archivesConfig/dictDetail'
import { FetchSonDictionaryList } from '@/api/system/dict'
import { FetchSonDictionaryList, FetchDictionaryTree } from '@/api/system/dict'
import { FetchFondsAll } from '@/api/system/fonds' import { FetchFondsAll } from '@/api/system/fonds'
import { FetchArchivesClassTree, FetchSonArchivesClass } from '@/api/system/archivesClass' import { FetchArchivesClassTree, FetchSonArchivesClass } from '@/api/system/archivesClass'
import { parseTime, getCurrentTime } from '@/utils/index' import { parseTime, getCurrentTime } from '@/utils/index'
@ -256,14 +257,18 @@ export default {
console.log('parentsId-in', this.parentsData.parentsId) console.log('parentsId-in', this.parentsData.parentsId)
}, },
methods: { methods: {
checkboxT(row, rowIndex) {
return row.level ? row.level === 3 : true
},
normalizer(node) { normalizer(node) {
if (node.childMenus == null || node.childMenus === 'null') {
delete node.childMenus
if ((node.childDictionarys && !node.childDictionarys.length) || node.childDictionarys === null) {
delete node.childDictionarys
} }
return { return {
id: node.dictionaryName, id: node.dictionaryName,
label: node.dictionaryName, label: node.dictionaryName,
children: node.childMenus
children: node.childDictionarys,
isDisabled: node.level && node.level !== 3
} }
}, },
normalizerClassify(node) { normalizerClassify(node) {
@ -439,14 +444,21 @@ export default {
} }
this.isTableType = 3 this.isTableType = 3
this.tableTitle = '字典列表' this.tableTitle = '字典列表'
FetchSonDictionaryList(params).then(res => {
if (item.isInputClass === 'select') {
this.$set(item, 'options', res)
} else if (item.isInputClass === 'popover') {
this.popoverTableData = res
this.popoverVisible = true
}
})
console.log('this.selectedCategory.arrangeType', this.selectedCategory.arrangeType)
console.log('this.collectLevel', this.collectLevel)
console.log(item.dictionaryId)
if (this.selectedCategory.arrangeType === 3 && this.collectLevel === 2 && item.dictionaryId.dictionaryCode === 'project_class') {
this.getDictsList(item)
} else {
FetchSonDictionaryList(params).then(res => {
if (item.isInputClass === 'select') {
this.$set(item, 'options', res)
} else if (item.isInputClass === 'popover') {
this.popoverTableData = res
this.popoverVisible = true
}
})
}
} }
} }
}, },
@ -466,7 +478,6 @@ export default {
}) })
}, },
getClassifyTree(item) { getClassifyTree(item) {
// console.log('666', this.selectedCategory)
this.isTableType = 2 this.isTableType = 2
this.tableTitle = '分类列表' this.tableTitle = '分类列表'
let categoryId let categoryId
@ -552,7 +563,6 @@ 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)
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()
@ -600,17 +610,23 @@ export default {
this.handlerIsRepeat(params, this.treeCurrentFiled) this.handlerIsRepeat(params, this.treeCurrentFiled)
} }
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)
// console.log('index', index)
if (index !== -1) {
this.handleAuto()
if (this.autoMatic) {
const index = this.autoMatic.findIndex(i => this.treeCurrentFiled.fieldName === i.fieldName)
// console.log('index', index)
if (index !== -1) {
this.handleAuto()
}
} }
} }
}, },
// popover - table // popover - table
clickRowHandler(row) { clickRowHandler(row) {
this.$refs.popoverTable.clearSelection() this.$refs.popoverTable.clearSelection()
this.$refs.popoverTable.toggleRowSelection(row)
if (!row.level || row.level === 3) {
this.$refs.popoverTable.toggleRowSelection(row)
} else {
return false
}
}, },
// popover - table // popover - table
handleSelectionChange(val) { handleSelectionChange(val) {
@ -630,9 +646,11 @@ export default {
this.popoverFondsVisible = false this.popoverFondsVisible = false
if (this.isDesFormType !== 'prearchiveLibrary' && this.isDesFormType !== 'mergeFile') { if (this.isDesFormType !== 'prearchiveLibrary' && this.isDesFormType !== 'mergeFile') {
const index = this.autoMatic.findIndex(i => this.currentFieldName === i.fieldName)
if (index !== -1) {
this.handleAuto()
if (this.autoMatic) {
const index = this.autoMatic.findIndex(i => this.currentFieldName === i.fieldName)
if (index !== -1) {
this.handleAuto()
}
} }
} }
}, },
@ -916,6 +934,33 @@ export default {
resolve({ width, height }) resolve({ width, height })
} }
}) })
},
// -
getDictsList(item) {
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 (item.isInputClass === 'select') {
this.$set(item, 'options', filteredItems)
} else if (item.isInputClass === 'popover') {
console.log('popover', filteredItems)
this.popoverTableData = filteredItems
this.popoverVisible = true
}
}).catch(err => {
console.log(err)
})
},
// level 便
addLevelToDictionaryList(dictionaryList, level) {
dictionaryList.forEach(dictionary => {
dictionary.level = level
if (dictionary.childDictionarys) {
dictionary.childDictionarys = this.addLevelToDictionaryList(dictionary.childDictionarys, level + 1)
}
})
return dictionaryList
} }
} }
} }

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

@ -85,8 +85,8 @@
<div v-loading="rightLoading" class="field-list"> <div v-loading="rightLoading" class="field-list">
<div v-if="isCorrField"> <div v-if="isCorrField">
<div v-for="(item,index) in allFieldData" :key="index" class="field-item"> <div v-for="(item,index) in allFieldData" :key="index" class="field-item">
<p>{{ item.categoryFieldId.fieldCnName }}</p>
<div class="field-state"><span :class=" item.categoryFieldId.isInput ? 'is-select' : 'is-hide'">{{ item.categoryFieldId.isInput ? '显示': '隐藏' }}</span></div>
<p>{{ item.categoryFieldId && item.categoryFieldId.fieldCnName }}</p>
<div class="field-state"><span :class=" item.categoryFieldId && item.categoryFieldId.isInput ? 'is-select' : 'is-hide'">{{ item.categoryFieldId && item.categoryFieldId.isInput ? '显示': '隐藏' }}</span></div>
</div> </div>
</div> </div>
<div v-else> <div v-else>
@ -280,7 +280,7 @@ export default {
FetchDetailsByDocumentIdAndCategoryId(params).then(res => { FetchDetailsByDocumentIdAndCategoryId(params).then(res => {
this.allFieldData = res this.allFieldData = res
res.forEach((item, index) => { res.forEach((item, index) => {
this.selectStatus.push({ mode: false, fiedType: item.categoryFieldId.isDefaultValue === '' ? 1 : 2, value: item.categoryFieldId.isDefaultValue === '' ? item.documentFieldId.fieldCnName : item.categoryFieldId.isDefaultValue, field: item.documentFieldId, isInput: item.documentFieldId.isInput })
this.selectStatus.push({ mode: false, fiedType: item.categoryFieldId && item.categoryFieldId.isDefaultValue === '' ? 1 : 2, value: item.categoryFieldId && item.categoryFieldId.isDefaultValue === '' ? (item.documentFieldId && item.documentFieldId.fieldCnName) : item.categoryFieldId && item.categoryFieldId.isDefaultValue, field: item.documentFieldId, isInput: item.documentFieldId && item.documentFieldId.isInput })
}) })
if (this.form.scope) { if (this.form.scope) {

Loading…
Cancel
Save