14 changed files with 682 additions and 288 deletions
-
21src/api/system/category/process.js
-
75src/assets/styles/prearchive-library.scss
-
64src/views/prearchiveLibrary/index.vue
-
275src/views/prearchiveLibrary/module/batchFile.vue
-
1src/views/prearchiveLibrary/module/form.vue
-
65src/views/prearchiveLibrary/module/moveFile.vue
-
213src/views/prearchiveLibrary/module/scope.vue
-
41src/views/system/archivesCategory/processManage/index.vue
-
99src/views/system/archivesCategory/processManage/module/form.vue
-
2src/views/system/groupManage/index.vue
-
26src/views/system/log/operateLog/index.vue
-
6src/views/system/log/search.vue
-
2src/views/system/role/index.vue
-
80src/views/system/user/center.vue
@ -0,0 +1,21 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
// 门类流程管理基础
|
|||
export function FetchInitCategoryFlowBase(params) { |
|||
return request({ |
|||
url: 'api/category/initCategoryFlowBase', |
|||
method: 'get', |
|||
params |
|||
}) |
|||
} |
|||
|
|||
// 根据门类获取流程设置
|
|||
export function FetchInitFlowByCategoryId(params) { |
|||
return request({ |
|||
url: 'api/category/initFlowByCategoryId', |
|||
method: 'get', |
|||
params |
|||
}) |
|||
} |
|||
|
|||
export default { FetchInitCategoryFlowBase, FetchInitFlowByCategoryId } |
@ -0,0 +1,75 @@ |
|||
@import 'variables'; |
|||
@import 'mixin'; |
|||
|
|||
|
|||
.move-form{ |
|||
::v-deep .el-dialog{ |
|||
width: 828px; |
|||
} |
|||
.move-main{ |
|||
display: flex; |
|||
justify-content: space-between; |
|||
height: 477px; |
|||
border: 1px solid #E6E8ED; |
|||
} |
|||
.move-left{ |
|||
width: 253px; |
|||
padding: 12px 20px 0 12px; |
|||
border-right: 1px solid #E6E8ED; |
|||
} |
|||
|
|||
.move-right{ |
|||
flex: 1; |
|||
h4{ |
|||
position: relative; |
|||
padding-left: 52px; |
|||
height: 40px; |
|||
line-height: 40px; |
|||
font-size: 16px; |
|||
color: #0C0E1E; |
|||
border-bottom: 1px solid #E6E8ED; |
|||
background: #F5F9FC; |
|||
&::before{ |
|||
content: ""; |
|||
position: absolute; |
|||
left: 0; |
|||
top: 0; |
|||
display: inline-block; |
|||
width: 39px; |
|||
height: 40px; |
|||
border-right: 1px solid #E6E8ED; |
|||
} |
|||
} |
|||
.raido-main{ |
|||
display: flex; |
|||
flex-direction: column; |
|||
flex-wrap: wrap; |
|||
justify-content: flex-start; |
|||
height: 360px; |
|||
overflow: hidden; |
|||
overflow-y: scroll; |
|||
.el-radio{ |
|||
width: 100%; |
|||
margin-right: 0; |
|||
height: 40px; |
|||
line-height: 40px; |
|||
border-bottom: 1px solid #E6E8ED; |
|||
::v-deep .el-radio__input{ |
|||
margin-left: 12px; |
|||
} |
|||
::v-deep .el-radio__label{ |
|||
display: inline-block; |
|||
padding-left: 12px; |
|||
margin-left: 12px; |
|||
border-left: 1px solid #E6E8ED; |
|||
} |
|||
} |
|||
} |
|||
.select-content{ |
|||
padding: 0 18px; |
|||
height: 40px; |
|||
line-height: 40px; |
|||
border-top: 1px solid #E6E8ED; |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,213 @@ |
|||
<template> |
|||
<!-- 归档范围 --> |
|||
<el-dialog class="move-form" append-to-body :modal-append-to-body="false" :close-on-click-modal="false" :before-close="handleClose" :visible="scopeVisible" title="归档范围"> |
|||
<span class="dialog-right-top" /> |
|||
<span class="dialog-left-bottom" /> |
|||
<div class="setting-dialog"> |
|||
<div class="move-main"> |
|||
<div class="move-left"> |
|||
<!--门类树状结构--> |
|||
<div class="tree-scroll"> |
|||
<el-tree |
|||
ref="tree2" |
|||
v-loading="crud.loading" |
|||
:data="crud.data" |
|||
node-key="id" |
|||
:props="defaultProps" |
|||
:expand-on-click-node="false" |
|||
@node-click="handleNodeClick2" |
|||
/> |
|||
</div> |
|||
</div> |
|||
<div class="move-right"> |
|||
<h4>归档范围</h4> |
|||
<div class="raido-main" style="height: 395px;"> |
|||
<el-table |
|||
ref="table" |
|||
v-loading="crud.loading" |
|||
lazy |
|||
:show-header="false" |
|||
:data="tableData" |
|||
:row-key="getRowKey" |
|||
:load="getSonClass" |
|||
:tree-props="{children: 'children', hasChildren: 'hasChildren'}" |
|||
highlight-current-row |
|||
@select="handleSelect" |
|||
@selection-change="selectionChangeHandler" |
|||
@row-click="clickRowHandler" |
|||
> |
|||
<el-table-column type="selection" align="center" width="55" /> |
|||
<el-table-column :show-overflow-tooltip="true" prop="scopeName" label="名称" /> |
|||
</el-table> |
|||
</div> |
|||
<div class="select-content"> |
|||
当前选中:{{ selections.length!==0 ? selections[0].scopeName : '' }} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div slot="footer" class="dialog-footer"> |
|||
<el-button type="text" @click="cancelScope">取消</el-button> |
|||
<el-button type="primary" @click="confirmedScope">确定</el-button> |
|||
</div> |
|||
</div> |
|||
</el-dialog> |
|||
</template> |
|||
|
|||
<script> |
|||
import { FetchInitArchivesScope, FetchSonArchivesScope } from '@/api/system/archivesScope' |
|||
import CRUD, { presenter, header, crud } from '@crud/crud' |
|||
import Vue from 'vue' |
|||
export default { |
|||
name: 'ScopeModule', |
|||
components: { }, |
|||
cruds() { |
|||
return [ |
|||
CRUD({ |
|||
title: '归档范围', url: 'api/category/menu', |
|||
crudMethod: {}, sort: [] |
|||
}) |
|||
] |
|||
}, |
|||
mixins: [presenter(), header(), crud()], |
|||
data() { |
|||
return { |
|||
scopeVisible: false, |
|||
selectedCategory: null, |
|||
tableData: [], |
|||
selections: [], |
|||
defaultProps: { children: 'children', label: 'cnName' } |
|||
} |
|||
}, |
|||
created() { |
|||
}, |
|||
mounted() { |
|||
|
|||
}, |
|||
methods: { |
|||
getRowKey(row) { |
|||
return row.id |
|||
}, |
|||
filterData(data) { |
|||
return data.filter(node => { |
|||
if (node.children && node.children.length > 0) { |
|||
node.children = this.filterData(node.children) // 递归处理子节点 |
|||
} |
|||
return node.isType !== 3 // 过滤掉isType为3的节点 |
|||
}) |
|||
}, |
|||
// 逆归实现 获取指定元素 |
|||
findNode(tree, func) { |
|||
for (const node of tree) { |
|||
if (func(node)) return node |
|||
if (node.children) { |
|||
const res = this.findNode(node.children, func) |
|||
if (res) return res |
|||
} |
|||
} |
|||
return null |
|||
}, |
|||
// 展开选中的父级 |
|||
expandParents(node) { |
|||
node.expanded = true |
|||
if (node.parent) { |
|||
this.expandParents(node.parent) |
|||
} |
|||
}, |
|||
[CRUD.HOOK.afterRefresh]() { |
|||
this.crud.data = this.filterData(this.crud.data) |
|||
this.$nextTick(() => { |
|||
if (this.$refs.tree2) { |
|||
let currentKey |
|||
if (this.crud.data[0].isType === 1) { |
|||
currentKey = this.findNode(this.crud.data[0].children, (node) => { |
|||
return node.isType !== 1 |
|||
}) |
|||
} else { |
|||
currentKey = this.crud.data[0] |
|||
} |
|||
// 设置某个节点的当前选中状态 |
|||
this.$refs.tree2.setCurrentKey(currentKey.id) |
|||
this.$nextTick(() => { |
|||
// 设置某个节点的父级展开 |
|||
const selectedKey = this.$refs.tree2.getCurrentNode() |
|||
if (this.$refs.tree2.getNode(selectedKey) && this.$refs.tree2.getNode(selectedKey).parent) { |
|||
this.expandParents(this.$refs.tree2.getNode(selectedKey).parent) |
|||
} |
|||
// 选中节点的门类详情 |
|||
this.handleNodeClick(selectedKey) |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
// 选中门类后,设置门类详情数据 |
|||
handleNodeClick2(val) { |
|||
if (val) { |
|||
this.selectedCategory = val |
|||
if (val.pid !== '0') { |
|||
Vue.set(this.selectedCategory, 'parentName', this.$refs.tree2.getNode(val.pid).data.cnName) |
|||
} |
|||
this.getInitArchivesScope() |
|||
} |
|||
}, |
|||
getInitArchivesScope() { |
|||
FetchInitArchivesScope({ 'categoryId': this.selectedCategory.id }).then(res => { |
|||
this.tableData = res.content.map(function(item, index) { |
|||
if (item.sonNum !== 0) { |
|||
item.hasChildren = true |
|||
item.children = null |
|||
} else { |
|||
item.hasChildren = false |
|||
} |
|||
return item |
|||
}) |
|||
}) |
|||
}, |
|||
getSonClass(tree, treeNode, resolve) { |
|||
setTimeout(() => { |
|||
FetchSonArchivesScope({ pid: tree.id }).then(res => { |
|||
const data = res.map(function(obj) { |
|||
if (obj.sonNum !== 0 && obj.sonNum) { |
|||
obj.hasChildren = true |
|||
obj.children = null |
|||
} else { |
|||
obj.hasChildren = false |
|||
} |
|||
return obj |
|||
}) |
|||
resolve(data) |
|||
}) |
|||
}, 100) |
|||
}, |
|||
handleSelect(selection) { |
|||
this.$refs.table.clearSelection() // 清除当前选择 |
|||
if (selection.length > 0) { |
|||
// 设置选中项 |
|||
this.$refs.table.toggleRowSelection(selection[0]) |
|||
} |
|||
}, |
|||
// table - 当前选中得row |
|||
clickRowHandler(row) { |
|||
this.$refs.table.clearSelection() |
|||
this.$refs.table.toggleRowSelection(row) |
|||
}, |
|||
selectionChangeHandler(val) { |
|||
this.selections = val |
|||
}, |
|||
cancelScope() { |
|||
this.scopeVisible = false |
|||
}, |
|||
confirmedScope() { |
|||
this.scopeVisible = false |
|||
this.$emit('getScope', this.selections) |
|||
}, |
|||
handleClose(done) { |
|||
this.scopeVisible = false |
|||
done() |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
@import "~@/assets/styles/prearchive-library.scss"; |
|||
</style> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue