Browse Source

公文优化

master
xuhuajiao 2 days ago
parent
commit
18c4f86f37
  1. 55
      src/assets/styles/archives-manage.scss
  2. 85
      src/views/archivesMIOD/miodLibrary/module/detail.vue
  3. 3
      src/views/archivesMIOD/miodRecord/index.vue
  4. 89
      src/views/components/category/PreviewForm.vue

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

@ -1021,4 +1021,59 @@
background: url('~@/assets/images/icon/jjdq.png') no-repeat left center;
background-size: 23px 23px;
}
}
.checkbox-list-depts{
display: flex;
justify-content: flex-start;
flex-wrap: wrap;
max-height: 480px;
overflow: hidden;
overflow-y: scroll;
li{
width: calc(100% / 5 - 10px);
height: 40px;
margin-right: 10px;
margin-top: 10px;
overflow: hidden;
&:hover{
background-color: #EAF3FB;
}
&.no-depts{
// border-color: #e6e8ed;
// color: #a6adb6;
background-color: #f3f5f9;
}
&.lending-depts{
// border-color: #07A35A;
// color: #07A35A;
background-color: #e0fcef;
}
&.blue-depts{
// border-color: #e6e8ed;
// color: #0348f3;
background-color: #eef5fe;
}
.el-checkbox {
.el-checkbox__input{
vertical-align: top;
}
.el-checkbox__label{
& div{
margin-top: -2px;
& p:first-child{
color: #0c0e1e;
max-width: 120px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
& p:last-child{
color: #a5a5a5;
}
}
}
}
}
}

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

@ -127,7 +127,7 @@
<el-table-column v-if="!isMidoRecord" prop="update_time" label="传阅操作" min-width="80" align="center">
<template slot-scope="scope">
<div v-if="scope.row.read_type!=='传阅中'">
<el-tooltip class="item" effect="dark" content="阅" placement="top">
<el-tooltip class="item" effect="dark" content="人工借阅" placement="top">
<!-- 传阅 - 选择用户 -->
<el-button :loading="lendBtnLoading[scope.row.id]" style="padding: 4px 2px 4px 6px !important; color: #0348f3 !important; background-color: #dcedfd !important; border: 1px solid #9bd1ff !important;" @click="handleLendFile(scope.row)"><i class="iconfont icon-liuchengfaqi" /></el-button>
</el-tooltip>
@ -153,7 +153,7 @@
</template>
</el-table-column>
<el-table-column prop="borrow_name" label="传阅者" min-width="85" />
<el-table-column prop="borrow_type" label="类型">
<el-table-column prop="borrow_type" label="类型" width="55">
<template slot-scope="scope">
<div>
<span v-if="scope.row.borrow_type === 1">部门</span>
@ -161,6 +161,7 @@
</div>
</template>
</el-table-column>
<el-table-column prop="remarks" label="备注" min-width="120" show-overflow-tooltip />
<el-table-column prop="start_time" label="开始时间" width="180">
<template slot-scope="scope">
<div>{{ scope.row.start_time | parseTime }}</div>
@ -218,11 +219,23 @@
</el-dialog>
<!-- @open="onDialogOpen" -->
<el-dialog class="miod-depts-dialog" :append-to-body="true" :visible="deptsVisible" :before-close="handleBorrowClose" :close-on-click-modal="false" title="领导及部门">
<el-dialog class="miod-depts-dialog" :append-to-body="true" :visible="deptsVisible" :before-close="handleBorrowClose" :close-on-click-modal="false" title="人工借阅">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<el-table ref="deptsMiodTable" :data="deptsMiodTable" highlight-current-row row-key="id" height="400" style="width: 100%;" @row-click="clickRowHandlerDepts" @selection-change="selectionChangeHandlerDepts">
<ul class="checkbox-list-depts">
<li v-for="(item, index) in deptsMiodTable" :key="index" :class="getDeptClass(item)">
<el-checkbox v-model="item.checked" @change="handleCheckChange(item)">
<div>
<el-tooltip class="item" effect="dark" :content="item.borrowName" placement="top-start">
<p> {{ item.borrowName }}</p>
</el-tooltip>
<p> {{ item.borrowNo }}</p>
</div>
</el-checkbox>
</li>
</ul>
<!-- <el-table ref="deptsMiodTable" :data="deptsMiodTable" highlight-current-row row-key="id" height="400" style="width: 100%;" @row-click="clickRowHandlerDepts" @selection-change="selectionChangeHandlerDepts">
<el-table-column type="selection" width="55" />
<el-table-column prop="borrowName" label="借阅者名称" />
<el-table-column prop="borrowType" label="借阅者类型">
@ -246,9 +259,9 @@
<div>{{ scope.row.create_time | parseTime }}</div>
</template>
</el-table-column>
</el-table>
</el-table> -->
<!--分页组件-->
<el-pagination
<!-- <el-pagination
v-if="deptsMiodTable.length !== 0"
:current-page="pageDepts.page"
:total="pageDepts.total"
@ -257,7 +270,7 @@
layout="total, prev, pager, next, sizes"
@size-change="handleDeptsSizeChange"
@current-change="handleDeptsCurrentPage"
/>
/> -->
</div>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="handleBorrowClose">取消</el-button>
@ -270,7 +283,7 @@
<script>
// import { crud } from '@crud/crud'
import { FetchArchivesDetails, FetchInitDocumentDetailsList, FetchAddDocumentDetails, FetchDeleteDocumentDetails, FetchInitDistributorAllByDocumentId, FetchInitOperate, FetchReadGW, FetchBingdingLabel, FetchUnbindTag, FetchArchivesDetailsBorrowLog, FetchLend, FetchBorrowerdsByIds } from '@/api/system/documentArchives'
import { FetchInitBorrowerList } from '@/api/system/borrower'
import { FetchInitBorrowerListOrderNo } from '@/api/system/borrower'
import { mapGetters } from 'vuex'
export default {
@ -382,6 +395,18 @@ export default {
mounted() {
},
methods: {
getDeptClass(item) {
if (item.startTime === null && item.actualReturnTime === null) {
//
return ''
} else if (item.startTime !== null && item.actualReturnTime === null) {
//
return 'lending-depts'
} else {
//
return 'blue-depts'
}
},
getStateClass(status) {
switch (status) {
case '未传阅':
@ -782,10 +807,35 @@ export default {
this.singleSelectedDept = null
this.deptsMiodTable = []
// this.btnLoading = true
FetchInitBorrowerList(this.filterParams)
let documentId
if (this.pageType && (this.pageType === 'search' || this.pageType === 'miodRecord')) {
documentId = this.parentInfo.document_id
} else {
documentId = this.selectedDocument.isType === 2
? this.selectedDocument.id
: this.selectedDocument.documentId
}
const param = {
documentId,
archivesId: this.pageType && this.pageType === 'miodRecord'
? this.parentInfo.details_type === 1
? this.parentInfo.archives_id
: this.parentInfo.parents_id
: this.parentInfo.id
}
console.log('param', param)
FetchInitBorrowerListOrderNo(param)
.then(res => {
this.deptsMiodTable = res.content || []
this.pageDepts.total = res.totalElements || 0
if (res && res.length > 0) {
this.deptsMiodTable = res.map(item => ({
...item,
checked: item.checked || false
}))
} else {
this.deptsMiodTable = []
}
// this.pageDepts.total = res.totalElements || 0
})
.catch(error => {
this.$message.error('获取数据失败,请稍后重试')
@ -795,12 +845,22 @@ export default {
// this.btnLoading = false
})
},
handleCheckChange(checkedItem) {
this.deptsMiodTable.forEach(item => {
item.checked = false
})
checkedItem.checked = true
this.singleSelectedDept = checkedItem
},
handleComfireDepts() {
if (this.singleSelectedDept !== null) {
const param = {
'borrowDocumentTid': this.currentLendData.reg_no,
'borrowerNo': this.singleSelectedDept.borrowNo
'borrowerId': this.singleSelectedDept.id
}
console.log('singleSelectedDept', this.singleSelectedDept)
console.log('param', param)
FetchLend(param).then((res) => {
console.log('resLend', res)
@ -810,6 +870,7 @@ export default {
this.$message({ message: res.msg, type: 'error', offset: 8 })
}
this.getInitDocumentDetailsList()
this.getDetial()
this.deptsVisible = false
this.$set(this.lendBtnLoading, this.currentLendData.id, false)
}).catch(error => {

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

@ -56,7 +56,7 @@
</template>
</el-table-column>
<el-table-column prop="borrow_name" label="借阅者" />
<el-table-column prop="borrow_type" label="借阅者类型">
<el-table-column prop="borrow_type" label="类型" width="55">
<template slot-scope="scope">
<div>
<span v-if="scope.row.borrow_type === 1">部门</span>
@ -64,6 +64,7 @@
</div>
</template>
</el-table-column>
<el-table-column prop="remarks" label="备注" min-width="120" show-overflow-tooltip />
<el-table-column prop="start_time" label="传阅开始时间" width="200">
<template slot-scope="scope">
<div>{{ scope.row.start_time | parseTime }}</div>

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

@ -112,7 +112,7 @@
v-for="tag in miodDeptsTags"
:key="tag.id"
v-model="addOrUpdateForm.miodDepts"
:class="(!tag.readType && tag.readType!==0) ? 'no-depts' : tag.readType === 0 ? 'no-depts' : tag.readType === 1 ? 'lending-depts' : ''"
:class="getTagsDeptClass(tag)"
closable
:disable-transitions="false"
@close="handleCloseDeptsTag(2, tag, $event)"
@ -196,7 +196,7 @@
</div>
</el-dialog>
<el-dialog class="miod-depts-dialog" :append-to-body="true" :visible="deptsVisible" :before-close="handleClose" :close-on-click-modal="false" title="领导及部门" @open="onDialogOpen">
<el-dialog class="miod-depts-dialog" :append-to-body="true" :visible="deptsVisible" :before-close="handleClose" :close-on-click-modal="false" :title="deptsTitle" @open="onDialogOpen">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
@ -362,7 +362,8 @@ export default {
hostDepartmentSelections: [],
hostDepartmentTags: [],
pendingSelectionHostIds: [],
tagsType: null
tagsType: null,
deptsTitle: '领导及部门'
// allChecked: false
}
},
@ -445,6 +446,29 @@ export default {
mounted() {
},
methods: {
getTagsDeptClass(item) {
console.log(item.readType)
if (!item.readType && item.readType !== 0) {
if (item.startTime === null && item.actualReturnTime === null) {
//
return 'no-depts'
} else if (item.startTime !== null && item.actualReturnTime === null) {
//
return 'lending-depts'
} else {
//
return 'blue-depts'
}
} else {
if (item.readType === 0) {
return 'no-depts'
} else if (item.readType === 1) {
return 'lending-depts'
} else {
return ''
}
}
},
getDeptClass(item) {
if (item.startTime === null && item.actualReturnTime === null) {
//
@ -485,6 +509,11 @@ export default {
},
// /
fetchDeptsList() {
if (this.tagsType === 1) {
this.deptsTitle = '主办部门'
} else {
this.deptsTitle = '需传阅领导及部门'
}
// this.btnLoading = true
let documentId
if (this.selectedDocument.isType === 2) {
@ -2075,58 +2104,4 @@ export default {
display: none;
}
.checkbox-list-depts{
display: flex;
justify-content: flex-start;
flex-wrap: wrap;
max-height: 480px;
overflow: hidden;
overflow-y: scroll;
li{
width: calc(100% / 5 - 10px);
height: 40px;
margin-right: 10px;
margin-top: 10px;
overflow: hidden;
&:hover{
background-color: #EAF3FB;
}
&.no-depts{
// border-color: #e6e8ed;
color: #a6adb6;
background-color: #f3f5f9;
}
&.lending-depts{
// border-color: #07A35A;
color: #07A35A;
background-color: #e0fcef;
}
&.blue-depts{
// border-color: #e6e8ed;
color: #0348f3;
background-color: #eef5fe;
}
::v-deep .el-checkbox {
.el-checkbox__input{
vertical-align: top;
}
.el-checkbox__label{
& div{
margin-top: -2px;
& p:first-child{
color: #0c0e1e;
max-width: 120px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
& p:last-child{
color: #a5a5a5;
}
}
}
}
}
}
</style>
Loading…
Cancel
Save