Browse Source

0715系统更新

master
xuhuajiao 2 months ago
parent
commit
31a6bbc305
  1. 127
      src/views/archivesMIOD/miodLibrary/index.vue
  2. 9
      src/views/archivesMIOD/miodLibrary/module/detail.vue
  3. 56
      src/views/archivesMIOD/miodLibrary/treeList.vue
  4. 4
      src/views/archivesMIOD/miodRecord/index.vue
  5. 2
      src/views/archivesMIOD/miodStatistics/miodTable.vue
  6. 7
      src/views/components/category/PreviewForm.vue
  7. 6
      src/views/dashboard/PanelGroup.vue

127
src/views/archivesMIOD/miodLibrary/index.vue

@ -7,11 +7,28 @@
</div>
<div v-if="selectedDocument.isType !== 1" class="elect-cont-right">
<!--工具栏-->
<div class="head-container" :style="isRecycle?'display:flex;justify-content: space-between; align-items: center;':'' ">
<div class="head-search" :style="isRecycle?'margin: 0;':''">
<div class="head-container" :style="isRecycle?'display:flex; justify-content: space-between; align-items: center; flex-wrap: wrap;':'' ">
<div class="head-search" :style="isRecycle?'margin-bottom: 10px;':''">
<!-- 搜索 -->
<el-input v-model="search" clearable size="small" placeholder="输入题名搜索" prefix-icon="el-icon-search" style="width: 200px;" class="filter-item" @keyup.enter.native="handleSearch" />
<el-input v-model="search" clearable size="small" placeholder="输入关键字搜索" prefix-icon="el-icon-search" style="width: 200px;" class="filter-item" @clear="handleSearch" @keyup.enter.native="handleSearch" />
<!-- <rrOperation /> -->
<!-- 密级 -->
<el-select v-model="query.securityClass" clearable placeholder="密级" style="width: 110px;" @change="crud.toQuery">
<el-option v-for="item in securityClassOptions" :key="item.dictionaryCode" :label="item.dictionaryName" :value="item.dictionaryName" />
</el-select>
<!-- 紧急程度 -->
<el-select v-model="query.emergencyDegree" clearable placeholder="紧急程度" style="width: 110px;" @change="crud.toQuery">
<el-option v-for="item in emergencyDegreeOptions" :key="item.dictionaryCode" :label="item.dictionaryName" :value="item.dictionaryName" />
</el-select>
<!-- 传阅状态 -->
<el-select v-model="query.readType" clearable size="small" placeholder="传阅状态" class="filter-item" style="width: 110px" @change="crud.toQuery">
<el-option v-for="item in readTypeOptions" :key="item.dictionaryCode" :label="item.dictionaryName" :value="item.dictionaryName" />
</el-select>
<!-- 登记日期范围 -->
<date-range-picker v-model="blurryTime" class="date-item" @change="crud.toQuery" />
<!-- 需传阅者 -->
<el-select v-model="distributorIds" clearable multiple collapse-tags placeholder="需传阅者" style="width: 170px" @clear="handleClear" @change="crud.toQuery"> <el-option v-for="item in distributorsOptions" :key="item.id" :label="item.borrowName" :value="item.id" />
</el-select>
<el-button class="filter-item filter-search" size="mini" type="success" icon="el-icon-search" @click="handleSearch">搜索</el-button>
<el-button class="filter-item filter-refresh" size="mini" type="warning" icon="el-icon-refresh-left" @click="resetQuery">重置</el-button>
</div>
@ -158,12 +175,14 @@ import detail from './module/detail'
import { exportFile } from '@/utils/index'
import qs from 'qs'
import { mapGetters } from 'vuex'
import DateRangePicker from '@/components/DateRangePicker'
import PdfDialog from './module/pdfDialog'
import { FetchDictionaryTree } from '@/api/system/dict'
import { FetchInitBorrowerListOrderNo } from '@/api/system/borrower'
export default {
name: 'MiodLibrary',
components: { TreeList, PreviewForm, detail, crudOperation, pagination, PdfDialog },
components: { TreeList, PreviewForm, detail, crudOperation, pagination, PdfDialog, DateRangePicker },
cruds() {
return [
CRUD({
@ -229,7 +248,13 @@ export default {
parentInfo: null,
pageType: null,
allDownloadLoading: false,
isMiodSaveBind: null
isMiodSaveBind: null,
securityClassOptions: [],
emergencyDegreeOptions: [],
readTypeOptions: [],
blurryTime: [],
distributorsOptions: [],
distributorIds: []
}
},
computed: {
@ -244,8 +269,54 @@ export default {
}
},
created() {
this.getDictsList()
},
methods: {
getDictsList() {
FetchDictionaryTree().then((res) => {
const filterCodes = ['security_class']
const filteredItems = JSON.parse(JSON.stringify(res)).filter(item => filterCodes.includes(item.dictionaryCode))
this.securityClassOptions = filteredItems[0].childDictionarys
const filterCodes2 = ['emergency_degree']
const filteredItems2 = JSON.parse(JSON.stringify(res)).filter(item => filterCodes2.includes(item.dictionaryCode))
this.emergencyDegreeOptions = filteredItems2[0].childDictionarys
const filterCodes3 = ['read_type']
const filteredItems3 = JSON.parse(JSON.stringify(res)).filter(item => filterCodes3.includes(item.dictionaryCode))
this.readTypeOptions = filteredItems3[0].childDictionarys
}).catch(err => {
console.log(err)
})
},
handleClear() {
this.distributorIds = []
this.crud.query.distributorIds = null
},
fetchDeptsList() {
console.log('this.selectedDocument', this.selectedDocument)
let documentId
if (this.selectedDocument.isType === 2) {
documentId = this.selectedDocument.id
} else {
documentId = this.selectedDocument.documentId
}
const param = {
'documentId': documentId
}
console.log('param', param)
FetchInitBorrowerListOrderNo(param)
.then(res => {
console.log('res', res)
this.distributorsOptions = res || []
})
.catch(error => {
this.$message.error('获取数据失败,请稍后重试')
console.error('获取部门/人员列表失败', error)
})
.finally(() => {
})
},
handleSearch() {
this.crud.query.search = this.search
this.crud.toQuery()
@ -254,6 +325,9 @@ export default {
this.$refs.treeList.refreshData()
},
resetQuery() {
this.crud.query.securityClass = ''
this.crud.query.emergencyDegree = ''
this.crud.query.readType = ''
this.search = ''
this.crud.query.search = ''
if (this.selectedDocument.isType === 3) {
@ -266,6 +340,11 @@ export default {
this.crud.query.docDepartment = null
this.crud.query.archiveYear = null
}
this.blurryTime = []
this.crud.query.startTime = null
this.crud.query.endTime = null
this.distributorIds = []
this.crud.query.distributorIds = null
this.crud.toQuery()
},
[CRUD.HOOK.beforeRefresh]() {
@ -274,6 +353,21 @@ export default {
} else {
this.crud.query.documentId = this.selectedDocument.documentId
}
if (this.blurryTime.length !== 0) {
this.crud.query.startTime = this.blurryTime[0].split(' ')[0]
this.crud.query.endTime = this.blurryTime[1].split(' ')[0]
} else {
this.crud.query.startTime = null
this.crud.query.endTime = null
}
if (this.distributorIds.length !== 0) {
this.crud.query.distributorIds = this.distributorIds.join(',')
} else {
this.crud.query.distributorIds = null
}
this.crud.query.isdel = this.isdel
// this.crud.query.ignore = false
this.crud.query.fondsAffiliation = this.selectedDocument.fondsId
@ -283,12 +377,12 @@ export default {
this.archivesBtnLoading = loadingType
},
handleNodeClick(data, type) {
if (type && type === 'targetNode') {
console.log('非手动点击tree')
} else {
this.search = ''
this.crud.query.search = ''
}
// if (type && type === 'targetNode') {
// console.log('tree')
// } else {
// this.search = ''
// this.crud.query.search = ''
// }
this.selectedDocument = data
let documentId = null
if (data.isType === 2) {
@ -296,6 +390,7 @@ export default {
} else {
documentId = data.documentId
}
this.fetchDeptsList()
this.getInitDocumentsViewTable(documentId, type)
},
// table
@ -655,7 +750,13 @@ export default {
'ids': ids,
'docDepartment': type === '1' ? (this.selectedDocument.isType === 4 ? this.selectedDocument.dictionaryName : this.selectedDocument.label) : null,
'archivesYear': type === '1' ? (this.selectedDocument.isType === 4 ? this.selectedDocument.label : null) : null,
'search': type === '1' ? this.search : null
'search': type === '1' ? this.search : null,
'securityClass': type === '1' ? this.crud.query.securityClass : null,
'emergencyDegree': type === '1' ? this.crud.query.emergencyDegree : null,
'readType': type === '1' ? this.crud.query.readType : null,
'startTime': type === '1' ? (this.blurryTime.length !== 0 ? this.blurryTime[0].split(' ')[0] : null) : null,
'endTime': type === '1' ? (this.blurryTime.length !== 0 ? this.blurryTime[1].split(' ')[0] : null) : null,
'distributorIds': type === '1' ? (this.blurryTime.distributorIds !== 0 ? this.distributorIds.join(',') : null) : null
}
console.log('exportFile', params)
exportFile(this.baseApi + '/api/documentArchives/downloadDocumentArchives?' + qs.stringify(params, { indices: false, allowDots: true, skipNulls: false }))

9
src/views/archivesMIOD/miodLibrary/module/detail.vue

@ -33,6 +33,7 @@
<!-- <span>{{ borrowerList | formatBorrowerList }}</span> -->
<div class="childDevice-item">
<i class="tag-name">主办部门</i>
<div style="flex: 1; max-height: 29px; overflow: hidden; overflow-y: scroll;">
<el-tag
v-for="tag in hostList"
:key="tag.id"
@ -42,8 +43,10 @@
{{ tag.borrowName }}
</el-tag>
</div>
</div>
<div class="childDevice-item">
<i class="tag-name">传阅者</i>
<div style="flex: 1; max-height: 58px; overflow: hidden; overflow-y: scroll;">
<el-tag
v-for="tag in borrowerList"
:key="tag.id"
@ -54,6 +57,7 @@
</el-tag>
</div>
</div>
</div>
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; padding: 0 20px 0 10px;">
<h4 style="font-size: 16px; color: #1c1c1c;">文件列表</h4>
<div v-if="archivesFiledata.length !== 0 && !isMidoRecord">
@ -66,7 +70,7 @@
v-loading="archivesFiledataLoading"
:data="archivesFiledata"
style="min-width: 100%;"
height="calc(100vh - 756px)"
height="calc(100vh - 796px)"
>
<el-table-column prop="reg_no" label="登记号" show-overflow-tooltip min-width="140" />
<el-table-column prop="details_type" label="类型" min-width="85">
@ -984,6 +988,9 @@ export default {
// color: #545B65;
// }
.childDevice-item{
display: flex;
justify-items: flex-start;
align-items: first baseline;
padding-bottom: 10px;
.tag-name{
display: inline-block;

56
src/views/archivesMIOD/miodLibrary/treeList.vue

@ -5,7 +5,7 @@
<span class="left-bottom-line" />
<!--门类树状结构-->
<div class="tree-scroll">
<el-tree ref="tree" v-loading="crud.loading" :data="crud.data" :props="defaultProps" node-key="id" :expand-on-click-node="false" highlight-current default-expand-all @node-click="handleNodeClick">
<el-tree ref="tree" v-loading="crud.loading" :data="crud.data" :props="defaultProps" node-key="id" :expand-on-click-node="false" highlight-current :default-expanded-keys="expandedKeys" @node-click="handleNodeClick">
<span slot-scope="{ node, data }" class="custom-tree-node">
<span v-if="data.isType === 1 " class="iconFolder">
{{ data.label }}
@ -63,7 +63,20 @@ export default {
computed: {
...mapGetters([
'user'
])
]),
expandedKeys() {
const keys = []
const collectKeys = (nodes) => {
nodes.forEach(node => {
if (node.expanded) {
keys.push(node.id)
if (node.children) collectKeys(node.children)
}
})
}
collectKeys(this.crud.data)
return keys
}
},
created() {
},
@ -95,15 +108,18 @@ export default {
id: item.id,
pid: item.pid,
isType: item.isType,
expanded: item.isType === 1,
children: item.children?.map(child => ({
label: child.cnName,
id: child.id,
pid: child.pid,
isType: child.isType,
expanded: child.isType === 2,
children: child.docDepartments?.map(department => ({
label: department.dictionaryName,
id: department.dictionaryId,
isType: 3,
expanded: false,
documentId: child.id,
dictionaryId: department.dictionaryId,
dictionaryCode: department.dictionaryCode,
@ -119,14 +135,6 @@ export default {
}))
}))
}))
// document
// this.$nextTick(() => {
// const defaultSelectedNode = this.findFirstIsType2Node(this.crud.data)
// if (defaultSelectedNode) {
// this.$refs.tree.setCurrentKey(defaultSelectedNode.id)
// this.handleNodeClick(defaultSelectedNode)
// }
// })
//
this.$nextTick(() => {
let targetNode = null
@ -174,12 +182,40 @@ export default {
if (targetNode) {
this.$refs.tree.setCurrentKey(targetNode.id)
this.handleNodeClick(targetNode, 'targetNode')
if (targetNode.isType === 4) {
this.$nextTick(() => {
const parentNode = this.findParentNode(this.crud.data, targetNode)
if (parentNode) {
parentNode.expanded = true
if (!this.expandedKeys.includes(parentNode.id)) {
this.expandedKeys = [...this.expandedKeys, parentNode.id]
}
const treeNode = this.$refs.tree.getNode(parentNode.id)
if (treeNode) {
treeNode.expanded = true
}
}
})
}
}
//
this.nodeToSelect = null
})
},
//
findParentNode(nodes, targetNode) {
for (const node of nodes) {
if (node.children && node.children.some(child => child.id === targetNode.id)) {
return node
}
const found = this.findParentNode(node.children || [], targetNode)
if (found) return found
}
return null
},
//
findNodeById(nodes, id) {
if (!nodes || nodes.length === 0) return null

4
src/views/archivesMIOD/miodRecord/index.vue

@ -6,7 +6,7 @@
v-model="typeValue"
size="small"
clearable
placeholder="请输入题名搜索关键字"
placeholder="请输入关键字搜索"
style="width: 300px;"
class="input-prepend filter-item"
@clear="crud.toQuery"
@ -47,7 +47,7 @@
height="calc(100vh - 288px)"
@cell-dblclick="tableDoubleClick"
>
<el-table-column prop="reg_no" label="公文登记号" width="120" />
<el-table-column prop="reg_no" label="收文号" width="120" />
<el-table-column prop="maintitle" label="公文题名" min-width="140" show-overflow-tooltip />
<el-table-column prop="details_type" label="文件类型">
<template slot-scope="scope">

2
src/views/archivesMIOD/miodStatistics/miodTable.vue

@ -41,7 +41,7 @@
:key="index"
:prop="column"
:label="column"
:width="column === '省市领导批示件' ? '120' : '80'"
width="110"
align="center"
/>
<el-table-column

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

@ -1552,9 +1552,12 @@ export default {
if (this.hostDepartmentTags.length !== 0) {
const ids = this.hostDepartmentTags.map(item => item.id).join(',')
const names = this.hostDepartmentTags.map(item => item.borrowName).join(',')
this.$set(this.addOrUpdateForm, 'host_department', ids)
this.$set(this.addOrUpdateForm, 'host_cn_department', names)
} else {
this.$set(this.addOrUpdateForm, 'host_department', null)
this.$set(this.addOrUpdateForm, 'host_cn_department', null)
}
console.log('this.addOrUpdateForm', this.addOrUpdateForm)
@ -1578,7 +1581,6 @@ export default {
'delMan': null,
'jsonString': JSON.stringify(this.addOrUpdateForm),
'fileJsonString': null,
// 'fondsAffiliation': this.selectedDocument.fondsId
'fondsAffiliation': null,
'borrowerId': this.miodDeptsTags.map(item => item.id)
}
@ -1596,11 +1598,8 @@ export default {
this.$emit('close-dialog')
this.refreshTreeList()
} else {
//
this.$emit('getInitDocumentBind')
}
// this.fileOriginal = null
}
this.$emit('formLoadingShow', false)
})

6
src/views/dashboard/PanelGroup.vue

@ -21,7 +21,7 @@
<div class="card-panel-description">
未传阅数量
<div class="card-panel-text">
<count-to :start-val="0" :end-val="topObjectNum && topObjectNum.notCirculate" :duration="3200" class="card-panel-num" />
<count-to :start-val="0" :end-val="topObjectNum && topObjectNum.notCirculate" :duration="3200" class="card-panel-num" style="background-color: #545b65;" />
</div>
</div>
</div>
@ -34,7 +34,7 @@
<div class="card-panel-description">
传阅中数量
<div class="card-panel-text">
<count-to :start-val="0" :end-val="topObjectNum && topObjectNum.circulateing" :duration="3200" class="card-panel-num" />
<count-to :start-val="0" :end-val="topObjectNum && topObjectNum.circulateing" :duration="3200" class="card-panel-num" style="background-color: #2ecaac;" />
</div>
</div>
</div>
@ -47,7 +47,7 @@
<div class="card-panel-description">
已完成数量
<div class="card-panel-text">
<count-to :start-val="0" :end-val="topObjectNum && topObjectNum.circulated" :duration="3200" class="card-panel-num" />
<count-to :start-val="0" :end-val="topObjectNum && topObjectNum.circulated" :duration="3200" class="card-panel-num" style="background-color: #0348f3;" />
</div>
</div>
</div>

Loading…
Cancel
Save