Browse Source

公共筛选/快速筛选/收集库

master
xuhuajiao 1 year ago
parent
commit
28af88d6fb
  1. 25
      src/api/system/dict.js
  2. 88
      src/assets/styles/archives-manage.scss
  3. 24
      src/views/archivesManage/managementLibrary/anjuan/tableList.vue
  4. 14
      src/views/archivesManage/managementLibrary/file/index.vue
  5. 20
      src/views/archivesManage/managementLibrary/index.vue
  6. 17
      src/views/archivesManage/managementLibrary/juannei/index.vue
  7. 13
      src/views/archivesManage/managementLibrary/mixins/index.js
  8. 27
      src/views/archivesManage/managementLibrary/module/collectHeader.vue
  9. 15
      src/views/archivesManage/managementLibrary/project/index.vue
  10. 19
      src/views/collectReorganizi/collectionLibrary/anjuan/tableList.vue
  11. 62
      src/views/collectReorganizi/collectionLibrary/index.vue
  12. 6
      src/views/collectReorganizi/collectionLibrary/juannei/index.vue
  13. 189
      src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue
  14. 123
      src/views/collectReorganizi/collectionLibrary/module/fileNumberAdjustment/index.vue
  15. 9
      src/views/collectReorganizi/collectionLibrary/module/fileSeqAdjustment/index.vue
  16. 7
      src/views/collectReorganizi/collectionLibrary/project/index.vue
  17. 19
      src/views/components/BindingTagDlg.vue
  18. 142
      src/views/components/category/PreviewForm.vue
  19. 2
      src/views/components/category/SettingForm.vue
  20. 64
      src/views/system/archivesCategory/publicScreening/index.vue

25
src/api/system/dict.js

@ -1,12 +1,12 @@
import request from '@/utils/request' import request from '@/utils/request'
// export function getDictsList(params) {
// return request({
// url: 'api/dictionary/initDictionaryList',
// method: 'get',
// params
// })
// }
export function FetchDictsList(params) {
return request({
url: 'api/dictionary/initDictionaryList',
method: 'get',
params
})
}
export function add(data) { export function add(data) {
return request({ return request({
@ -48,4 +48,13 @@ export function FetchSonDictionaryList(params) {
}) })
} }
export default { add, edit, del, FetchDictionaryTree, FetchSonDictionaryList }
// 快速筛选
export function FetchDictionaryTreeByCategoryId(params) {
return request({
url: 'api/dictionary/getDictionaryTreeByCategoryId',
method: 'get',
params
})
}
export default { add, edit, del, FetchDictsList, FetchDictionaryTree, FetchSonDictionaryList, FetchDictionaryTreeByCategoryId }

88
src/assets/styles/archives-manage.scss

@ -324,53 +324,74 @@
content: ""; content: "";
position: absolute; position: absolute;
left: 15px; left: 15px;
top: 10px;
width: 1px;
height: 100%;
background-color: #3A99FD;
top: 32px;
width: 2px;
height: 45px;
// background-color: #0348F3;
border-left: 2px solid #0348F3;
opacity: 0.3;
z-index: 1; z-index: 1;
} }
&:last-child::before{ &:last-child::before{
display: none; display: none;
} }
&.step-active{
&::before{
opacity: 0.3;
}
}
&.step-loading{
&::before{
opacity: 1;
border-left: 2px dashed #0348F3;
}
}
} }
.step-left-num{ .step-left-num{
position: relative; position: relative;
display: block; display: block;
width: 30px; width: 30px;
height: 30px; height: 30px;
line-height: 30px;
line-height: 28px;
border-radius: 50%; border-radius: 50%;
font-size: 16px; font-size: 16px;
text-align: center; text-align: center;
color: #fff;
border: 1px solid $mainColor;
background-color: $boxBg;
color: #0348F3;
border: 2px solid #0348F3;
// background-color: #0348F3;
opacity: 0.3;
z-index: 4; z-index: 4;
&.step-active{ &.step-active{
background-color: $mainColor;
color: #fff;
background-color:#0348F3;
opacity: 1;
} }
&.step-loading{ &.step-loading{
color: #0348F3;
border: 2px solid #0348F3;
background-color: #fff;
&::before, &::before,
&::after{ &::after{
content: ""; content: "";
position: absolute; position: absolute;
left: 50%; left: 50%;
top: 50%; top: 50%;
width: 40px;
height: 40px;
border-radius: 50%;
border: 1px solid #13439E;
box-shadow: inset 0px 0px 8px 1px #13439E;
// width: 40px;
// height: 40px;
// border-radius: 50%;
// color: #0348F3;
// border: 2px solid #0348F3;
// background-color: #fff;
// box-shadow: inset 0px 0px 8px 1px #0348F3;
margin: -20px 0 0 -20px; margin: -20px 0 0 -20px;
z-index: 1; z-index: 1;
} }
&::before{
animation: halo 2s linear 0.5s infinite;
}
&::after{
animation: halo 2s linear 1.5s infinite;
}
// &::before{
// animation: halo 2s linear 0.5s infinite;
// }
// &::after{
// animation: halo 2s linear 1.5s infinite;
// }
} }
} }
// 晕开效果 // 晕开效果
@ -405,26 +426,27 @@
flex: 1; flex: 1;
margin-left: 12px; margin-left: 12px;
.step-title{ .step-title{
font-size: 16px;
line-height: 30px; line-height: 30px;
color: $mainColor;
color: #0348F3;
span{ span{
padding-left: 10px; padding-left: 10px;
font-weight: bold;
color: #fff;
// font-weight: bold;
color: #0C0E1E;
} }
} }
.step-tip{ .step-tip{
padding: 0 10px; padding: 0 10px;
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
color: #13439E;
background-color: #02255F;
color: #A6ADB6;
background-color: #EDEFF3;
border-radius: 4px; border-radius: 4px;
&.tip-active{ &.tip-active{
color: $mainColor;
color: #545B65;
} }
&.tip-error{ &.tip-error{
color: #EF3147;
color: #ED4A41;
} }
} }
} }
@ -799,7 +821,7 @@
} }
} }
.head-search{ .head-search{
margin-right: 60px;
margin-right: 30px;
.el-button{ .el-button{
margin-left: 10px; margin-left: 10px;
} }
@ -921,3 +943,13 @@
text-align: right; text-align: right;
color: #545B65; color: #545B65;
} }
.drag-tip {
display: block;
padding-left: 20px;
padding-bottom: 10px;
font-style: normal;
font-weight: bold;
font-size: 12px;
}

24
src/views/archivesManage/managementLibrary/anjuan/tableList.vue

