Browse Source

档案门类树修改/收集库装盒

master
xuhuajiao 9 months ago
parent
commit
7d32361eed
  1. 10
      src/assets/styles/yxk-admin.scss
  2. 225
      src/views/archivesManage/managementLibrary/index.vue
  3. 12
      src/views/archivesManage/managementLibrary/mixins/index.js
  4. 2
      src/views/archivesManage/managementLibrary/module/collectHeader.vue
  5. 4
      src/views/archivesManage/managementLibrary/module/packingBox/index.vue
  6. 222
      src/views/collectReorganizi/collectionLibrary/index.vue
  7. 61
      src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue
  8. 457
      src/views/collectReorganizi/collectionLibrary/module/packingBox/index.vue
  9. 2
      src/views/components/archivesListModule/index.vue
  10. 87
      src/views/system/groupManage/index.vue
  11. 46
      src/views/system/user/index.vue

10
src/assets/styles/yxk-admin.scss

@ -1338,19 +1338,21 @@ input[type ='number'] {
.iconFolder{
display: inline-block;
width: 17px;
// width: 17px;
height: 17px;
padding-left: 22px;
background: url('~@/assets/images/icon/tree-01.png') no-repeat left center;
background-size: contain;
background-size: 17px 17px;
// background-size: contain;
}
.iconArch{
display: inline-block;
width: 20px;
// width: 20px;
height: 20px;
padding-left: 22px;
background: url('~@/assets/images/icon/tree-02.png') no-repeat left center;
background-size: cover;
background-size: 20px 20px;
// background-size: cover;
}
.iconFile{

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

@ -10,19 +10,18 @@
<div class="tree-scroll">
<el-tree ref="categroyTree" v-loading="crud.loading" class="arc-tree arc-tree-01" :data="crud.data" :props="defaultProps" node-key="id" :expand-on-click-node="false" highlight-current @node-click="handleNodeClick">
<span slot-scope="{ node, data }" class="custom-tree-node">
<el-tooltip :content="node.label" placement="top" :enterable="false" effect="dark">
<span v-if="data.isType === 1 " class="iconFolder">
{{ data.cnName }}
<el-tooltip :content="node.label" placement="left" :enterable="false" effect="dark">
<span v-if="data.isType === 0">
{{ data.label }}
</span>
</el-tooltip>
<el-tooltip :content="node.label" placement="top" :enterable="false" effect="dark">
<span v-if="data.isType === 2" class="iconArch">
{{ data.cnName }}
<span v-if="data.isType === 1" class="iconFolder tree-text">
{{ data.label }}
</span>
</el-tooltip>
<el-tooltip :content="node.label" placement="top" :enterable="false" effect="dark">
<span v-if="data.isType === 3" class="iconFile">
{{ data.cnName }}
<span v-if="data.isType === 2" class="iconArch tree-text">
{{ data.label }}
</span>
<span v-if="data.isType === 3" class="iconFile tree-text">
{{ data.label }}
</span>
</el-tooltip>
</span>
@ -73,7 +72,7 @@
import crudCategory from '@/api/category/category'
import crudRoles from '@/api/system/role'
import { manageLibraryCrud } from './mixins/index'
import { FetchInitSearchFonds } from '@/api/archiveUtilize/archiveUtilize'
// import { FetchInitSearchFonds } from '@/api/archiveUtilize/archiveUtilize'
import { FetchDictionaryTreeByCategoryId } from '@/api/system/dict'
import { FetchIsAuthByLookType } from '@/api/archivesManage/library'
import CRUD, { presenter, header } from '@crud/crud'
@ -89,8 +88,9 @@ export default {
cruds() {
return [
CRUD({
title: '收集库', url: 'api/category/menu',
title: '管理库', url: 'api/category/fondMenu',
crudMethod: { ...crudCategory },
query: { page: null, size: null },
optShow: {
add: false,
edit: false,
@ -121,7 +121,7 @@ export default {
return {
defaultProps: {
children: 'children',
label: 'cnName'
label: 'label'
},
defaultClassifyProps: {
children: 'childDictionarys' || null,
@ -221,56 +221,113 @@ export default {
}
return null
},
//
expandParents(node) {
// el-tree
transformData(rawData) {
return rawData.map(item => {
return {
label: item.fondName,
isType: 0,
id: item.fondsId,
children: item.categoryList.map(category => {
return {
label: category.cnName,
id: category.id,
arrangeType: category.arrangeType,
isType: category.isType,
fondsId: item.fondsId,
children: this.transformChildren(category.children, item.fondsId)
}
})
}
})
},
//
transformChildren(children, fondsId) {
return children.map(child => {
return {
label: child.cnName,
id: child.id,
isType: child.isType,
pid: child.pid,
code: child.code,
arrangeType: child.arrangeType,
fondsId: fondsId,
children: child.children.length ? this.transformChildren(child.children, fondsId) : []
}
})
},
//
expandAllChildren(node, targetElement) {
node.expanded = true
if (node.parent) {
this.expandParents(node.parent)
//
if (node.childNodes && node.childNodes.length > 0) {
for (let i = 0; i < node.childNodes.length; i++) {
if (node.childNodes[i].data.id === targetElement.id) {
this.$refs.categroyTree.setCurrentKey(node.childNodes[i])
}
this.expandAllChildren(node.childNodes[i], targetElement)
}
}
},
//
findTopLevelNode(data, fondsId) {
for (let i = 0; i < data.length; i++) {
if (data[i].id === fondsId) {
return data[i]
}
}
return null
},
[CRUD.HOOK.afterRefresh]() {
this.crud.data = this.filterData(this.crud.data)
this.crud.data = this.filterData(this.transformData(this.crud.data))
console.log('this.crud.data', this.crud.data)
this.$nextTick(() => {
let currentKey
if (localStorage.getItem('currentArchivesKey')) {
if (localStorage.getItem('currentArchivesKey') !== null) {
currentKey = JSON.parse(localStorage.getItem('currentArchivesKey'))
//
if (this.$refs.categroyTree.getCurrentKey(currentKey.id) == null) {
localStorage.removeItem('currentArchivesKey')
}
//
this.topLevelNode = this.findTopLevelNode(this.crud.data, currentKey.fondsId)
//
if (this.topLevelNode) {
if (currentKey) {
//
if (currentKey.isType === 1) {
if (currentKey.children.length !== 0) {
currentKey = this.findNode(currentKey.children, (node) => {
currentKey = this.findNode(this.crud.data[0].children, (node) => {
return node.isType !== 1
})
}
}
this.expandAllChildren(this.$refs.categroyTree.getNode(this.topLevelNode), currentKey)
} else {
//
if (this.crud.data[0].isType === 1) {
currentKey = this.findNode(this.crud.data[0].children, (node) => {
return node.isType !== 1
})
this.defaultSetting(currentKey)
}
} else {
currentKey = this.crud.data[0]
this.defaultSetting(currentKey)
}
} else {
this.defaultSetting(currentKey)
}
if (currentKey && currentKey.id) {
//
this.$refs.categroyTree.setCurrentKey(currentKey.id)
this.$nextTick(() => {
//
const selectedKey = this.$refs.categroyTree.getCurrentNode()
if (this.$refs.categroyTree.getNode(selectedKey) && this.$refs.categroyTree.getNode(selectedKey).parent) {
this.expandParents(this.$refs.categroyTree.getNode(selectedKey).parent)
}
//
this.handleNodeClick(selectedKey)
this.handleNodeClick(currentKey)
})
}
})
},
defaultSetting(currentKey) {
if (this.crud.data[0].isType === 0) {
currentKey = this.findNode(this.crud.data[0].children, (node) => {
return node.isType !== 1
})
this.expandAllChildren(this.$refs.categroyTree.getNode(this.crud.data[0]), currentKey)
} else {
currentKey = this.crud.data[0]
this.expandAllChildren(this.$refs.categroyTree.getNode(this.crud.data[0]), currentKey)
}
},
handleNodeClick(val) {
this.smartQuery = {
// 'retention': null, //
@ -295,12 +352,13 @@ export default {
this.classifyTree = []
}
this.$nextTick(() => {
this.smartQuery.fonds_no = this.selectedCategory.fondsId
this.getDictsList()
FetchInitSearchFonds().then(res => {
const allFondsIds = res.map(item => item.fondsId)
// this.$refs.classifyTree.setCheckedKeys(allFondsIds)
this.smartQuery.fonds_no = allFondsIds.join(',')
})
// FetchInitSearchFonds().then(res => {
// const allFondsIds = res.map(item => item.fondsId)
// // this.$refs.classifyTree.setCheckedKeys(allFondsIds)
// this.smartQuery.fonds_no = allFondsIds.join(',')
// })
this.handlePageList()
// Promise.all(this.user.roles.map(item => this.getRole(item.id)))
// .then(roles => {
@ -386,29 +444,30 @@ export default {
'categoryId': categoryId
}
FetchDictionaryTreeByCategoryId(params).then((res) => {
let fonds
if (res.fonds.length <= 1) {
fonds = []
} else {
const parent = {}
parent.id = 0
parent.fondsName = '全宗'
parent.childDictionarys = res.fonds.map(item => {
return {
...item,
id: item.fondsId
}
})
fonds = parent
}
if (res.dictionarys.length === 0) {
this.classifyTree = []
if (fonds.length !== 0) {
this.classifyTree.push(fonds)
}
} else {
this.classifyTree = res.dictionarys.concat(fonds)
}
this.classifyTree = res.dictionarys
// let fonds
// if (res.fonds.length <= 1) {
// fonds = []
// } else {
// const parent = {}
// parent.id = 0
// parent.fondsName = ''
// parent.childDictionarys = res.fonds.map(item => {
// return {
// ...item,
// id: item.fondsId
// }
// })
// fonds = parent
// }
// if (res.dictionarys.length === 0) {
// this.classifyTree = []
// if (fonds.length !== 0) {
// this.classifyTree.push(fonds)
// }
// } else {
// this.classifyTree = res.dictionarys.concat(fonds)
// }
this.classifyLoading = false
}).catch(err => {
console.log(err)
@ -425,20 +484,21 @@ export default {
handleCheckChange(data, checked, indeterminate) {
//
const res = this.$refs.classifyTree.getCheckedNodes()
this.smartQuery.fonds_no = this.selectedCategory.fondsId
// const isFondsTop = res.some(obj => obj.fondsName === '')
// if (isFondsTop) {
// this.smartQuery.fonds_no = null
const fondsGroup = res.filter(item => item.fondsId).map(item => item.fondsId)
if (fondsGroup.length === 0) {
FetchInitSearchFonds().then(res => {
this.smartQuery.fonds_no = res.map(item => item.fondsId).join(',')
this.$nextTick(() => {
this.handlePageList('quickFilter')
})
})
} else {
this.smartQuery.fonds_no = fondsGroup.join(',')
}
// const fondsGroup = res.filter(item => item.fondsId).map(item => item.fondsId)
// if (fondsGroup.length === 0) {
// FetchInitSearchFonds().then(res => {
// this.smartQuery.fonds_no = res.map(item => item.fondsId).join(',')
// this.$nextTick(() => {
// this.handlePageList('quickFilter')
// })
// })
// } else {
// this.smartQuery.fonds_no = fondsGroup.join(',')
// }
// }
const groupedData = {}
@ -682,4 +742,15 @@ export default {
[data-theme=dark] .elect-cont-right {
margin-top: 0 !important;
}
.el-tree{
.el-tree-node__children{
.tree-text {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
width: 160px;
}
}
}
</style>

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

@ -110,8 +110,6 @@ export const manageLibraryCrud = {
})
},
getViewTableList(categoryLevel, parentsId, type) {
// console.log('888', this.smartQuery.fonds_no)
console.log('this.page.page', this.page.page)
const params = {
'parentId': parentsId,
'categoryId': this.selectedCategory.id,
@ -129,7 +127,7 @@ export const manageLibraryCrud = {
'fonds_no': this.smartQuery.fonds_no,
'project_class': this.query.project_class,
'archive_ctg_no': this.query.archive_ctg_no,
'page': this.page.page - 1,
'page': this.page.page === 0 ? 0 : this.page.page - 1,
'size': this.page.size,
'sort': this.arrySort
}
@ -147,6 +145,8 @@ export const manageLibraryCrud = {
}
if (type === 'search') {
projectObj.projectData = res.list.content
projectObj.page.page = 1
projectObj.page.size = 10
projectObj.page.total = res.list.totalElements
projectObj.getTableDisplayFieldsLoading = false
}
@ -162,6 +162,8 @@ export const manageLibraryCrud = {
// 搜索/新增/编辑 非 案卷是主页的时候
if (type === 'search') {
anjuanObj.anjuanData = res.list.content
anjuanObj.page.page = 1
anjuanObj.page.size = 10
anjuanObj.page.total = res.list.totalElements
anjuanObj.getTableDisplayFieldsLoading = false
}
@ -177,6 +179,8 @@ export const manageLibraryCrud = {
}
if (type === 'search') {
wjObj.anjuanData = res.list.content
wjObj.page.page = 1
wjObj.page.size = 10
wjObj.page.total = res.list.totalElements
wjObj.getTableDisplayFieldsLoading = false
}
@ -186,6 +190,8 @@ export const manageLibraryCrud = {
this.page.total = res.list.totalElements
if (type === 'search') {
this.parentsData.$refs.juanneiEle.junneiData = res.list.content
this.parentsData.$refs.fileEle.page.page = 1
this.parentsData.$refs.fileEle.page.size = 10
this.parentsData.$refs.juanneiEle.page.total = res.list.totalElements
this.parentsData.$refs.juanneiEle.getTableDisplayFieldsLoading = false
}

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

@ -744,10 +744,12 @@ export default {
return false
}
if (this.selectedCategory.arrangeType === 2) {
if (type === 1) {
if (this.selections.length > 1) {
this.$message({ message: '只可勾选唯一目标条目,请先确认!', offset: 8 })
return false
}
}
if (this.selections[0].child === 0) {
this.$message({ message: '当前选中的档案无相关卷内文件,不可装盒!', type: 'error', offset: 8 })
return

4
src/views/archivesManage/managementLibrary/module/packingBox/index.vue

@ -278,7 +278,7 @@ export default {
'isdel': false,
'page': 0,
'size': 100,
'sort': null,
'sort': this.arrySort,
'queryType': null,
'queryTitle': null,
'itemNo': null,
@ -414,7 +414,7 @@ export default {
if (res) {
this.arrySort = []
this.tableDisplayFields = res
const orderSortArry = this.tableDisplayFields.filter(item => item.displayOrder).sort((a, b) => a.displayOrder - b.displayOrder)
const orderSortArry = this.tableDisplayFields.filter(item => item.queue).sort((a, b) => a.queue - b.queue)
orderSortArry.forEach(item => {
if (item.displayOrderBy) {
this.arrySort.push(item.fieldName + ',' + item.displayOrderBy)

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

@ -10,19 +10,18 @@
<div class="tree-scroll">
<el-tree ref="categroyTree" v-loading="crud.loading" class="arc-tree arc-tree-01" :data="crud.data" :props="defaultProps" node-key="id" :expand-on-click-node="false" highlight-current @node-click="handleNodeClick">
<span slot-scope="{ node, data }" class="custom-tree-node">
<el-tooltip :content="node.label" placement="top" :enterable="false" effect="dark">
<span v-if="data.isType === 1 " class="iconFolder">
{{ data.cnName }}
<el-tooltip :content="node.label" placement="left" :enterable="false" effect="dark">
<span v-if="data.isType === 0">
{{ data.label }}
</span>
</el-tooltip>
<el-tooltip :content="node.label" placement="top" :enterable="false" effect="dark">
<span v-if="data.isType === 2" class="iconArch">
{{ data.cnName }}
<span v-if="data.isType === 1" class="iconFolder tree-text">
{{ data.label }}
</span>
</el-tooltip>
<el-tooltip :content="node.label" placement="top" :enterable="false" effect="dark">
<span v-if="data.isType === 3" class="iconFile">
{{ data.cnName }}
<span v-if="data.isType === 2" class="iconArch tree-text">
{{ data.label }}
</span>
<span v-if="data.isType === 3" class="iconFile tree-text">
{{ data.label }}
</span>
</el-tooltip>
</span>
@ -87,8 +86,9 @@ export default {
cruds() {
return [
CRUD({
title: '收集库', url: 'api/category/menu',
title: '收集库', url: 'api/category/fondMenu',
crudMethod: { ...crudCategory },
query: { page: null, size: null },
optShow: {
add: false,
edit: false,
@ -119,7 +119,7 @@ export default {
return {
defaultProps: {
children: 'children',
label: 'cnName'
label: 'label'
},
defaultClassifyProps: {
children: 'childDictionarys' || null,
@ -147,7 +147,8 @@ export default {
'fonds_no': null //
},
isTabFile: false,
fixedStatusBar: false
fixedStatusBar: false,
topLevelNode: null
}
},
computed: {
@ -206,56 +207,113 @@ export default {
}
return null
},
//
expandParents(node) {
//
expandAllChildren(node, targetElement) {
node.expanded = true
if (node.parent) {
this.expandParents(node.parent)
//
if (node.childNodes && node.childNodes.length > 0) {
for (let i = 0; i < node.childNodes.length; i++) {
if (node.childNodes[i].data.id === targetElement.id) {
this.$refs.categroyTree.setCurrentKey(node.childNodes[i])
}
this.expandAllChildren(node.childNodes[i], targetElement)
}
}
},
// el-tree
transformData(rawData) {
return rawData.map(item => {
return {
label: item.fondName,
isType: 0,
id: item.fondsId,
children: item.categoryList.map(category => {
return {
label: category.cnName,
id: category.id,
arrangeType: category.arrangeType,
isType: category.isType,
fondsId: item.fondsId,
children: this.transformChildren(category.children, item.fondsId)
}
})
}
})
},
//
transformChildren(children, fondsId) {
return children.map(child => {
return {
label: child.cnName,
id: child.id,
isType: child.isType,
pid: child.pid,
code: child.code,
arrangeType: child.arrangeType,
fondsId: fondsId,
children: child.children.length ? this.transformChildren(child.children, fondsId) : []
}
})
},
//
findTopLevelNode(data, fondsId) {
for (let i = 0; i < data.length; i++) {
if (data[i].id === fondsId) {
return data[i]
}
}
return null
},
[CRUD.HOOK.afterRefresh]() {
this.crud.data = this.filterData(this.crud.data)
this.crud.data = this.filterData(this.transformData(this.crud.data))
console.log('this.crud.data', this.crud.data)
this.$nextTick(() => {
let currentKey
if (localStorage.getItem('currentArchivesKey')) {
if (localStorage.getItem('currentArchivesKey') !== null) {
currentKey = JSON.parse(localStorage.getItem('currentArchivesKey'))
//
if (this.$refs.categroyTree.getCurrentKey(currentKey.id) == null) {
localStorage.removeItem('currentArchivesKey')
}
//
this.topLevelNode = this.findTopLevelNode(this.crud.data, currentKey.fondsId)
//
if (this.topLevelNode) {
if (currentKey) {
//
if (currentKey.isType === 1) {
if (currentKey.children.length !== 0) {
currentKey = this.findNode(currentKey.children, (node) => {
currentKey = this.findNode(this.crud.data[0].children, (node) => {
return node.isType !== 1
})
}
}
this.expandAllChildren(this.$refs.categroyTree.getNode(this.topLevelNode), currentKey)
} else {
//
if (this.crud.data[0].isType === 1) {
currentKey = this.findNode(this.crud.data[0].children, (node) => {
return node.isType !== 1
})
this.defaultSetting(currentKey)
}
} else {
currentKey = this.crud.data[0]
this.defaultSetting(currentKey)
}
} else {
this.defaultSetting(currentKey)
}
if (currentKey && currentKey.id) {
//
this.$refs.categroyTree.setCurrentKey(currentKey.id)
this.$nextTick(() => {
//
const selectedKey = this.$refs.categroyTree.getCurrentNode()
if (this.$refs.categroyTree.getNode(selectedKey) && this.$refs.categroyTree.getNode(selectedKey).parent) {
this.expandParents(this.$refs.categroyTree.getNode(selectedKey).parent)
}
//
this.handleNodeClick(selectedKey)
this.handleNodeClick(currentKey)
})
}
})
},
defaultSetting(currentKey) {
if (this.crud.data[0].isType === 0) {
currentKey = this.findNode(this.crud.data[0].children, (node) => {
return node.isType !== 1
})
this.expandAllChildren(this.$refs.categroyTree.getNode(this.crud.data[0]), currentKey)
} else {
currentKey = this.crud.data[0]
this.expandAllChildren(this.$refs.categroyTree.getNode(this.crud.data[0]), currentKey)
}
},
handleNodeClick(val) {
this.smartQuery = {
// 'retention': null, //
@ -282,8 +340,9 @@ export default {
}
this.$nextTick(() => {
this.smartQuery.fonds_no = this.selectedCategory.fondsId
this.getDictsList()
this.getFonds()
// this.getFonds()
this.handlePageList()
// Promise.all(this.user.roles.map(item => this.getRole(item.id)))
// .then(roles => {
@ -389,29 +448,30 @@ export default {
'categoryId': categoryId
}
FetchDictionaryTreeByCategoryId(params).then((res) => {
let fonds
if (res.fonds.length <= 1) {
fonds = []
} else {
const parent = {}
parent.id = 0
parent.fondsName = '全宗'
parent.childDictionarys = res.fonds.map(item => {
return {
...item,
id: item.fondsId
}
})
fonds = parent
}
if (res.dictionarys.length === 0) {
this.classifyTree = []
if (fonds.length !== 0) {
this.classifyTree.push(fonds)
}
} else {
this.classifyTree = res.dictionarys.concat(fonds)
}
this.classifyTree = res.dictionarys
// let fonds
// if (res.fonds.length <= 1) {
// fonds = []
// } else {
// const parent = {}
// parent.id = 0
// parent.fondsName = ''
// parent.childDictionarys = res.fonds.map(item => {
// return {
// ...item,
// id: item.fondsId
// }
// })
// fonds = parent
// }
// if (res.dictionarys.length === 0) {
// this.classifyTree = []
// if (fonds.length !== 0) {
// this.classifyTree.push(fonds)
// }
// } else {
// this.classifyTree = res.dictionarys.concat(fonds)
// }
this.classifyLoading = false
}).catch(err => {
console.log(err)
@ -428,20 +488,19 @@ export default {
handleCheckChange(data, checked, indeterminate) {
//
const res = this.$refs.classifyTree.getCheckedNodes()
// const isFondsTop = res.some(obj => obj.fondsName === '')
// if (isFondsTop) {
// this.smartQuery.fonds_no = null
const fondsGroup = res.filter(item => item.fondsId).map(item => item.fondsId)
if (fondsGroup.length === 0) {
FetchInitSearchFonds().then(res => {
this.smartQuery.fonds_no = res.map(item => item.fondsId).join(',')
this.$nextTick(() => {
this.handlePageList('quickFilter')
})
})
} else {
this.smartQuery.fonds_no = fondsGroup.join(',')
}
this.smartQuery.fonds_no = this.selectedCategory.fondsId
// const fondsGroup = res.filter(item => item.fondsId).map(item => item.fondsId)
// console.log('fondsGroup', fondsGroup)
// if (fondsGroup.length === 0) {
// this.smartQuery.fonds_no = this.selectedCategory.fondsId
// // FetchInitSearchFonds().then(res => {
// // this.smartQuery.fonds_no = res.map(item => item.fondsId).join(',')
// // this.$nextTick(() => {
// // this.handlePageList('quickFilter')
// // })
// // })
// } else {
// this.smartQuery.fonds_no = fondsGroup.join(',')
// }
const groupedData = {}
const securityId = this.getIdByCode('security_class')
@ -694,4 +753,15 @@ export default {
[data-theme=dark] .elect-cont-right {
margin-top: 0 !important;
}
.el-tree{
.el-tree-node__children{
.tree-text {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
width: 160px;
}
}
}
</style>

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

@ -106,6 +106,11 @@
<el-menu-item index="2-12" @click="handleQuickPaper">快速组卷</el-menu-item>
<el-menu-item index="2-13" @click="handlePaper">手工组卷</el-menu-item>
</el-menu-item-group>
<el-menu-item-group class="collect-submenu-group submenu-tree">
<template slot="title">档案装盒</template>
<el-menu-item index="2-2" @click="handlePackingBox(0)">装盒</el-menu-item>
<el-menu-item v-if="selectedCategory.arrangeType !== 1" index="2-3" @click="handlePackingBox(1)">分卷装盒</el-menu-item>
</el-menu-item-group>
</el-submenu>
<el-submenu index="3">
<template slot="title">
@ -202,6 +207,9 @@
<!-- 归档 -->
<ArchivesFilling ref="archivesFillingRef" :selected-category="selectedCategory" :collect-level="collectLevel" :selections="selections" @close-dialog="closeDialog" />
<!-- 装盒 / 分卷装盒 -->
<PackingBox ref="packingBox" :selected-category="selectedCategory" :selections="selections" :total-sum-all="totalSumAll" @close-dialog="closeDialog" />
</div>
<div style="display: flex; justify-content: space-between; 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)" style="font-size: 12px;">{{ test }}</span>
@ -232,6 +240,7 @@ import CollectMoveFile from './collectMoveFile/index'
import Print from './print/index'
import FourTest from './fourTest/index'
import QuickPaper from './quickPaper/index'
import PackingBox from './packingBox/index'
import ArchivesFilling from './archivesFilling/index'
import qs from 'qs'
import { downloadFile, exportFile } from '@/utils/index'
@ -239,7 +248,7 @@ import { mapGetters } from 'vuex'
export default {
name: 'CollectHeader',
components: { Treeselect, PreviewForm, UploadOriginal, BigUpload, BlukImport, BlukEditing, FileSeqAdjustment, CombineFile, InsertFile, CollectMoveFile, Print, FourTest, QuickPaper, ArchivesFilling },
components: { Treeselect, PreviewForm, UploadOriginal, BigUpload, BlukImport, BlukEditing, FileSeqAdjustment, CombineFile, InsertFile, CollectMoveFile, Print, FourTest, QuickPaper, PackingBox, ArchivesFilling },
mixins: [collectionLibraryCrud, crud()],
props: {
selectedCategory: {
@ -287,7 +296,8 @@ export default {
isDesFormType: 'arcives', //
arcId: null,
quickPaper: false,
quickPaperArcId: []
quickPaperArcId: [],
totalSumAll: 0
}
},
computed: {
@ -1071,6 +1081,53 @@ export default {
this.quickPaperArcId = this.selections.map(item => item.id)
this.handleForm('add', 1)
},
// /
handlePackingBox(type) {
if (this.selections.length === 0) {
this.$message({ message: '您还未勾选需要操作的条目,请先确认!', offset: 8 })
return false
}
if (this.selectedCategory.arrangeType === 2) {
if (type === 1) {
if (this.selections.length > 1) {
this.$message({ message: '只可勾选唯一目标条目,请先确认!', offset: 8 })
return false
}
}
if (this.selections[0].child === 0) {
this.$message({ message: '当前选中的档案无相关卷内文件,不可装盒!', type: 'error', offset: 8 })
return
}
}
if (this.selections[0].case_no) {
this.$message({ message: '当前档案已装盒,请勿重复操作!', type: 'error', offset: 8 })
return
}
// name
// const existsNotEmpty = this.selections.some(item => item.caseNum)
// if (existsNotEmpty) {
// this.$message('')
// return false
// }
this.$refs.packingBox.packingVisible = true
this.$refs.packingBox.isPackingOrPartType = type
this.$refs.packingBox.packFileCategory = this.parentsData.listCategory
if (type === 0) {
this.$refs.packingBox.packingTitle = '装盒'
} else {
this.$refs.packingBox.packingTitle = '分卷装盒'
this.$refs.packingBox.getViewTable()
}
this.getTotalSumAll()
},
getTotalSumAll() {
this.totalSumAll = 0
this.selections.map((item) => { if (!isNaN(item.child)) this.totalSumAll += item.child })
if (isNaN(this.totalSumAll)) {
return 0
}
return this.totalSumAll
},
//
handleOriginalDownload() {
if (this.selections.length > 1 || this.selections.length === 0) {

457
src/views/collectReorganizi/collectionLibrary/module/packingBox/index.vue

@ -0,0 +1,457 @@
<template>
<el-dialog class="partPackingDialog" :title="packingTitle" :visible.sync="packingVisible" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :before-close="handleClose">
<div class="setting-dialog">
<div class="packing-head">
<div class="head-search">
<!-- 搜索 -->
<el-input v-model="caseQuery[inputSelect]" clearable size="small" placeholder="请输入搜索关键字" style="width: 245px; margin-right: 10px;" class="input-prepend filter-item" @keyup.enter.native="getCaseList" @clear="clearTableData">
<el-select slot="prepend" v-model="inputSelect" style="width: 90px" @change="querySelect">
<el-option
v-for="item in queryOption"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-input>
<el-button class="filter-item filter-search" size="mini" type="success" icon="el-icon-search" @click="getCaseList">搜索</el-button>
<el-button class="filter-rfid" type="success" disabled><i class="iconfont icon-duqu" />读取</el-button>
</div>
<div class="selct-data-head">
<p v-if="selectedCategory.arrangeType === 1">数据来源文件<span>{{ selections.length }}</span>条数据</p>
<!-- totalSumAll -->
<p v-else>数据来源案卷<span>{{ selections.length }}</span>条数据 卷内<span>{{ totalSumAll }}</span>条数据</p>
</div>
</div>
<!--表格渲染-->
<!-- 装盒 -->
<el-table
v-if="!isPackingOrPartType"
ref="table"
:data="tableData"
style="min-width: 100%"
height="calc(100vh - 382px)"
>
<el-table-column prop="create_date" label="操作" width="80" align="center">
<template slot-scope="scope">
<el-button class="packing-handle-btn iconfont" @click="handleCartoning(scope.row)"><svg-icon icon-class="zhuanghe" class="svg-arc-style" />装盒</el-button>
</template>
</el-table-column>
<el-table-column prop="caseCode" label="盒号" min-width="120" align="center" />
<el-table-column prop="caseName" label="盒名称" min-width="120" align="center" />
<el-table-column prop="depositNum" label="已装" min-width="60" align="center" />
<el-table-column prop="tid" label="TID" min-width="120" align="center" />
<el-table-column prop="barcode" label="条形码" min-width="120" align="center" />
<el-table-column prop="caseRetention" label="保管期限" min-width="100" align="center" />
<el-table-column prop="caseClass" label="密级" min-width="100" align="center" />
<el-table-column prop="caseFonds" label="全宗" min-width="100" align="center" />
<el-table-column prop="category" label="所属门类" min-width="100" align="center" />
<el-table-column prop="classify" label="所属分类" min-width="100" align="center" />
</el-table>
<!-- 分卷 -->
<div v-else class="part-packing-cont">
<div class="part-packing-item">
<h5 class="part-packing-title">盒列表-待选</h5>
<el-table
ref="table"
class="custom-table"
:data="tableData"
style="width: 100%"
height="calc(100vh/2 - 200px)"
>
<el-table-column prop="create_date" label="操作" width="80" align="center">
<template slot-scope="scope">
<el-button class="packing-handle-btn iconfont" @click="handlePartParking(scope.row,scope.$index)"><svg-icon icon-class="zhuanghe" class="svg-arc-style" />装盒</el-button>
</template>
</el-table-column>
<el-table-column prop="caseCode" label="盒号" min-width="120" align="center" />
<el-table-column prop="caseName" label="盒名称" min-width="120" align="center" />
<el-table-column prop="depositNum" label="已装" min-width="100" align="center" />
<el-table-column prop="tid" label="TID" min-width="120" align="center" />
<el-table-column prop="barcode" label="条形码" min-width="120" align="center" />
<el-table-column prop="caseRetention" label="保管期限" min-width="100" align="center" />
<el-table-column prop="caseClass" label="密级" min-width="100" align="center" />
<el-table-column prop="caseFonds" label="全宗" min-width="100" align="center" />
<el-table-column prop="category" label="所属门类" min-width="100" align="center" />
<el-table-column prop="classify" label="所属分类" min-width="100" align="center" />
</el-table>
</div>
<div class="part-packing-item">
<h5 class="part-packing-title">盒列表-已选</h5>
<el-table
ref="selectBox"
class="custom-table"
:data="selectTableData"
height="calc(100vh/2 - 200px)"
>
<el-table-column prop="create_date" label="操作" align="center">
<template slot-scope="scope">
<el-button class="packing-recall-btn iconfont" @click="cancelParking(scope.row,scope.$index)"><svg-icon icon-class="chehui" class="svg-arc-style" />撤销</el-button>
</template>
</el-table-column>
<el-table-column prop="caseCode" label="盒号" min-width="120" align="center" />
<el-table-column prop="caseName" label="盒名称" min-width="120" align="center" />
<el-table-column prop="depositNum" label="已装" min-width="100" align="center" />
<el-table-column prop="tid" label="TID" min-width="120" align="center" />
<el-table-column prop="barcode" label="条形码" min-width="120" align="center" />
<el-table-column prop="caseRetention" label="保管期限" min-width="100" align="center" />
<el-table-column prop="caseClass" label="密级" min-width="100" align="center" />
<el-table-column prop="caseFonds" label="全宗" min-width="100" align="center" />
<el-table-column prop="category" label="所属门类" min-width="100" align="center" />
<el-table-column prop="classify" label="所属分类" min-width="100" align="center" />
</el-table>
</div>
<div class="part-packing-item">
<h5 class="part-packing-title">档案列表-待选</h5>
<el-table
ref="archivesList"
class="archives-table custom-table"
:data="archivesTable"
highlight-current-row
style="width: 100%;"
height="calc(100vh/2 - 200px)"
@selection-change="selectionChangeHandler"
@row-click="clickRowHandler"
>
<el-table-column type="selection" 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>
<template slot="header">
<el-tooltip
class="item"
effect="dark"
:content="field.fieldCnName"
placement="top-start"
>
<span>{{ field.fieldCnName }}</span>
</el-tooltip>
</template>
<template slot-scope="scope">
{{ scope.row[field.fieldName] }}
</template>
</el-table-column>
</el-table>
</div>
<div class="part-packing-item">
<h5 class="part-packing-title">档案列表-已选</h5>
<el-table
ref="selectArchivesList"
class="archives-table custom-table"
:data="selectArchivesTable"
highlight-current-row
style="width: 100%;"
height="calc(100vh/2 - 200px)"
>
<el-table-column type="index" label="序号" 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>
<template slot="header">
<el-tooltip
class="item"
effect="dark"
:content="field.fieldCnName"
placement="top-start"
>
<span>{{ field.fieldCnName }}</span>
</el-tooltip>
</template>
<template slot-scope="scope">
{{ scope.row[field.fieldName] }}
</template>
</el-table-column>
</el-table>
</div>
</div>
<div v-if="isPackingOrPartType" slot="footer" class="dialog-footer">
<el-button type="text">取消</el-button>
<el-button type="primary" @click="handleComfireCartoning">确定</el-button>
</div>
</div>
</el-dialog>
</template>
<script>
import { FetchInitCartoningList, FetchCartoning } from '@/api/archivesKeeping/caseManage'
import { FetchInitCategoryViewTable, FetchInitCategoryView } from '@/api/collect/collect'
import { header, form } from '@crud/crud'
export default {
name: 'Packing',
components: { },
inject: ['parentsData'],
mixins: [
header(),
form({})
],
props: {
selectedCategory: {
type: Object,
default: function() {
return {}
}
},
selections: {
type: Array,
default: () => []
},
totalSumAll: {
type: Number,
default: 0
}
},
data() {
return {
currentSelections: [],
arrySort: null,
tableDisplayFields: [],
packingTitle: '装盒',
packingData: [],
tableData: [],
selectTableData: [],
archivesTable: [],
selectArchivesTable: [],
tid: null,
caseCode: null,
barcode: null,
caseQuery: {},
inputSelect: null,
queryOption: [
{ value: 'caseCode', label: '盒号' },
{ value: 'tid', label: 'TID' },
{ value: 'barcode', label: '条形码' }
],
packingVisible: false, //
isPackingOrPartType: 0,
packFileCategory: null
}
},
created() {
// select -
this.inputSelect = this.queryOption[0].value
},
methods: {
// -select
querySelect(val) {
this.inputSelect = val
},
//
getCaseList() {
if (!this.caseQuery[this.inputSelect]) {
this.$message({ message: '请输入后再搜索!', type: 'error', offset: 8 })
return
}
switch (this.inputSelect) {
case 'caseCode':
this.caseCode = this.caseQuery[this.inputSelect]
this.tid = null
this.barcode = null
break
case 'tid':
this.tid = this.caseQuery[this.inputSelect]
this.caseCode = null
this.barcode = null
break
case 'barcode':
this.barcode = this.caseQuery[this.inputSelect]
this.caseCode = null
this.tid = null
break
}
const params = {
'tid': this.tid,
'caseCode': this.caseCode,
'barcode': this.barcode,
'page': 0,
'size': 10
}
console.log(params)
FetchInitCartoningList(params).then(res => {
this.tableData = res.content
})
},
async getPackingFileList() {
const parentsId = this.selections[0].id
const params = {
'categoryId': this.selectedCategory.id,
'categoryLevel': 3,
'parentId': parentsId,
'ignore': false,
'isdel': false,
'page': 0,
'size': 100,
'sort': this.arrySort,
'queryType': null,
'queryTitle': null,
'itemNo': null,
'archiveCtgNo': null,
'responsibleby': null,
'archiveNo': null,
'archiveYear': null,
'department': null,
'retention': null,
'securityClass': null,
'organizationMatter': null
}
await FetchInitCategoryView(params).then(data => {
if (data) {
this.packingData = data.list.content
this.archivesTable = data.list.content
}
})
},
// api
async handleCartoning(row) {
let jnCategoryId
let archivesParentsId
if (this.selectedCategory.arrangeType === 1) {
this.packingData = this.selections
jnCategoryId = this.packFileCategory.id
} else {
await this.getPackingFileList()
jnCategoryId = this.packFileCategory.id
// if (this.selectedCategory.isType === 2) {
// jnCategoryId = this.selectedCategory.children[0].children[0].id
// } else {
// jnCategoryId = this.selectedCategory.children[0].id
// }
archivesParentsId = this.selections[0].id
}
const arrParams = this.packingData.map(item => {
const json = {}
json.archivesId = item.id
if (this.selectedCategory.arrangeType === 1) {
json.archivesParentsId = item.id
} else {
json.archivesParentsId = archivesParentsId
}
json.caseId = row.id
json.caseName = row.caseName
json.categoryId = jnCategoryId
return json
})
console.log('ddddd', arrParams)
await this.FetchCartioning(arrParams)
},
FetchCartioning(arrParams) {
FetchCartoning(arrParams).then(res => {
this.$message({ message: '装盒成功!', type: 'success', offset: 8 })
this.packingVisible = false
this.$emit('close-dialog')
this.tableData = []
this.caseQuery[this.inputSelect] = ''
})
},
//
handlePartParking(row, index) {
if (!this.currentSelections.length) {
this.$message({ message: '请选择要装盒的档案!', type: 'error', offset: 8 })
return
}
//
if (this.selectTableData.findIndex(val => val.id === row.id) === -1) {
this.selectTableData.push(row)
}
this.tableData.splice(index, 1)
this.currentSelections.forEach(item => {
item.caseId = row.id
item.caseName = row.caseName
this.archivesTable.splice(this.archivesTable.findIndex(val => val.id === item.id), 1)
this.selectArchivesTable.push(item)
})
},
//
cancelParking(row, index) {
this.tableData.unshift(row)
this.selectTableData.splice(index, 1)
this.selectArchivesTable.forEach((item, i) => {
if (item.caseId === row.id) {
this.archivesTable.push(item)
}
})
this.selectArchivesTable.splice(this.selectArchivesTable.findIndex((item, i) => item.caseId === row.id), this.archivesTable.length)
},
handleComfireCartoning() {
if (this.archivesTable.length) {
this.$message({ message: '左侧档案待选列表全部装盒完成才可保存', type: 'error', offset: 8 })
return
}
const jnCategoryId = this.packFileCategory.id
const arrParams = this.selectArchivesTable.map(item => {
const json = {}
json.archivesId = item.id
json.archivesParentsId = this.selections[0].id
json.caseId = item.caseId
json.caseName = item.caseName
json.categoryId = jnCategoryId
return json
})
console.log('arrParams', arrParams)
this.FetchCartioning(arrParams)
},
clearTableData() {
this.tableData = []
},
// table
clickRowHandler(row) {
this.$refs.archivesList.toggleRowSelection(row)
},
// table
selectionChangeHandler(val) {
this.currentSelections = val
},
// dialog - close
handleClose(done) {
this.showCoverVisible = false
this.$set(this.caseQuery, this.inputSelect, '')
this.tableData = []
this.selectTableData = []
this.archivesTable = []
this.selectArchivesTable = []
done()
},
getViewTable() {
this.tableDisplayFields = []
FetchInitCategoryViewTable({ categoryId: this.selectedCategory.id, categoryLevel: 3 }).then((res) => {
if (res) {
this.arrySort = []
this.tableDisplayFields = res
const orderSortArry = this.tableDisplayFields.filter(item => item.queue).sort((a, b) => a.queue - b.queue)
orderSortArry.forEach(item => {
if (item.displayOrderBy) {
this.arrySort.push(item.fieldName + ',' + item.displayOrderBy)
}
})
this.getPackingFileList()
}
})
}
}
}
</script>
<style lang="scss" scoped>
.el-table .el-button{
padding: 0;
}
::v-deep .custom-table .el-table__body-wrapper::-webkit-scrollbar {
width: 5px !important;
height: 5px !important;
background-color: #DDE8FB !important;
}
::v-deep .custom-table .el-table__body-wrapper::-webkit-scrollbar-thumb {
border-radius: 3px;
background-color: #4578F6 !important;
}
::v-deep .custom-table .el-table__body-wrapper::-webkit-scrollbar-thumb:hover {
background-color: #4578F6 !important;
}
::v-deep .custom-table .el-table__body-wrapper::-webkit-scrollbar-corner {
background-color: #DDE8FB !important;
}
.filter-rfid{
margin-left: 10px !important;
}
</style>

2
src/views/components/archivesListModule/index.vue

@ -5,7 +5,7 @@
v-loading="tableLoading"
class="archives-table"
:data="tableData"
:height="isDetail ? 'calc(100vh - 382px)':'auto'"
:height="isDetail ? 'calc(100vh - 382px)':'calc(100vh - 676px)'"
highlight-current-row
style="width: 100%;"
:row-key="rowKey"

87
src/views/system/groupManage/index.vue

@ -111,12 +111,14 @@
@click="saveCategory"
>保存</el-button>
</div>
<!-- :load="getCategoryDataList" @check="menuChange" :default-checked-keys="categoryIds"-->
<!-- :load="getCategoryDataList" @check="menuChange" default-expand-all :default-checked-keys="categoryIds"-->
<el-tree
ref="category"
lazy
:data="categoryDatas"
:load="getCategoryDataList"
:default-checked-keys="categoryIds"
default-expand-all
check-strictly
show-checkbox
node-key="id"
highlight-current
@ -131,8 +133,7 @@
<script>
import crudfonds from '@/api/system/fonds'
// FetchCategoryMenuChildren
import { FetchCategoryMenu } from '@/api/system/category/category'
import { FetchCategoryMenu, FetchCategoryMenuChildren } from '@/api/system/category/category'
import CRUD, { presenter, header, form, crud } from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation'
@ -159,7 +160,15 @@ export default {
mixins: [presenter(), header(), form(defaultForm), crud()],
data() {
return {
defaultProps: { children: 'children', label: 'cnName' },
defaultProps: {
children: 'children',
label: 'cnName',
isLeaf: (data, node) => {
if (data.isType === 2) {
return true
}
}
},
currentId: 0, categoryLoading: false, showButton: false,
categoryDatas: [], categoryIds: [], depts: [], deptDatas: [], // 使
categoryAllData: [],
@ -208,14 +217,16 @@ export default {
})
},
methods: {
// getCategoryDataList(node, resolve) {
// setTimeout(() => {
// if (node.level > 2) return resolve([])
// FetchCategoryMenuChildren(node.data.id ? node.data.id : 0).then(res => {
// resolve(res)
// })
// }, 100)
// },
getCategoryDataList(node, resolve) {
console.log('node', node)
console.log('node.childNodes', node.childNodes)
FetchCategoryMenuChildren(node.data.id ? node.data.id : 0).then(res => {
if (res.length !== 0 && res[0].isType === 3) {
return resolve([])
}
resolve(res)
})
},
filterData(data) {
return data.filter(node => {
this.$set(node, 'isChecked', false)
@ -239,12 +250,9 @@ export default {
},
//
[CRUD.HOOK.beforeToAdd](crud, form) {
form.menus = null
},
//
[CRUD.HOOK.beforeToEdit](crud, form) {
//
// form.menus = null
form.id = form.fondsId
},
//
@ -255,21 +263,26 @@ export default {
if (val) {
const _this = this
//
this.$refs.category.setCheckedKeys([])
// id
this.currentId = val.fondsId
console.log('val', val)
console.log('this.currentId', this.currentId)
crudfonds.FetchFondsDetail({ id: this.currentId }).then((res) => {
console.log(res)
// key
console.log('this.categoryDatas', this.categoryDatas)
this.categoryIds = []
console.log(res.categorys)
// this.categoryDatas.forEach(function(data) {
// _this.categoryIds.push(data.id)
// })
// console.log(_this.categoryIds)
crudfonds.FetchFondsDetail({ id: this.currentId }).then((res) => {
if (res.categorys) {
res.categorys.forEach(function(data) {
_this.categoryIds.push(data.id)
})
this.$refs.category.setCheckedKeys(_this.categoryIds)
}
console.log(_this.categoryIds)
}).catch(err => {
console.log(err)
})
@ -363,12 +376,34 @@ export default {
}
},
categoryChange(categorys) {
console.log(categorys)
console.log(this.categoryDatas)
const childrenIds = this.getAllChildIds(categorys.id, this.categoryDatas)
console.log('childrenIds', childrenIds)
console.log(this.$refs.category.getCheckedKeys())
this.categoryIds = this.$refs.category.getCheckedKeys()
console.log('categorys.id', categorys.id)
// console.log(this.categoryDatas)
// const childrenIds = this.getAllChildIds(categorys.id, this.categoryDatas)
// console.log('childrenIds', childrenIds)
// console.log(this.$refs.category.getCheckedKeys())
// this.categoryIds = this.$refs.category.getCheckedKeys()
FetchCategoryMenuChildren(categorys.id).then(childIds => {
const i = this.categoryIds.indexOf(categorys.id)
if (i !== -1) {
this.categoryIds.splice(i, 1)
for (let i = 0; i < childIds.length; i++) {
const index = this.categoryIds.indexOf(childIds[i].id)
if (index !== -1) {
this.categoryIds.splice(index, 1)
}
}
} else {
this.categoryIds.push(categorys.id)
for (let i = 0; i < childIds.length; i++) {
const index = this.categoryIds.indexOf(childIds[i].id)
if (index === -1) {
this.categoryIds.push(childIds[i].id)
}
}
}
this.$refs.category.setCheckedKeys(this.categoryIds)
})
},
//
saveCategory() {

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

@ -189,7 +189,7 @@
<script>
import { getToken } from '@/utils/auth'
import crudUser, { resetpassword } from '@/api/system/user'
import { isvalidPhone } from '@/utils/validate'
// import { isvalidPhone } from '@/utils/validate'
import { getDepts, FetchSonDepts } from '@/api/system/dept'
import { FetchFondsAll } from '@/api/system/fonds'
import { getAll } from '@/api/system/role'
@ -228,15 +228,15 @@ export default {
dicts: ['user_status'],
data() {
//
const validPhone = (rule, value, callback) => {
if (!value) {
callback(new Error('请输入电话号码'))
} else if (!isvalidPhone(value)) {
callback(new Error('请输入正确的11位手机号码'))
} else {
callback()
}
}
// const validPhone = (rule, value, callback) => {
// if (!value) {
// callback(new Error(''))
// } else if (!isvalidPhone(value)) {
// callback(new Error('11'))
// } else {
// callback()
// }
// }
const validateRole = (rule, value, callback) => {
if (this.roleDatas.length > 0) {
callback()
@ -288,25 +288,25 @@ export default {
{ required: true, message: '请输入用户昵称', trigger: 'blur' },
{ min: 2, max: 20, message: '长度在 2 到 20 个字符', trigger: 'blur' }
],
email: [
{ required: true, message: '请输入邮箱地址', trigger: 'blur' },
{ type: 'email', message: '请输入正确的邮箱地址', trigger: 'blur' }
],
phone: [
{ required: true, trigger: 'blur', validator: validPhone }
],
// email: [
// { required: true, message: '', trigger: 'blur' },
// { type: 'email', message: '', trigger: 'blur' }
// ],
// phone: [
// { required: true, trigger: 'blur', validator: validPhone }
// ],
'dept.id': [
{ required: true, trigger: 'blur', message: '请选择部门' }
],
'fonds.id': [
{ required: true, trigger: 'blur', message: '请选择全宗' }
],
gender: [
{ required: true, trigger: 'change', message: '请选择性别' }
],
enabled: [
{ required: true, trigger: 'change', message: '请选择状态' }
],
// gender: [
// { required: true, trigger: 'change', message: '' }
// ],
// enabled: [
// { required: true, trigger: 'change', message: '' }
// ],
roles: [
{ trigger: 'blur', validator: validateRole }
],

Loading…
Cancel
Save