@ -37,14 +37,15 @@
{{ scope.row[field.fieldName] }} {{ scope.row[field.fieldName] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-if="!isRecycle" label="实体" width="88" align="center" :fixed="fixedStatusBar ? false : 'right' ">
<el-table-column v-if="!isRecycle && selectedCategory.arrangeType === 1" label="实体" width="88" align="center" :fixed="fixedStatusBar ? false : 'right' ">
<!-- slot-scope="scope" --> <!-- slot-scope="scope" -->
<template> <template>
<span class="row-state row-physical state-active"></span> <span class="row-state row-physical state-active"></span>
<!-- <span :class="['row-state', 'row-physical', scope.row.tid ? 'state-active' : '' ]">{{ scope.row.tid ? '有': '无' }}</span> --> <!-- <span :class="['row-state', 'row-physical', scope.row.tid ? 'state-active' : '' ]">{{ scope.row.tid ? '有': '无' }}</span> -->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-if="!isRecycle" label="标签" width="88" align="center" :fixed="fixedStatusBar ? false : 'right' ">
<el-table-column v-if="!isRecycle && selectedCategory.arrangeType === 1" label="标签" width="88" align="center" :fixed="fixedStatusBar ? false : 'right' ">
<template> <template>
<span class="row-state row-binding state-active">未绑</span> <span class="row-state row-binding state-active">未绑</span>
<!-- 未绑 / 已绑 --> <!-- 未绑 / 已绑 -->
@ -66,13 +67,14 @@
<!-- <span :class="['row-state', 'row-warehousing', (storageTxt[scope.$index] === '已入' )? 'state-active' : '' ]">{{ storageTxt[scope.$index] }}</span> --> <!-- <span :class="['row-state', 'row-warehousing', (storageTxt[scope.$index] === '已入' )? 'state-active' : '' ]">{{ storageTxt[scope.$index] }}</span> -->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-if="!isRecycle" label="借阅" width="88" align="center" :fixed="fixedStatusBar ? false : 'right' ">
<el-table-column v-if="!isRecycle && selectedCategory.arrangeType === 1" label="借阅" width="88" align="center" :fixed="fixedStatusBar ? false : 'right' ">
<template> <template>
<span class="row-state row-lending state-active">已借</span> <span class="row-state row-lending state-active">已借</span>
<!-- is_borrow 4 已归还 / 为空 - 未加入待借列表 - 在库 / 2 待借阅在待借列表/借出确认列表 - 待借 / 1待登记 - 不可借- 表示 / 3 待归还 - 已借 --> <!-- is_borrow 4 已归还 / 为空 - 未加入待借列表 - 在库 / 2 待借阅在待借列表/借出确认列表 - 待借 / 1待登记 - 不可借- 表示 / 3 待归还 - 已借 -->
<!-- <span :class="['row-state', 'row-lending', (borrowTxt[scope.$index] === '已借' )? 'state-active' : '' ]">{{ borrowTxt[scope.$index] }}</span> --> <!-- <span :class="['row-state', 'row-lending', (borrowTxt[scope.$index] === '已借' )? 'state-active' : '' ]">{{ borrowTxt[scope.$index] }}</span> -->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!--分页组件--> <!--分页组件-->
<el-pagination <el-pagination
@ -92,7 +94,7 @@
<script> <script>
import { header, form } from '@crud/crud' import { header, form } from '@crud/crud'
import { collectionLibraryCrud } from '../mixins/index'
import { manageLibraryCrud } from '../mixins/index'
import ArchivesInfo from '../module/archivesInfo/index' import ArchivesInfo from '../module/archivesInfo/index'
import CollectHeader from '../module/collectHeader' import CollectHeader from '../module/collectHeader'
@ -105,7 +107,7 @@ export default {
mixins: [ mixins: [
header(), header(),
form({}), form({}),
collectionLibraryCrud
manageLibraryCrud
], ],
props: { props: {
isTitleType: { isTitleType: {
@ -171,17 +173,6 @@ export default {
this.$parent.$parent.$emit('openJuannei', data) this.$parent.$parent.$emit('openJuannei', data)
} }
}, },
// table
tableRowClassName({ row, rowIndex }) {
// console.log('', row, rowIndex)
let color = ''
this.selections.forEach(item => {
if (item.id === row.id) {
color = 'rowStyle'
}
})
return color
},
// table - // table -
selectAll(val) { selectAll(val) {
this.selections = val this.selections = val
@ -225,6 +216,7 @@ export default {
// //
handleCurrentChange(selection, row) { handleCurrentChange(selection, row) {
console.log('触发单选', row) console.log('触发单选', row)
console.log('selection', selection)
this.selections = selection this.selections = selection
}, },
handleSizeChange(size) { handleSizeChange(size) {

14
src/views/archivesManage/managementLibrary/file/index.vue

@ -68,7 +68,7 @@
</template> </template>
<script> <script>
import { collectionLibraryCrud } from '../mixins/index'
import { manageLibraryCrud } 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'
export default { export default {
@ -77,7 +77,7 @@ export default {
mixins: [ mixins: [
header(), header(),
form({}), form({}),
collectionLibraryCrud
manageLibraryCrud
], ],
props: { props: {
selectedCategory: { selectedCategory: {
@ -114,16 +114,6 @@ export default {
rowKey(row) { rowKey(row) {
return row.id return row.id
}, },
// table
tableRowClassName({ row, rowIndex }) {
let color = ''
this.selections.forEach(item => {
if (item.id === row.id) {
color = 'rowStyle'
}
})
return color
},
// table - // table -
selectAll(val) { selectAll(val) {
this.selections = val this.selections = val

20
src/views/archivesManage/managementLibrary/index.vue

@ -34,11 +34,11 @@
highlight-current highlight-current
> >
<span slot-scope="{ node, data }" class="custom-tree-node"> <span slot-scope="{ node, data }" class="custom-tree-node">
<span v-if="data.pid === null " class="iconClassify">
{{ data.name }}
<span v-if="data.childDictionarys !== null " class="iconClassify">
{{ data.dictionaryName }}
</span> </span>
<span v-if="data.pid" class="iconClassify-child">
{{ data.name }}
<span v-else class="iconClassify-child">
{{ data.dictionaryName }}
</span> </span>
</span> </span>
</el-tree> </el-tree>
@ -62,8 +62,8 @@
<script> <script>
import crudCategory from '@/api/category/category' import crudCategory from '@/api/category/category'
import { collectionLibraryCrud } from './mixins/index'
import { FetchArchivesClassTree } from '@/api/system/archivesClass'
import { manageLibraryCrud } from './mixins/index'
import { FetchDictionaryTreeByCategoryId } from '@/api/system/dict'
import CRUD, { presenter, header } from '@crud/crud' import CRUD, { presenter, header } from '@crud/crud'
import Project from './project/index' import Project from './project/index'
import Anjuan from './anjuan/index' import Anjuan from './anjuan/index'
@ -87,7 +87,7 @@ export default {
}) })
] ]
}, },
mixins: [presenter(), header(), collectionLibraryCrud],
mixins: [presenter(), header(), manageLibraryCrud],
props: { props: {
isRecycle: { isRecycle: {
type: Boolean, type: Boolean,
@ -101,8 +101,8 @@ export default {
label: 'cnName' label: 'cnName'
}, },
defaultClassifyProps: { defaultClassifyProps: {
children: 'childArchivesClass',
label: 'name'
children: 'childDictionarys',
label: 'dictionaryName'
}, },
sharedData: '', sharedData: '',
selectedCategory: {}, selectedCategory: {},
@ -227,7 +227,7 @@ export default {
const params = { const params = {
'categoryId': categoryId 'categoryId': categoryId
} }
FetchArchivesClassTree(params).then((res) => {
FetchDictionaryTreeByCategoryId(params).then((res) => {
this.classifyTree = res this.classifyTree = res
this.classifyLoading = false this.classifyLoading = false
}).catch(err => { }).catch(err => {

17
src/views/archivesManage/managementLibrary/juannei/index.vue

@ -43,6 +43,7 @@
{{ scope.row[field.fieldName] }} {{ scope.row[field.fieldName] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-if="!isRecycle" label="实体" width="88" align="center" :fixed="fixedStatusBar ? false : 'right' "> <el-table-column v-if="!isRecycle" label="实体" width="88" align="center" :fixed="fixedStatusBar ? false : 'right' ">
<!-- slot-scope="scope" --> <!-- slot-scope="scope" -->
<template> <template>
@ -79,6 +80,7 @@
<!-- <span :class="['row-state', 'row-lending', (borrowTxt[scope.$index] === '已借' )? 'state-active' : '' ]">{{ borrowTxt[scope.$index] }}</span> --> <!-- <span :class="['row-state', 'row-lending', (borrowTxt[scope.$index] === '已借' )? 'state-active' : '' ]">{{ borrowTxt[scope.$index] }}</span> -->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!--分页组件--> <!--分页组件-->
<el-pagination <el-pagination
@ -98,7 +100,7 @@
</template> </template>
<script> <script>
import { collectionLibraryCrud } from '../mixins/index'
import { manageLibraryCrud } 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'
@ -112,7 +114,7 @@ export default {
mixins: [ mixins: [
header(), header(),
form({}), form({}),
collectionLibraryCrud
manageLibraryCrud
], ],
props: { props: {
selectedCategory: { selectedCategory: {
@ -169,17 +171,6 @@ export default {
rowKey(row) { rowKey(row) {
return row.id return row.id
}, },
// table
tableRowClassName({ row, rowIndex }) {
// console.log('', row, rowIndex)
let color = ''
this.selections.forEach(item => {
if (item.id === row.id) {
color = 'rowStyle'
}
})
return color
},
// table - // table -
selectAll(val) { selectAll(val) {
this.selections = val this.selections = val

13
src/views/archivesManage/managementLibrary/mixins/index.js

@ -1,7 +1,7 @@
// 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'
export const collectionLibraryCrud = {
export const manageLibraryCrud = {
// 组件共用属性 // 组件共用属性
data() { data() {
return { return {
@ -34,6 +34,17 @@ export const collectionLibraryCrud = {
// this.$emit('status-bar-checked-changed', this.fixedStatusBar) // this.$emit('status-bar-checked-changed', this.fixedStatusBar)
// localStorage.setItem('statusBarFixedType', val) // localStorage.setItem('statusBarFixedType', val)
// }, // },
// table选中加上选中状态
tableRowClassName({ row, rowIndex }) {
// console.log('添加类名', row, rowIndex)
let color = ''
this.selections.forEach(item => {
if (item.id === row.id) {
color = 'rowStyle'
}
})
return color
},
handleSearch() { handleSearch() {
this.getViewTableList() this.getViewTableList()
}, },

27
src/views/archivesManage/managementLibrary/module/collectHeader.vue

@ -46,7 +46,7 @@
<span>整理</span> <span>整理</span>
</template> </template>
<el-menu-item-group class="collect-submenu-group"> <el-menu-item-group class="collect-submenu-group">
<el-menu-item v-if="isTitleType === 3" index="2-1">标签绑定</el-menu-item>
<el-menu-item v-if="isTitleType === 3" index="2-1" @click="bindingTag(selections)">标签绑定</el-menu-item>
<el-menu-item-group v-if="isTitleType === 3" class="collect-submenu-group submenu-tree"> <el-menu-item-group v-if="isTitleType === 3" class="collect-submenu-group submenu-tree">
<template slot="title">档案装盒</template> <template slot="title">档案装盒</template>
<el-menu-item index="2-2">装盒</el-menu-item> <el-menu-item index="2-2">装盒</el-menu-item>
@ -95,6 +95,9 @@
</div> </div>
</el-dialog> </el-dialog>
<!-- 绑定标签 -->
<binding-tag-dlg ref="bindingTag" :binding-id="selections[0] && selections[0].id" :binding-type="1" binding-txt="档案" />
<!--删除对话框组件--> <!--删除对话框组件-->
<el-dialog class="tip-dialog" title="提示" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="deleteVisible"> <el-dialog class="tip-dialog" title="提示" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="deleteVisible">
<div class="setting-dialog"> <div class="setting-dialog">
@ -162,16 +165,17 @@
</template> </template>
<script> <script>
import { collectionLibraryCrud } from '../mixins/index'
import { manageLibraryCrud } from '../mixins/index'
import { FetchInitCategoryInputFieldByPid } from '@/api/system/category/category' import { FetchInitCategoryInputFieldByPid } from '@/api/system/category/category'
import PreviewForm from '@/views/components/category/PreviewForm' import PreviewForm from '@/views/components/category/PreviewForm'
import Print from './print/index' import Print from './print/index'
import BindingTagDlg from '@/views/components/BindingTagDlg'
// import { exportFile } from '@/utils/index' // import { exportFile } from '@/utils/index'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
export default { export default {
name: 'CollectHeader', name: 'CollectHeader',
components: { PreviewForm, Print },
mixins: [collectionLibraryCrud],
components: { PreviewForm, BindingTagDlg, Print },
mixins: [manageLibraryCrud],
props: { props: {
selectedCategory: { selectedCategory: {
type: Object, type: Object,
@ -198,6 +202,12 @@ export default {
isRecycle: { isRecycle: {
type: Boolean, type: Boolean,
default: false default: false
},
selections: {
type: Array,
default: function() {
return []
}
} }
}, },
data() { data() {
@ -241,7 +251,6 @@ export default {
} }
], ],
selectStatus: null, selectStatus: null,
activeMenuIndex: '1', activeMenuIndex: '1',
formVisible: false, formVisible: false,
formTitle: '项目', formTitle: '项目',
@ -397,6 +406,14 @@ export default {
handleDelConfirm() { handleDelConfirm() {
this.deleteVisible = false this.deleteVisible = false
}, },
//
bindingTag(data) {
if (data[0].tid) {
this.$refs.bindingTag.isBinding = true
this.$refs.bindingTag.tidCode = data[0].tid
}
this.$refs.bindingTag.bindingVisible = true
},
// //
handleExport() { handleExport() {
this.exportVisible = true this.exportVisible = true

15
src/views/archivesManage/managementLibrary/project/index.vue

@ -53,7 +53,7 @@
</template> </template>
<script> <script>
import { collectionLibraryCrud } from '../mixins/index'
import { manageLibraryCrud } 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'
@ -67,7 +67,7 @@ export default {
mixins: [ mixins: [
header(), header(),
form({}), form({}),
collectionLibraryCrud
manageLibraryCrud
], ],
props: { props: {
data: { data: {
@ -117,17 +117,6 @@ export default {
rowKey(row) { rowKey(row) {
return row.id return row.id
}, },
// table
tableRowClassName({ row, rowIndex }) {
// console.log('', row, rowIndex)
let color = ''
this.selections.forEach(item => {
if (item.id === row.id) {
color = 'rowStyle'
}
})
return color
},
// table - // table -
selectAll(val) { selectAll(val) {
this.selections = val this.selections = val

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

@ -58,6 +58,9 @@ 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,7 +96,8 @@ export default {
data() { data() {
return { return {
categoryId: 'F0F59CC713C83AE4BAB99B', categoryId: 'F0F59CC713C83AE4BAB99B',
arcId: '256E752BC0280618840600'
arcId: '256E752BC0280618840600',
title: '案卷'
} }
}, },
watch: { watch: {
@ -105,11 +109,18 @@ export default {
this.doLayout() this.doLayout()
}, },
activeIndex(newValue) { activeIndex(newValue) {
if (newValue === 1) {
this.title = '文件'
} else {
this.title = '案卷'
}
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() {
@ -153,14 +164,18 @@ export default {
this.arcId = row.id this.arcId = row.id
if (this.selectedCategory.arrangeType !== 1) { if (this.selectedCategory.arrangeType !== 1) {
this.title = '案卷'
this.$refs.archivesInfo.isHasFile = false this.$refs.archivesInfo.isHasFile = false
if (this.activeIndex === 1) { if (this.activeIndex === 1) {
this.title = '文件'
this.$refs.archivesInfo.detailTitle = '文件详情' this.$refs.archivesInfo.detailTitle = '文件详情'
this.$refs.archivesInfo.isHasFile = true this.$refs.archivesInfo.isHasFile = true
} else { } else {
this.title = '案卷'
this.$refs.archivesInfo.detailTitle = '案卷详情' this.$refs.archivesInfo.detailTitle = '案卷详情'
} }
} else { } else {
this.title = '文件'
this.$refs.archivesInfo.isHasFile = true this.$refs.archivesInfo.isHasFile = true
this.$refs.archivesInfo.detailTitle = '文件详情' this.$refs.archivesInfo.detailTitle = '文件详情'
} }
@ -175,7 +190,7 @@ export default {
clearTimeout(this.timer) clearTimeout(this.timer)
} }
this.timer = setTimeout(() => { this.timer = setTimeout(() => {
this.openJuannei(row.archive_no)
this.openJuannei('所属' + this.title + row.archive_no)
}, 300) }, 300)
this.selections = this.crud.selections this.selections = this.crud.selections
}, },

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

@ -23,10 +23,10 @@
</el-tree> </el-tree>
</div> </div>
<h3 class="arc-title arc-title-bottom">快速筛选</h3> <h3 class="arc-title arc-title-bottom">快速筛选</h3>
<div class="arc-tree arc-tree-02">
<el-tree <el-tree
ref="classifyTree" ref="classifyTree"
v-loading="classifyLoading" v-loading="classifyLoading"
class="arc-tree arc-tree-02"
:data="classifyTree" :data="classifyTree"
:props="defaultClassifyProps" :props="defaultClassifyProps"
node-key="id" node-key="id"
@ -34,14 +34,30 @@
highlight-current highlight-current
> >
<span slot-scope="{ node, data }" class="custom-tree-node"> <span slot-scope="{ node, data }" class="custom-tree-node">
<span v-if="data.pid === null " class="iconClassify">
{{ data.name }}
<span v-if="data.childDictionarys !== null " class="iconClassify">
{{ data.dictionaryName }}
</span> </span>
<span v-if="data.pid" class="iconClassify-child">
{{ data.name }}
<span v-else class="iconClassify-child">
{{ data.dictionaryName }}
</span> </span>
</span> </span>
</el-tree> </el-tree>
<el-tree
ref="fondsTree"
v-loading="classifyLoading"
:data="fondsTree"
:props="defaultFondsProps"
node-key="id"
:expand-on-click-node="false"
highlight-current
>
<span slot-scope="{ node, data }" class="custom-tree-node">
<span class="iconClassify">
{{ data.fondsName }}
</span>
</span>
</el-tree>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -63,12 +79,13 @@
<script> <script>
import crudCategory from '@/api/category/category' import crudCategory from '@/api/category/category'
import { collectionLibraryCrud } from './mixins/index' import { collectionLibraryCrud } from './mixins/index'
import { FetchArchivesClassTree } from '@/api/system/archivesClass'
import { FetchDictionaryTreeByCategoryId } from '@/api/system/dict'
import CRUD, { presenter, header } from '@crud/crud' import CRUD, { presenter, header } from '@crud/crud'
import Project from './project/index' import Project from './project/index'
import Anjuan from './anjuan/index' import Anjuan from './anjuan/index'
import Juannei from './juannei/index' import Juannei from './juannei/index'
import File from './file/index' import File from './file/index'
export default { export default {
name: 'CollectionLibrary', name: 'CollectionLibrary',
components: { Project, Anjuan, Juannei, File }, components: { Project, Anjuan, Juannei, File },
@ -101,12 +118,17 @@ export default {
label: 'cnName' label: 'cnName'
}, },
defaultClassifyProps: { defaultClassifyProps: {
children: 'childArchivesClass',
label: 'name'
children: 'childDictionarys',
label: 'dictionaryName'
},
defaultFondsProps: {
children: 'children',
label: 'fondsName'
}, },
sharedData: '', sharedData: '',
selectedCategory: {}, selectedCategory: {},
classifyTree: [], classifyTree: [],
fondsTree: [],
classifyLoading: false classifyLoading: false
} }
}, },
@ -195,18 +217,19 @@ export default {
this.selectedCategory = val this.selectedCategory = val
if (this.selectedCategory.isType !== 1) { if (this.selectedCategory.isType !== 1) {
this.getInitArchivesClass(val.id)
this.FetchDictionaryTreeByCategoryId(val.id)
} else { } else {
this.classifyTree = [] this.classifyTree = []
this.fondsTree = []
} }
this.$nextTick(() => { this.$nextTick(() => {
if (this.selectedCategory.arrangeType === 3) { if (this.selectedCategory.arrangeType === 3) {
this.$refs.projectEle.getCommonData(1)
// this.$refs.projectEle.getCommonData(1)
} else if (this.selectedCategory.arrangeType === 2) { } else if (this.selectedCategory.arrangeType === 2) {
this.$refs.anjuanEle.$refs.ajContent.$refs.tableList.getCommonData(2)
// this.$refs.anjuanEle.$refs.ajContent.$refs.tableList.getCommonData(2)
} else if (this.selectedCategory.arrangeType === 1) { } else if (this.selectedCategory.arrangeType === 1) {
this.$refs.anjuanEle.$refs.ajContent.$refs.tableList.getCommonData(3)
// this.$refs.anjuanEle.$refs.ajContent.$refs.tableList.getCommonData(3)
} }
if (this.$refs.anjuanEle) { if (this.$refs.anjuanEle) {
this.$refs.anjuanEle.anjuanDrawer = false this.$refs.anjuanEle.anjuanDrawer = false
@ -222,13 +245,14 @@ export default {
} }
}) })
}, },
getInitArchivesClass(categoryId) {
FetchDictionaryTreeByCategoryId(categoryId) {
this.classifyLoading = true this.classifyLoading = true
const params = { const params = {
'categoryId': categoryId 'categoryId': categoryId
} }
FetchArchivesClassTree(params).then((res) => {
this.classifyTree = res
FetchDictionaryTreeByCategoryId(params).then((res) => {
this.classifyTree = res.dictionarys
this.fondsTree = res.fonds
this.classifyLoading = false this.classifyLoading = false
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
@ -236,7 +260,10 @@ export default {
}, },
handleOpenAnjuan(data) { handleOpenAnjuan(data) {
this.$refs.anjuanEle.anjuanDrawer = true this.$refs.anjuanEle.anjuanDrawer = true
this.activeIndex = 0
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.test = data this.$refs.anjuanEle.$refs.ajContent.test = data
}) })
@ -319,7 +346,6 @@ export default {
} }
.arc-tree{ .arc-tree{
padding: 0 20px; padding: 0 20px;
background-color: red;
} }
.arc-tree-01{ .arc-tree-01{
height: 400px; height: 400px;
@ -331,9 +357,13 @@ export default {
} }
.arc-tree-02{ .arc-tree-02{
margin: 20px 0;
height: calc(100vh - 720px); height: calc(100vh - 720px);
overflow: hidden; overflow: hidden;
overflow-y: scroll; overflow-y: scroll;
.el-tree{
margin: 0;
}
} }
::v-deep .el-tree-node__children .custom-tree-node{ ::v-deep .el-tree-node__children .custom-tree-node{
font-size: 14px; font-size: 14px;

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

@ -67,6 +67,8 @@ 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 },
@ -104,6 +106,8 @@ export default {
} }
}, },
created() { created() {
this.tableDisplayFields = tableData.data
this.junneiData = jsonData.data.list.content
}, },
mounted() { mounted() {
console.log('nei2', this.selectedCategory.arrangeType) console.log('nei2', this.selectedCategory.arrangeType)
@ -157,7 +161,7 @@ export default {
clearTimeout(this.timer) clearTimeout(this.timer)
} }
this.timer = setTimeout(() => { this.timer = setTimeout(() => {
this.openFile(row.archive_no)
this.openFile('所属卷内' + row.archive_no)
}, 300) }, 300)
this.selections = this.crud.selections this.selections = this.crud.selections
}, },

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

@ -1,7 +1,30 @@
<template> <template>
<div>
<div class="collect-header"> <div class="collect-header">
<h4 :class="classType">{{ collectTitle }} <span v-if="isTitleType !== 2 && !(isTitleType === 3 && (selectedCategory.arrangeType === 1 || selectedCategory.arrangeType === 2) )"> > {{ test }}</span></h4>
<h4 :class="classType">{{ collectTitle }} </h4>
<!-- :class="[!(isRecycle && (isTitleType === 2 || (isTitleType === 3 && selectedCategory.arrangeType !== 3))) ? 'head-search is-recycle':'head-search']" --> <!-- :class="[!(isRecycle && (isTitleType === 2 || (isTitleType === 3 && selectedCategory.arrangeType !== 3))) ? 'head-search is-recycle':'head-search']" -->
<div class="collect-filter">
<treeselect
v-if="selectedCategory.arrangeType === 3 && isTitleType !== 4 && isTitleType !== 6 && activeIndex !== 1"
v-model="query.projectClass"
:options="projectOptions"
style="width: 180px;"
flat
:multiple="false"
:normalizer="normalizerProject"
placeholder="请选择"
/>
<treeselect
v-if="isTitleType !== 6"
v-model="query.classify"
:options="classifyOptions"
style="width: 180px;"
flat
:multiple="false"
:normalizer="normalizer"
placeholder="请选择档案分类"
/>
</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-input v-model="query.search" clearable size="small" :placeholder="placeholderType" prefix-icon="el-icon-search" style="width: 200px;" class="filter-item" />
@ -40,11 +63,12 @@
<el-menu-item v-if="isTitleType !== 2" index="2-1" @click="handleBlukImport">批量导入</el-menu-item> <el-menu-item v-if="isTitleType !== 2" index="2-1" @click="handleBlukImport">批量导入</el-menu-item>
<!-- 项目 / 案卷 / 卷内 / 文件--> <!-- 项目 / 案卷 / 卷内 / 文件-->
<el-menu-item v-if="activeIndex !== 1 || (isTitleType === 3 && selectedCategory.arrangeType === 1 && activeIndex === 1)" index="2-2" @click="handleBlukEditing">批量修改</el-menu-item> <el-menu-item v-if="activeIndex !== 1 || (isTitleType === 3 && selectedCategory.arrangeType === 1 && activeIndex === 1)" index="2-2" @click="handleBlukEditing">批量修改</el-menu-item>
<el-menu-item v-if="isTitleType !== 2 && !(isTitleType === 3 && (selectedCategory.arrangeType === 3 || selectedCategory.arrangeType === 2) && activeIndex === 1)" index="2-3" @click="handleAdjustment">档案调整</el-menu-item>
<el-menu-item v-if="isTitleType !== 2 && !(isTitleType === 3 && (selectedCategory.arrangeType === 3 || selectedCategory.arrangeType === 2) && activeIndex === 1)" index="2-4" @click="handleFileNumberUpdate">档号更新</el-menu-item>
<el-menu-item v-if="(isTitleType === 3 && selectedCategory.arrangeType === 2) && activeIndex === 0" index="2-3" @click="handleAdjustment('anjuan')">案卷顺序调整</el-menu-item>
<el-menu-item v-if="isTitleType === 3 && activeIndex === 0 && selectedCategory.arrangeType !== 1 " index="2-12" @click="handleJnSeqAdjustment">卷内顺序调整</el-menu-item>
<el-menu-item v-if="isTitleType === 3 && selectedCategory.arrangeType === 1" index="2-3" @click="handleAdjustment('file')">文件顺序调整</el-menu-item>
<el-menu-item v-if="isTitleType !== 2 && !(isTitleType === 3 && (selectedCategory.arrangeType === 1|| selectedCategory.arrangeType === 2) && activeIndex === 1)" index="2-4" @click="handleFileNumberUpdate">档号更新</el-menu-item>
<!-- 案卷 --> <!-- 案卷 -->
<el-menu-item v-if="isTitleType === 3 && activeIndex === 0 && selectedCategory.arrangeType !== 1 " index="2-5" @click="handleFileNumberUpdate">卷内档号更新</el-menu-item> <el-menu-item v-if="isTitleType === 3 && activeIndex === 0 && selectedCategory.arrangeType !== 1 " index="2-5" @click="handleFileNumberUpdate">卷内档号更新</el-menu-item>
<el-menu-item v-if="isTitleType === 3 && activeIndex === 0 && selectedCategory.arrangeType !== 1 " index="2-12" @click="handleFileSeqAdjustment">卷内顺序调整</el-menu-item>
<el-menu-item v-if="isTitleType === 3 && activeIndex === 0 && selectedCategory.arrangeType !== 1" index="2-6" @click="handleUncoil">拆卷</el-menu-item> <el-menu-item v-if="isTitleType === 3 && activeIndex === 0 && selectedCategory.arrangeType !== 1" index="2-6" @click="handleUncoil">拆卷</el-menu-item>
<el-menu-item v-if="isTitleType === 3 && activeIndex === 0 && selectedCategory.arrangeType !== 1" index="2-7" @click="handleCombineFile">合卷</el-menu-item> <el-menu-item v-if="isTitleType === 3 && activeIndex === 0 && selectedCategory.arrangeType !== 1" index="2-7" @click="handleCombineFile">合卷</el-menu-item>
<el-menu-item v-if="isTitleType === 3 && selectedCategory.arrangeType !== 1" index="2-8" @click="handleInsertFile">插件</el-menu-item> <el-menu-item v-if="isTitleType === 3 && selectedCategory.arrangeType !== 1" index="2-8" @click="handleInsertFile">插件</el-menu-item>
@ -266,13 +290,19 @@
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
</div>
<div style="height: 30px; line-height: 30px; padding: 0 20px;"> <span v-if="(isTitleType !== 2 && selectedCategory.arrangeType === 3 ) || ((isTitleType === 4 || isTitleType === 6) && selectedCategory.arrangeType === 2) || (isTitleType === 6 && selectedCategory.arrangeType === 1)">{{ test }}</span></div>
</div> </div>
</template> </template>
<script> <script>
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 { FetchArchivesClassTree } from '@/api/system/archivesClass'
import { FetchDictionaryTree } from '@/api/system/dict'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
// import { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
import PreviewForm from '@/views/components/category/PreviewForm' import PreviewForm from '@/views/components/category/PreviewForm'
import UploadOriginal from './uploadOriginal/index' import UploadOriginal from './uploadOriginal/index'
import BlukImport from './bulkImport/index' import BlukImport from './bulkImport/index'
@ -287,9 +317,10 @@ 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 { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
export default { export default {
name: 'CollectHeader', name: 'CollectHeader',
components: { 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],
props: { props: {
selectedCategory: { selectedCategory: {
@ -335,6 +366,12 @@ export default {
formVisible: false, formVisible: false,
formTitle: '项目', formTitle: '项目',
formPreviewData: [], // data formPreviewData: [], // data
query: {
projectClass: null,
classify: null
},
projectOptions: [],
classifyOptions: [],
deleteVisible: false, deleteVisible: false,
moveVisible: false, moveVisible: false,
updateVisible: false, updateVisible: false,
@ -346,7 +383,7 @@ export default {
recoverVisible: false, recoverVisible: false,
completelyDeleteVisible: false, completelyDeleteVisible: false,
parentsId: null, // id parentsId: null, // id
isDesFormType: null //
isDesFormType: 'arcives' //
} }
}, },
computed: { computed: {
@ -394,11 +431,92 @@ export default {
return '输入项目名称或编号' return '输入项目名称或编号'
} }
}, },
watch: {
selectedCategory: function(newValue, oldValue) {
if (newValue && newValue.id) {
this.getInitArchivesClass()
this.getDictsList()
}
}
},
created() { created() {
}, },
mounted() { mounted() {
this.getInitArchivesClass()
this.getDictsList()
}, },
methods: { methods: {
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
}
},
getDictsList() {
this.projectOptions = []
FetchDictionaryTree().then((res) => {
console.log(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.isTitleType === 3) {
this.projectOptions = filteredItems
console.log(this.projectOptions)
} else {
this.projectOptions = 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) {
delete node.childDictionarys
}
return {
id: node.dictionaryCode,
label: node.dictionaryName,
children: node.childDictionarys,
isDisabled: this.isTitleType === 3 ? node.level !== 3 : node.level === 1
}
},
handleSelect(key, keyPath) { handleSelect(key, keyPath) {
console.log(key, keyPath) console.log(key, keyPath)
}, },
@ -526,14 +644,35 @@ export default {
} }
this.$refs.blukEditingRef.bulkEditingVisible = true this.$refs.blukEditingRef.bulkEditingVisible = true
}, },
//
handleAdjustment() {
this.$refs.fileNumberAdjustmentRef.isType = this.isTitleType
if (this.selections.length === 0) {
this.$refs.fileNumberAdjustmentRef.adjustmentTipVisible = true
// /
handleAdjustment(type) {
if (this.selections.length < 2) {
this.$message('请选择多个案卷后进行操作!')
return false
}
if (type === 'anjuan') {
this.$refs.fileNumberAdjustmentRef.titleAdjustment = '案卷顺序调整'
} else { } else {
this.$refs.fileNumberAdjustmentRef.titleAdjustment = '文件顺序调整'
}
this.$refs.fileNumberAdjustmentRef.adjustmentVisible = true this.$refs.fileNumberAdjustmentRef.adjustmentVisible = true
// if (this.selections.length === 0) {
// this.$refs.fileNumberAdjustmentRef.adjustmentTipVisible = true
// } else {
// this.$refs.fileNumberAdjustmentRef.adjustmentVisible = true
// }
},
//
handleJnSeqAdjustment() {
if (this.selections.length === 0) {
this.$message('您还未勾选需要操作的条目,请先确认!')
return false
} }
if (this.selections.length > 1) {
this.$message('顺序调整操作只可勾选唯一目标条目,请先确认!')
return false
}
this.$refs.fileSeqAdjustmentRef.adjustmentVisible = true
}, },
// //
handleFileNumberUpdate() { handleFileNumberUpdate() {
@ -546,18 +685,6 @@ export default {
handleUpdateConfirm() { handleUpdateConfirm() {
this.updateVisible = false this.updateVisible = false
}, },
//
handleFileSeqAdjustment() {
if (this.selections.length === 0) {
this.$message('您还未勾选需要操作的条目,请先确认!')
return false
}
if (this.selections.length > 1) {
this.$message('顺序调整操作只可勾选唯一目标条目,请先确认!')
return false
}
this.$refs.fileSeqAdjustmentRef.adjustmentVisible = true
},
// //
handleUncoil() { handleUncoil() {
if (this.selections.length === 0) { if (this.selections.length === 0) {
@ -702,4 +829,18 @@ export default {
</script> </script>
<style lang='scss' scoped> <style lang='scss' scoped>
.collect-filter{
display: flex;
// width: 360px;
height: 32px;
justify-content: flex-end;
::v-deep .vue-treeselect{
font-size: 12px;
margin-right: 10px !important;
.vue-treeselect__control{
height: 33px !important;
}
}
}
</style> </style>

123
src/views/collectReorganizi/collectionLibrary/module/fileNumberAdjustment/index.vue

@ -1,7 +1,7 @@
<template> <template>
<!-- 档号调整 -->
<!-- 文件顺序调整 -->
<div> <div>
<el-dialog class="tip-dialog" title="提示" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="adjustmentTipVisible">
<!-- <el-dialog class="tip-dialog" title="提示" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="adjustmentTipVisible">
<div class="setting-dialog"> <div class="setting-dialog">
<div class="tip-content"> <div class="tip-content">
<p class="tipMsg">您未勾选条目否则直接选择所有条目</p> <p class="tipMsg">您未勾选条目否则直接选择所有条目</p>
@ -12,10 +12,10 @@
<el-button type="primary" @click.native="handleComfireAdjustment">确定</el-button> <el-button type="primary" @click.native="handleComfireAdjustment">确定</el-button>
</div> </div>
</div> </div>
</el-dialog>
</el-dialog> -->
<el-dialog class="adjust-dialog" title="档案调整" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="adjustmentVisible">
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
<el-dialog class="adjust-dialog" :title="titleAdjustment" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="adjustmentVisible">
<!-- <el-form ref="form" :model="form" :rules="rules" label-width="110px">
<div style="display: flex; justify-content: flex-start;"> <div style="display: flex; justify-content: flex-start;">
<el-form-item label="需要调整字段" prop="adjustFields"> <el-form-item label="需要调整字段" prop="adjustFields">
<el-select v-model="form.adjustFields" placeholder="请选择" style="width: 225px;"> <el-select v-model="form.adjustFields" placeholder="请选择" style="width: 225px;">
@ -28,7 +28,6 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="起始值" prop="initialValue"> <el-form-item label="起始值" prop="initialValue">
<!-- <el-input v-model="form.initialValue" style="width: 225px;" /> -->
<el-input-number <el-input-number
v-model.number="form.initialValue" v-model.number="form.initialValue"
:min="0" :min="0"
@ -51,7 +50,8 @@
</el-form-item> </el-form-item>
<el-button class="adjust-submit" type="primary">调整</el-button> <el-button class="adjust-submit" type="primary">调整</el-button>
</div> </div>
</el-form>
</el-form> -->
<i class="drag-tip">提示请通过拖动鼠标来调整当前顺序</i>
<el-table :data="tableData" style="width: 100%"> <el-table :data="tableData" style="width: 100%">
<el-table-column prop="number" label="题名" width="120" /> <el-table-column prop="number" label="题名" width="120" />
<el-table-column prop="operator" label="档号" width="120" /> <el-table-column prop="operator" label="档号" width="120" />
@ -90,44 +90,45 @@ export default {
}, },
data() { data() {
return { return {
adjustmentTipVisible: false,
// adjustmentTipVisible: false,
adjustmentVisible: false, adjustmentVisible: false,
form: {
adjustFields: '',
initialValue: undefined,
codeFields: '档号'
},
fieldsOptions: [
],
codeFieldsOptions: [
{
value: '1',
label: '档号'
}
],
rules: {
adjustFields: [
{ required: true, message: '请输入需调整的字段', trigger: 'change' }
],
initialValue: [
{ required: true, message: '请输入起始值', trigger: 'blur' }
]
},
// form: {
// adjustFields: '',
// initialValue: undefined,
// codeFields: ''
// },
// fieldsOptions: [
// ],
// codeFieldsOptions: [
// {
// value: '1',
// label: ''
// }
// ],
// rules: {
// adjustFields: [
// { required: true, message: '', trigger: 'change' }
// ],
// initialValue: [
// { required: true, message: '', trigger: 'blur' }
// ]
// },
titleAdjustment: '',
tableData: [], tableData: [],
page: { page: {
page: 1, page: 1,
size: 10, size: 10,
total: 0 total: 0
},
isType: 2
}
// isType: 2
} }
}, },
watch: { watch: {
selectedCategory: function(newValue, oldValue) { selectedCategory: function(newValue, oldValue) {
this.changeOptions(this.isType)
// this.changeOptions(this.isType)
}, },
isType(newVal) { isType(newVal) {
this.changeOptions(newVal)
// this.changeOptions(newVal)
} }
}, },
created() { created() {
@ -135,34 +136,34 @@ export default {
mounted() { mounted() {
}, },
methods: { methods: {
changeOptions(value) {
if (value === 3) {
if (this.selectedCategory.isType === 5) {
this.fieldsOptions = [{
value: '目录号',
label: '目录号'
},
{
value: '件号',
label: '件号'
}]
} else {
this.fieldsOptions = [{
value: '案卷号',
label: '案卷号'
}]
}
} else if (value === 4) {
this.fieldsOptions = [{
value: '卷内顺序号',
label: '卷内顺序号'
},
{
value: '目录号',
label: '目录号'
}]
}
},
// changeOptions(value) {
// if (value === 3) {
// if (this.selectedCategory.isType === 5) {
// this.fieldsOptions = [{
// value: '',
// label: ''
// },
// {
// value: '',
// label: ''
// }]
// } else {
// this.fieldsOptions = [{
// value: '',
// label: ''
// }]
// }
// } else if (value === 4) {
// this.fieldsOptions = [{
// value: '',
// label: ''
// },
// {
// value: '',
// label: ''
// }]
// }
// },
handleComfireAdjustment() { handleComfireAdjustment() {
this.adjustmentTipVisible = false this.adjustmentTipVisible = false
this.adjustmentVisible = true this.adjustmentVisible = true

9
src/views/collectReorganizi/collectionLibrary/module/fileSeqAdjustment/index.vue

@ -17,7 +17,6 @@
<el-button type="primary" @click.native="handleSort">确定</el-button> <el-button type="primary" @click.native="handleSort">确定</el-button>
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
@ -140,12 +139,4 @@ export default {
flex: 1; flex: 1;
} }
} }
.drag-tip {
display: block;
padding-left: 20px;
padding-bottom: 10px;
font-style: normal;
font-weight: bold;
font-size: 12px;
}
</style> </style>

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

@ -59,6 +59,9 @@ 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: 'Project', name: 'Project',
components: { CollectHeader, ArchivesInfo }, components: { CollectHeader, ArchivesInfo },
@ -99,6 +102,8 @@ export default {
} }
}, },
created() { created() {
this.tableDisplayFields = tableData.data
this.projectData = jsonData.data.list.content
}, },
mounted() { mounted() {
}, },
@ -147,7 +152,7 @@ export default {
clearTimeout(this.timer) clearTimeout(this.timer)
} }
this.timer = setTimeout(() => { this.timer = setTimeout(() => {
this.openAnjuan(row.item_no)
this.openAnjuan('所属项目' + row.archive_no)
}, 300) }, 300)
this.selections = this.crud.selections this.selections = this.crud.selections
}, },

19
src/views/components/BindingTagDlg.vue

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<el-dialog ref="bindingTagDialog" class="bindingDialog" :title="bindingTitle" :visible.sync="bindingVisible" :close-on-click-modal="false" :before-close="handleClose" @opened="opened">
<el-dialog ref="bindingTagDialog" class="bindingDialog" :title="bindingTitle" :visible.sync="bindingVisible" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :before-close="handleClose" @opened="opened">
<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">
@ -10,7 +10,7 @@
<el-input v-model="tidCode" placeholder="请输入内容" /> <el-input v-model="tidCode" placeholder="请输入内容" />
</div> </div>
<div v-else class="binding-flow"> <div v-else class="binding-flow">
<div class="step-item">
<div class="step-item" :class="{ 'step-active': 1 <= step, 'step-loading': 2 === step }">
<!-- step-active 完成 step-loading 进行种 --> <!-- step-active 完成 step-loading 进行种 -->
<span class="step-left-num" :class="{ 'step-active': 1 <= step, 'step-loading': 1 === step }">1</span> <span class="step-left-num" :class="{ 'step-active': 1 <= step, 'step-loading': 1 === step }">1</span>
<div class="step-right-cont"> <div class="step-right-cont">
@ -20,11 +20,8 @@
<!-- err: 当前电脑未绑定读写器请到档案设备里进行绑定 --> <!-- err: 当前电脑未绑定读写器请到档案设备里进行绑定 -->
</div> </div>
</div> </div>
<div class="step-item">
<div class="step-item" :class="{ 'step-active': 2 <= step, 'step-loading': 3 === step }">
<span class="step-left-num" :class="{ 'step-active': 2 <= step, 'step-loading': 2 === step }">2</span> <span class="step-left-num" :class="{ 'step-active': 2 <= step, 'step-loading': 2 === step }">2</span>
<div class="pulse1" />
<div class="pulse2" />
<div class="pulse3" />
<div class="step-right-cont"> <div class="step-right-cont">
<p class="step-title">第二步<span>放入标签</span></p> <p class="step-title">第二步<span>放入标签</span></p>
<p class="step-tip" :class="{ 'tip-error': 2 === errorStep, 'tip-active': 2 <= step }">{{ step2Message }}</p> <p class="step-tip" :class="{ 'tip-error': 2 === errorStep, 'tip-active': 2 <= step }">{{ step2Message }}</p>
@ -33,7 +30,7 @@
<!-- err: 未读取到标签请重新放入 --> <!-- err: 未读取到标签请重新放入 -->
</div> </div>
</div> </div>
<div class="step-item">
<div class="step-item" :class="{ 'step-active': 3 <= step, 'step-loading': 4 === step }">
<span class="step-left-num" :class="{ 'step-active': 3 <= step, 'step-loading': 3 === step }">3</span> <span class="step-left-num" :class="{ 'step-active': 3 <= step, 'step-loading': 3 === step }">3</span>
<div class="step-right-cont"> <div class="step-right-cont">
<p class="step-title">第三步<span>读取标签</span></p> <p class="step-title">第三步<span>读取标签</span></p>
@ -43,7 +40,7 @@
<!-- err: 当前标签存在多个请取出多余的标签只保留一张 --> <!-- err: 当前标签存在多个请取出多余的标签只保留一张 -->
</div> </div>
</div> </div>
<div class="step-item">
<div class="step-item" :class="{ 'step-active': 4 <= step, 'step-loading': 5 === step }">
<span class="step-left-num" :class="{ 'step-active': 4 <= step, 'step-loading': 4 === step }">4</span> <span class="step-left-num" :class="{ 'step-active': 4 <= step, 'step-loading': 4 === step }">4</span>
<div class="step-right-cont"> <div class="step-right-cont">
<p class="step-title">第四步<span>开始绑定</span></p> <p class="step-title">第四步<span>开始绑定</span></p>
@ -56,7 +53,7 @@
<!-- err: 绑定失败请拿走当前标签 --> <!-- err: 绑定失败请拿走当前标签 -->
</div> </div>
</div> </div>
<div class="step-item">
<div class="step-item" :class="{ 'step-active': 5 === step }">
<span class="step-left-num" :class="{ 'step-active': 5 === step }">5</span> <span class="step-left-num" :class="{ 'step-active': 5 === step }">5</span>
<div class="step-right-cont"> <div class="step-right-cont">
<p class="step-title">第五步<span>绑定成功</span></p> <p class="step-title">第五步<span>绑定成功</span></p>
@ -117,7 +114,7 @@ export default {
bindingVisible: false, // bindingVisible: false, //
tidCode: '', tidCode: '',
coverBindingVisible: false, coverBindingVisible: false,
step: 1,
step: 3,
errorStep: 0, errorStep: 0,
step1Message: '连接中', step1Message: '连接中',
step2Message: '请放入标签', step2Message: '请放入标签',
@ -282,7 +279,7 @@ export default {
reject('获取mac地址失败') reject('获取mac地址失败')
} else { } else {
const dev = await RFID.getDeviceIdByMac(mac) const dev = await RFID.getDeviceIdByMac(mac)
if (!dev || dev === {} || !dev.deviceId) {
if (!dev || dev === JSON.stringify({}) || !dev.deviceId) {
this.step1Message = '当前电脑未绑定读写器,请到档案设备里进行绑定' this.step1Message = '当前电脑未绑定读写器,请到档案设备里进行绑定'
this.errorStep = 1 this.errorStep = 1
reject('当前电脑未绑定读写器,请到档案设备里进行绑定') reject('当前电脑未绑定读写器,请到档案设备里进行绑定')

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

@ -31,7 +31,7 @@
:rows="item.isInputClass === 'textarea' ? 3 : ''" :rows="item.isInputClass === 'textarea' ? 3 : ''"
:class="{'input-popover':(item.isInputClass === 'popover')}" :class="{'input-popover':(item.isInputClass === 'popover')}"
:style="{ width: item.editLength+'px'}" :style="{ width: item.editLength+'px'}"
:disabled="isDisabled"
:disabled="isDisabled || (item.fieldName === 'archival_category_code')"
:validate-event="!isDisabled" :validate-event="!isDisabled"
@keyup.enter.native="isRepeatHandle(item)" @keyup.enter.native="isRepeatHandle(item)"
@input="autoAddZero(item.isFilling, item.fieldName, addOrUpdateForm[item.fieldName], item.fillingDigit)" @input="autoAddZero(item.isFilling, item.fieldName, addOrUpdateForm[item.fieldName], item.fillingDigit)"
@ -257,7 +257,7 @@ export default {
delete node.childArchivesClass delete node.childArchivesClass
} }
return { return {
id: node.id,
id: node.name,
label: node.name, label: node.name,
children: node.childArchivesClass children: node.childArchivesClass
} }
@ -267,23 +267,11 @@ export default {
delete node.childMenus delete node.childMenus
} }
return { return {
id: node.id,
id: node.fondsName,
label: node.fondsName, label: node.fondsName,
children: node.childMenus children: node.childMenus
} }
}, },
//
// getNode(tree, dicName) {
// for (let i = 0; i < tree.length; i++) {
// if (tree[i].dicName === dicName) {
// return tree[i]
// } else {
// if (tree[i].childMenus) {
// return this.getNode(tree[i].childMenus, dicName)
// }
// }
// }
// },
// vue-treeSelectunknown // vue-treeSelectunknown
getAutoNameUnknown(name) { getAutoNameUnknown(name) {
if (name.lastIndexOf('unknown') > -1) { if (name.lastIndexOf('unknown') > -1) {
@ -307,6 +295,34 @@ export default {
}) })
return data return data
}, },
getFondsNode(list, fondsName) {
let data;
(list || []).map(item => {
if (item.fondsName === fondsName) {
data = [item]
} else {
const child = this.getFondsNode(item.childMenus, fondsName)
if (child) {
data = child
}
}
})
return data
},
getClassfiyNode(list, name) {
let data;
(list || []).map(item => {
if (item.name === name) {
data = [item]
} else {
const child = this.getClassfiyNode(item.childArchivesClass, name)
if (child) {
data = child
}
}
})
return data
},
// //
handleAuto() { handleAuto() {
let string = '' let string = ''
@ -317,33 +333,58 @@ export default {
} else { } else {
const fieldInfo = this.formPreviewData.find(element => element.fieldName === val.fieldName) const fieldInfo = this.formPreviewData.find(element => element.fieldName === val.fieldName)
if (fieldInfo.isInputClass === 'select' || fieldInfo.isInputClass === 'popover') { if (fieldInfo.isInputClass === 'select' || fieldInfo.isInputClass === 'popover') {
const params = {
'pid': fieldInfo.dictionaryId.id
}
await FetchSonDictionaryList(params).then(res => {
if (fieldInfo.mateData === 3) {
await FetchSonDictionaryList({ 'pid': fieldInfo.dictionaryId.id }).then(res => {
const option = this.getNode(res, this.addOrUpdateForm[val.fieldName]) const option = this.getNode(res, this.addOrUpdateForm[val.fieldName])
if (option) { if (option) {
const obj = {} const obj = {}
obj.name = val.fieldName obj.name = val.fieldName
obj.val = option[0].dictionaryCode + val.connector obj.val = option[0].dictionaryCode + val.connector
obj.sequence = val.sequence obj.sequence = val.sequence
// string += '' + option[0].dicCode + val.connector
getAutoFiledVal.push(obj) getAutoFiledVal.push(obj)
} }
}) })
}
if (fieldInfo.mateData === 1) {
await FetchFondsAll().then(res => {
const option = this.getFondsNode(res, this.addOrUpdateForm[val.fieldName])
if (option) {
const obj = {}
obj.name = val.fieldName
obj.val = option[0].fondsNo + val.connector
obj.sequence = val.sequence
getAutoFiledVal.push(obj)
}
})
}
if (fieldInfo.mateData === 2) {
let categoryId
if (this.isDesFormType !== 'mergeFile' && this.isDesFormType !== 'arcives') {
categoryId = this.selectedCategory.pid
} else {
categoryId = this.selectedCategory.id
}
await FetchArchivesClassTree({ 'categoryId': categoryId }).then(res => {
const option = this.getClassfiyNode(res, this.addOrUpdateForm[val.fieldName])
if (option) {
const obj = {}
obj.name = val.name
obj.val = option[0].code + val.connector
obj.sequence = val.sequence
getAutoFiledVal.push(obj)
}
})
}
} else { } else {
const obj = {} const obj = {}
obj.name = val.fieldName obj.name = val.fieldName
obj.val = this.addOrUpdateForm[val.fieldName] + val.connector obj.val = this.addOrUpdateForm[val.fieldName] + val.connector
obj.sequence = val.sequence obj.sequence = val.sequence
// string += '' + this.addOrUpdateForm[val.fieldName] + val.connector
getAutoFiledVal.push(obj) getAutoFiledVal.push(obj)
} }
} }
//
getAutoFiledVal.sort(this.compare('sequence')) getAutoFiledVal.sort(this.compare('sequence'))
string = getAutoFiledVal.map((item) => item.val).join('') string = getAutoFiledVal.map((item) => item.val).join('')
this.formPreviewData.map(item => { this.formPreviewData.map(item => {
if (item.isAutomatic) { if (item.isAutomatic) {
this.$set(this.addOrUpdateForm, item.fieldName, string) this.$set(this.addOrUpdateForm, item.fieldName, string)
@ -363,7 +404,7 @@ export default {
FetchNoFormatField(categoryId) { FetchNoFormatField(categoryId) {
getNoFormatField({ categoryId: categoryId }).then(res => { getNoFormatField({ categoryId: categoryId }).then(res => {
this.autoMatic = res this.autoMatic = res
// this.handleAuto()
this.handleAuto()
}) })
}, },
// //
@ -495,6 +536,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)
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()
@ -510,7 +552,13 @@ export default {
}, },
// tree - select // tree - select
selectTree(val) { selectTree(val) {
if (val.fondsNo) {
this.addOrUpdateForm[this.treeCurrentFiled.fieldName] = val.fondsName
} else if (val.code) {
this.addOrUpdateForm[this.treeCurrentFiled.fieldName] = val.name
} 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('this.treeCurrentFiled.fieldName', this.treeCurrentFiled.fieldName)
console.log('val', val) console.log('val', val)
console.log('val.dictionaryName', val.dictionaryName) console.log('val.dictionaryName', val.dictionaryName)
@ -537,6 +585,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)
if (index !== -1) { if (index !== -1) {
this.handleAuto() this.handleAuto()
} }
@ -563,9 +612,6 @@ export default {
this.popoverVisible = false this.popoverVisible = false
this.popoverClassifyVisible = false this.popoverClassifyVisible = false
this.popoverFondsVisible = false this.popoverFondsVisible = false
// this.popoverTableData = []
// this.popoverTableDataClassify = []
// this.popoverTableDataFonds = []
if (this.isDesFormType !== 'prearchiveLibrary' && this.isDesFormType !== 'mergeFile') { if (this.isDesFormType !== 'prearchiveLibrary' && this.isDesFormType !== 'mergeFile') {
const index = this.autoMatic.findIndex(i => this.currentFieldName === i.fieldName) const index = this.autoMatic.findIndex(i => this.currentFieldName === i.fieldName)
@ -585,10 +631,31 @@ export default {
this.addOrUpdateForm[fieldName] = value.toString().padStart(fillingDigit, '0').slice(-1 * fillingDigit) this.addOrUpdateForm[fieldName] = value.toString().padStart(fillingDigit, '0').slice(-1 * fillingDigit)
} }
}, },
// pid
findNodeById(node, targetId) {
if (node.id === targetId) {
return node
}
if (node.children && node.children.length > 0) {
for (const child of node.children) {
const result = this.findNodeById(child, targetId)
if (result) {
return result
}
}
}
return null
},
// //
editFormRow() { editFormRow() {
this.rules = {} this.rules = {}
console.log(this.formPreviewData)
// if (this.isDesFormType !== 'mergeFile' && this.isDesFormType !== 'arcives') {
// targetId = this.selectedCategory.pid
// } else {
// targetId = this.selectedCategory.id
// }
this.formPreviewData.map(item => { this.formPreviewData.map(item => {
if (item.isInputClass === 'select') { if (item.isInputClass === 'select') {
this.$set(item, 'options', []) this.$set(item, 'options', [])
@ -602,6 +669,21 @@ export default {
this.$set(this.addOrUpdateForm, item.fieldName, null) // unkonwn this.$set(this.addOrUpdateForm, item.fieldName, null) // unkonwn
} }
} }
if (item.fieldName === 'archival_category_code') {
let targetNode
if (this.isDesFormType !== 'mergeFile' && this.isDesFormType !== 'arcives') {
const targetId = this.selectedCategory.pid
targetNode = this.findNodeById(this.crud.data[0], targetId)
} else {
targetNode = this.selectedCategory
}
if (targetNode) {
this.$set(this.addOrUpdateForm, item.fieldName, targetNode.code)
} else {
this.$set(this.addOrUpdateForm, item.fieldName, '')
}
}
this.$set(this.rules, item.fieldName, [ this.$set(this.rules, item.fieldName, [
{ {
required: !!item.isRequired, required: !!item.isRequired,
@ -870,6 +952,10 @@ export default {
::v-deep .el-form-item--small .el-form-item__content { ::v-deep .el-form-item--small .el-form-item__content {
line-height: 30px; line-height: 30px;
} }
::v-deep .el-input.is-disabled .el-input__inner{
background-color: #f5f7fa;
color: #c0c4cc;
}
} }
.preview-form-bottom{ .preview-form-bottom{
padding: 20px 20px 0 20px; padding: 20px 20px 0 20px;

2
src/views/components/category/SettingForm.vue

@ -169,7 +169,7 @@ export default {
const rules = { const rules = {
fieldCnName: [ fieldCnName: [
{ required: true, message: '请输入中文名称', trigger: 'blur' }, { required: true, message: '请输入中文名称', trigger: 'blur' },
{ max: 7, message: '最大长度7个字符', trigger: 'blur' }
{ max: 10, message: '最大长度10个字符', trigger: 'blur' }
], ],
fieldName: [ fieldName: [
{ required: true, message: '请选择字段标识', trigger: 'blur' }, { required: true, message: '请选择字段标识', trigger: 'blur' },

64
src/views/system/archivesCategory/publicScreening/index.vue

@ -16,7 +16,7 @@
<el-form ref="form" inline :model="form" :rules="rules" size="small" label-width="90px"> <el-form ref="form" inline :model="form" :rules="rules" size="small" label-width="90px">
<el-form-item label="筛选项" prop="fieldId"> <el-form-item label="筛选项" prop="fieldId">
<el-select v-model="form.fieldId" style="width: 580px;"> <el-select v-model="form.fieldId" style="width: 580px;">
<el-option v-for="item in selectOptions" :key="item.id" :label="item.name" :value="item.id" />
<el-option v-for="item in selectOptions" :key="item.dictionaryId" :label="item.dictionaryName" :value="item.dictionaryId" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -38,11 +38,11 @@
@selection-change="crud.selectionChangeHandler" @selection-change="crud.selectionChangeHandler"
> >
<el-table-column type="selection" width="55" /> <el-table-column type="selection" width="55" />
<el-table-column :show-overflow-tooltip="true" prop="username" label="字段名称" />
<el-table-column prop="nickName" label="字段标识" />
<el-table-column prop="createTime" label="创建日期" width="200px">
<el-table-column :show-overflow-tooltip="true" prop="categoryId" label="字段名称" />
<el-table-column prop="fieldId" label="字段标识" />
<el-table-column prop="create_time" label="创建日期" width="200px">
<template slot-scope="scope"> <template slot-scope="scope">
<div>{{ scope.row.createTime | parseTime }}</div>
<div>{{ scope.row.create_time | parseTime }}</div>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -54,11 +54,12 @@
<script> <script>
import crudFilter from '@/api/system/category/filter' import crudFilter from '@/api/system/category/filter'
import { FetchInitArchivesClass } from '@/api/system/archivesClass'
// import { FetchInitArchivesClass } from '@/api/system/archivesClass'
import { FetchDictsList } from '@/api/system/dict'
import CRUD, { presenter, header, form } from '@crud/crud' import CRUD, { presenter, header, form } from '@crud/crud'
import pagination from '@crud/Pagination' import pagination from '@crud/Pagination'
const defaultForm = { id: null, fieldId: null }
const defaultForm = { categoryId: null, fieldId: null }
export default { export default {
name: 'PublicScreening', name: 'PublicScreening',
@ -90,32 +91,23 @@ export default {
selectOptions: [], selectOptions: [],
needRefreshTree: false, needRefreshTree: false,
rules: { rules: {
dicName: [
{ required: true, message: '请输入字典名称', trigger: 'blur' }
],
dicCode: [
{ required: true, message: '请输入字典代码', trigger: 'blur' }
],
isTop: [
{ required: true, message: '请选择是否为顶级节点', trigger: 'change' }
],
sequence: [
{ required: true, message: '请输入序号', trigger: 'blur', type: 'number' }
fieldId: [
{ required: true, message: '请选择筛选项', trigger: 'change' }
] ]
} }
} }
}, },
created() { created() {
this.getInitArchivesClass()
this.getDictsList()
}, },
methods: { methods: {
getInitArchivesClass() {
const params = {
'categoryId': this.selectedCategory.id
}
FetchInitArchivesClass(params).then((res) => {
getDictsList() {
FetchDictsList().then((res) => {
console.log(res) console.log(res)
this.selectOptions = res.content
//
const filterCodes = ['retention', 'security_class', 'doc_type', 'medium_type', 'organ_or_function']
const filteredItems = res.content.filter(item => filterCodes.includes(item.dictionaryCode))
this.selectOptions = filteredItems
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
}) })
@ -128,6 +120,7 @@ export default {
}, },
// //
[CRUD.HOOK.beforeRefresh]() { [CRUD.HOOK.beforeRefresh]() {
this.crud.query.categoryId = this.selectedCategory.id
}, },
[CRUD.HOOK.afterRefresh](crud) { [CRUD.HOOK.afterRefresh](crud) {
if (this.needRefreshTree) { if (this.needRefreshTree) {
@ -135,16 +128,33 @@ export default {
this.$emit('treeRefresh', crud.data) this.$emit('treeRefresh', crud.data)
} }
}, },
//
[CRUD.HOOK.afterValidateCU](crud) {
crud.form.categoryId = this.selectedCategory.id
console.log(crud.form)
return true
},
toDelete(datas) { toDelete(datas) {
console.log(this.crud) console.log(this.crud)
this.crud.delAllLoading = true
this.$confirm('此操作将删除当前所选字段' + '<span>你是否还要继续?</span>', '提示', { this.$confirm('此操作将删除当前所选字段' + '<span>你是否还要继续?</span>', '提示', {
confirmButtonText: '继续', confirmButtonText: '继续',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
dangerouslyUseHTMLString: true dangerouslyUseHTMLString: true
}).then(() => { }).then(() => {
this.crud.delAllLoading = true
this.crud.doDelete(datas)
const ids = []
datas.forEach(val => {
ids.push(val.id)
})
crudFilter.del(ids).then(() => {
this.crud.notify('删除成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.crud.delAllLoading = false
this.crud.refresh()
}).catch(err => {
this.crud.delAllLoading = false
console.log(err)
})
}).catch(() => { }).catch(() => {
}) })
} }

Loading…
Cancel
Save