Browse Source

0914修改需求

master
xuhuajiao 1 year ago
parent
commit
5b966e38ce
  1. 10
      src/assets/styles/yxk-admin.scss
  2. 6
      src/views/archivesManage/archivesList/archivesJuannei/index.vue
  3. 222
      src/views/archivesManage/archivesSearch/index.vue
  4. 5
      src/views/home.vue

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

@ -375,14 +375,20 @@
background-color: transparent; background-color: transparent;
} }
.el-checkbox__input.is-checked .el-checkbox__inner,
.el-checkbox__input.is-disabled .el-checkbox__inner{
.el-checkbox__input.is-checked .el-checkbox__inner{
border-color: #339CFF; border-color: #339CFF;
background: transparent; background: transparent;
&::after{ &::after{
border-color: #339CFF; border-color: #339CFF;
} }
} }
.el-checkbox__input.is-disabled .el-checkbox__inner{
border-color: #012d7f;
background: transparent;
&::after{
border-color: #012d7f;
}
}
.el-table__body tr.hover-row > td, .el-table__body tr.hover-row > td,
.el-table__body tr.hover-row.current-row > td, .el-table__body tr.hover-row.current-row > td,

6
src/views/archivesManage/archivesList/archivesJuannei/index.vue

@ -21,8 +21,8 @@
</div> </div>
<div class="head-search"> <div class="head-search">
<!-- @keyup.enter.native="crud.toQuery" --> <!-- @keyup.enter.native="crud.toQuery" -->
<el-input v-model="juanneiQuery[juanneiInputSelect]" clearable size="small" placeholder="请输入关键词" style="width: 200px;" class="input-prepend filter-item" @clear="getTableList()" @keyup.enter.native="getTableList">
<el-select slot="prepend" v-model="juanneiInputSelect" style="width: 85px" @change="querySelect(juanneiInputSelect)">
<el-input v-model="juanneiQuery[juanneiInputSelect]" clearable size="small" placeholder="请输入关键词" style="width: 220px;" class="input-prepend filter-item" @clear="getTableList()" @keyup.enter.native="getTableList">
<el-select slot="prepend" v-model="juanneiInputSelect" style="width: 100px" @change="querySelect(juanneiInputSelect)">
<el-option <el-option
v-for="item in queryOption" v-for="item in queryOption"
:key="item.value" :key="item.value"
@ -382,7 +382,7 @@ export default {
padding-left: 15px !important; padding-left: 15px !important;
} }
.el-input__inner { .el-input__inner {
padding-left: 85px !important;
padding-left: 100px !important;
} }
} }
::v-deep .el-table__fixed-right-patch{ ::v-deep .el-table__fixed-right-patch{

222
src/views/archivesManage/archivesSearch/index.vue

@ -1,8 +1,8 @@
<template> <template>
<div class="search-main">
<div v-loading="searchLoading" class="search-main">
<div class="head-container"> <div class="head-container">
<h2 v-if="this.$route.path.indexOf('dashboard') === -1">模糊检索</h2> <h2 v-if="this.$route.path.indexOf('dashboard') === -1">模糊检索</h2>
<div class="search-header">
<div v-if="isHomeSearch" class="search-header">
<el-checkbox-group v-model="checkList" @change="handleCategoryTypes"> <el-checkbox-group v-model="checkList" @change="handleCategoryTypes">
<el-checkbox v-for="item in categoryTypesOptions" :key="item.value" :label="item.value">{{ item.label }}</el-checkbox> <el-checkbox v-for="item in categoryTypesOptions" :key="item.value" :label="item.value">{{ item.label }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
@ -33,29 +33,25 @@
</div> </div>
<div v-if="this.$route.path.indexOf('dashboard') === -1" class="search-result"> <div v-if="this.$route.path.indexOf('dashboard') === -1" class="search-result">
<div v-show="isShow" class="search-title"> <div v-show="isShow" class="search-title">
<p>检索结果</p>
<p>本次检索结果共计{{ resNum }}条数据</p>
<el-button v-if="resNum !== 0" class="lending-btn iconfont" :disabled="selections.length === 0" type="primary" @click="handleLending"><svg-icon icon-class="jieyue" class="svg-arc-style" />借阅</el-button>
<p v-else class="search-res-left">检索结果</p>
<p :class="{'search-res-num' : resNum !== 0 }">本次检索结果共计{{ resNum }}条数据</p>
<el-checkbox v-if="resNum !== 0" v-model="fixedStatusBar">隐藏状态栏</el-checkbox>
</div> </div>
<div v-show="resNum > 0"> <div v-show="resNum > 0">
<el-table <el-table
ref="table" ref="table"
v-loading="loading" v-loading="loading"
class="archives-table"
:data="tableData" :data="tableData"
style="width: 100%;" style="width: 100%;"
height="calc(100vh - 493px)"
height="calc(100vh - 534px)"
@row-dblclick="handleDbClick" @row-dblclick="handleDbClick"
> <el-table-column
align="right"
@select-all="selectAll"
@row-click="clickRowHandler"
@select="handleCurrentChange"
> >
<template slot-scope="scope">
<!-- @click="handleEdit(scope.$index, scope.row)" -->
<el-button
v-if="scope.row.category_type !== 3"
class="lending-btn"
size="mini"
>借阅</el-button>
</template>
</el-table-column>
<el-table-column :selectable="checkboxT" type="selection" align="center" width="55" />
<el-table-column prop="doc_no" label="发文字号" show-overflow-tooltip width="140" align="center" /> <el-table-column prop="doc_no" label="发文字号" show-overflow-tooltip width="140" align="center" />
<el-table-column prop="child" label="子条数目" align="center" width="100" /> <el-table-column prop="child" label="子条数目" align="center" width="100" />
<el-table-column prop="security_class" label="密级" align="center" min-width="100" /> <el-table-column prop="security_class" label="密级" align="center" min-width="100" />
@ -86,36 +82,49 @@
</el-table-column> </el-table-column>
<el-table-column prop="created_date" label="成文日期" align="center" min-width="180" /> <el-table-column prop="created_date" label="成文日期" align="center" min-width="180" />
<!-- 未绑 / 已绑 --> <!-- 未绑 / 已绑 -->
<!-- <el-table-column label="标签" width="100" align="center" fixed="right">
<el-table-column label="标签" width="100" align="center" :fixed="fixedStatusBar ? false : 'right' ">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.category_type !== 3" :class="['row-state', 'row-binding', scope.row.tid ? 'state-active' : '' ]">{{ scope.row.tid ? '已绑': '未绑' }}</span>
<span v-if="scope.row.category_type !== 3" :class="['row-state', 'row-binding', scope.row.tag_no ? 'state-active' : '' ]">{{ scope.row.tag_no ? '已绑': '未绑' }}</span>
</template> </template>
</el-table-column> -->
</el-table-column>
<!-- state-active 已装/已入/已借/已绑 --> <!-- state-active 已装/已入/已借/已绑 -->
<!-- 未装 / 已装 --> <!-- 未装 / 已装 -->
<!-- <el-table-column label="装盒" width="100" align="center" fixed="right">
<el-table-column label="装盒" width="100" align="center" :fixed="fixedStatusBar ? false : 'right' ">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.category_type !== 3" :class="['row-state', 'row-packing', scope.row.case_no ? 'state-active' : '' ]">{{ scope.row.case_no ? '已装': '未装' }}</span>
<span v-if="scope.row.category_type !== 3" :class="['row-state', 'row-packing', scope.row.case_name ? 'state-active' : '' ]">{{ scope.row.case_name ? '已装': '未装' }}</span>
</template> </template>
</el-table-column> -->
</el-table-column>
<!-- is_storage 为空的情况下即没装盒 / 0 未入 / 1 待入 / 2 已入 / 3 待出--> <!-- is_storage 为空的情况下即没装盒 / 0 未入 / 1 待入 / 2 已入 / 3 待出-->
<!-- <span class="row-state row-warehousing">{{ storageTxt[scope.$index] }}</span> --> <!-- <span class="row-state row-warehousing">{{ storageTxt[scope.$index] }}</span> -->
<!-- <el-table-column label="入库" width="100" align="center" fixed="right">
<el-table-column label="入库" width="100" align="center" :fixed="fixedStatusBar ? false : 'right' ">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.category_type !== 3" :class="['row-state', 'row-warehousing', (storageTxt[scope.$index] === '已入' )? 'state-active' : '' ]">{{ storageTxt[scope.$index] }}</span> <span v-if="scope.row.category_type !== 3" :class="['row-state', 'row-warehousing', (storageTxt[scope.$index] === '已入' )? 'state-active' : '' ]">{{ storageTxt[scope.$index] }}</span>
</template> </template>
</el-table-column> -->
</el-table-column>
<!-- is_borrow 4 已归还 / 为空 - 未加入待借列表 - 在库 / 2 待借阅在待借列表/借出确认列表 - 待借 / 1待登记 - 不可借- 表示 / 3 待归还 - 已借 --> <!-- is_borrow 4 已归还 / 为空 - 未加入待借列表 - 在库 / 2 待借阅在待借列表/借出确认列表 - 待借 / 1待登记 - 不可借- 表示 / 3 待归还 - 已借 -->
<!-- <el-table-column label="借阅" width="100" align="center" fixed="right">
<el-table-column label="借阅" width="100" align="center" :fixed="fixedStatusBar ? false : 'right' ">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.category_type !== 3" :class="['row-state', 'row-lending', (borrowTxt[scope.$index] === '已借' )? 'state-active' : '' ]">{{ borrowTxt[scope.$index] }}</span> <span v-if="scope.row.category_type !== 3" :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 :page-size.sync="page.size" :total="page.total" :current-page.sync="page.page" style="margin-top: 8px;" layout="total, prev, pager, next, sizes" @size-change="sizeChangeHandler($event)" @current-change="pageChangeHandler" /> <el-pagination :page-size.sync="page.size" :total="page.total" :current-page.sync="page.page" style="margin-top: 8px;" layout="total, prev, pager, next, sizes" @size-change="sizeChangeHandler($event)" @current-change="pageChangeHandler" />
</div> </div>
<!-- 详情 --> <!-- 详情 -->
<detailDialog ref="detailDom" @openCol="openCol" /> <detailDialog ref="detailDom" @openCol="openCol" />
<!-- 借阅 -->
<el-dialog title="借阅" :visible.sync="lengingVisible" :close-on-click-modal="false" :before-close="handleClose">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<div class="dialog-delt">
<p><span>确定将当前档案加入借阅列表</span></p>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click.native="handleLendingConfirm">确定</el-button>
</div>
</div>
</el-dialog>
</div> </div>
</div> </div>
</template> </template>
@ -123,14 +132,27 @@
<script> <script>
import detailDialog from './module/detailDialog.vue' import detailDialog from './module/detailDialog.vue'
import { querySeniorArchives, FetchArchivesDetails, FetchArchivesMetadata } from '@/api/archivesManage/archivesList' import { querySeniorArchives, FetchArchivesDetails, FetchArchivesMetadata } from '@/api/archivesManage/archivesList'
import { FetchIsExistBorrow, FetchAddArchivesWaitRegister } from '@/api/archivesManage/lendManage'
import CallExternal from '@/api/storeManage/deviceManage/device' import CallExternal from '@/api/storeManage/deviceManage/device'
export default { export default {
name: 'ArchivesSearch', name: 'ArchivesSearch',
components: { detailDialog }, components: { detailDialog },
props: {
isHomeSearch: {
type: Boolean,
default: true
}
},
data() { data() {
return { return {
loading: false, loading: false,
tableData: [], tableData: [],
selections: [],
storageTxt: [],
borrowTxt: [],
fixedStatusBar: false,
searchLoading: false,
lengingVisible: false,
keywords: '', keywords: '',
select: ['maintitle'], select: ['maintitle'],
options: [ options: [
@ -162,7 +184,7 @@ export default {
homeSearchSelect: [], homeSearchSelect: [],
openLocation: null, openLocation: null,
deviceData: null, deviceData: null,
checkList: [3],
checkList: [3, 4, 5],
categoryTypesOptions: [ categoryTypesOptions: [
{ {
label: '案卷级', label: '案卷级',
@ -212,6 +234,26 @@ export default {
const selectedOption = this.options.find((c) => c.value === option) const selectedOption = this.options.find((c) => c.value === option)
return selectedOption ? selectedOption.label : '' return selectedOption ? selectedOption.label : ''
}, },
checkboxT(row, rowIndex) {
return row.category_type !== 3
},
// table -
selectAll(val) {
this.selections = val
},
// table - row
clickRowHandler(row) {
if (row.category_type !== 3) {
this.$refs.table.clearSelection()
this.$refs.table.toggleRowSelection(row)
this.selections = []
this.selections.push(row)
}
},
//
handleCurrentChange(selection, row) {
this.selections = selection
},
// //
handleDbClick(row) { handleDbClick(row) {
const params = { const params = {
@ -253,13 +295,19 @@ export default {
this.$router.push('/archivesManage/archivesSearch') this.$router.push('/archivesManage/archivesSearch')
localStorage.setItem('homeSearchWords', this.keywords) localStorage.setItem('homeSearchWords', this.keywords)
localStorage.setItem('homeSearchSelect', JSON.stringify(this.select)) localStorage.setItem('homeSearchSelect', JSON.stringify(this.select))
// localStorage.setItem('homeSearchCheckbox', JSON.stringify([3, 4, 5]))
} else { } else {
this.dimSearch() this.dimSearch()
} }
}, },
// //
dimSearch() { dimSearch() {
this.searchLoading = true
this.loading = true this.loading = true
// const homeSearchCheckbox = JSON.parse(localStorage.getItem('homeSearchCheckbox'))
// if (homeSearchCheckbox) {
// this.checkList = homeSearchCheckbox
// }
const arr = this.keywords.trim() // const arr = this.keywords.trim() //
if (arr.length === 0) { // if (arr.length === 0) { //
this.tableData = [] this.tableData = []
@ -270,6 +318,8 @@ export default {
this.page.page = 1 this.page.page = 1
localStorage.removeItem('homeSearchWords') localStorage.removeItem('homeSearchWords')
localStorage.removeItem('homeSearchSelect') localStorage.removeItem('homeSearchSelect')
this.searchLoading = false
// localStorage.removeItem('homeSearchCheckbox')
} else { } else {
this.params.categoryTypes = this.checkList.join(',') this.params.categoryTypes = this.checkList.join(',')
this.params.criteria = this.select.join(',') this.params.criteria = this.select.join(',')
@ -278,12 +328,54 @@ export default {
this.params.size = this.page.size this.params.size = this.page.size
this.doQuery(this.params) this.doQuery(this.params)
} }
this.loading = false
}, },
// //
doQuery(params) { doQuery(params) {
querySeniorArchives(params).then(res => { querySeniorArchives(params).then(res => {
this.loading = false
this.searchLoading = false
this.tableData = res.content this.tableData = res.content
this.tableData.forEach((item, index) => {
//
if (item.is_storage === 0) {
this.storageTxt[index] = '未入'
if (item.is_borrow === '') {
this.borrowTxt[index] = '-'
}
} else if (item.is_storage === 1) {
this.storageTxt[index] = '待入'
if (item.is_borrow === '') {
this.borrowTxt[index] = '-'
}
} else if (item.is_storage === 2) {
this.storageTxt[index] = '已入'
if (item.is_borrow === '') {
this.borrowTxt[index] = '在库'
}
} else if (item.is_storage === 3) {
this.storageTxt[index] = '待出'
if (item.is_borrow === '') {
this.borrowTxt[index] = '-'
}
} else if (item.is_storage === null) {
this.storageTxt[index] = '未入'
if (item.is_borrow === '') {
this.borrowTxt[index] = '-'
}
}
//
if (item.is_borrow === 1) {
this.borrowTxt[index] = '待借'
} else if (item.is_borrow === 2) {
this.borrowTxt[index] = '待借'
} else if (item.is_borrow === 3) {
this.borrowTxt[index] = '已借'
} else if (item.is_borrow === null) {
this.borrowTxt[index] = '在库'
}
})
this.page.total = res.totalElements this.page.total = res.totalElements
this.resNum = res.totalElements this.resNum = res.totalElements
this.isShow = true this.isShow = true
@ -365,6 +457,60 @@ export default {
console.log(error) console.log(error)
this.$message.error('连接失败') this.$message.error('连接失败')
}) })
},
//
handleLending() {
const index = this.selections.findIndex((item) => item.is_storage === 0 || item.is_storage === '' || item.is_storage === 1)
const index2 = this.selections.findIndex((item) => item.is_borrow === 3)
const index3 = this.selections.findIndex((item) => item.is_storage === 3)
if (index !== -1) {
this.$message.error('所选档案还未入库不能借阅')
return false
}
if (index3 !== -1) {
this.$message.error('待出档案不可借阅')
return false
}
if (index2 !== -1) {
this.$message.error('当前档案已借出,还未归还')
return false
}
const params = this.selections.map(item => {
return item.archives_id
})
FetchIsExistBorrow(params).then(data => {
if (data.length === 0) {
this.lengingVisible = true
} else if (data.length === this.selections.length) {
this.$message.error('所选档案不可借阅')
} else {
this.$message.error('部分档案不可借阅')
}
})
},
//
handleLendingConfirm() {
const params = this.selections.map(item => {
return item.archives_id
})
FetchAddArchivesWaitRegister(params).then(data => {
if (data.length !== 0) {
this.$message.success('借阅成功')
this.lengingVisible = false
this.params.categoryTypes = this.checkList.join(',')
this.params.criteria = this.select.join(',')
this.params.query = this.keywords.replace(/\s+/ig, ' ')
this.params.page = this.page.page - 1
this.params.size = this.page.size
this.doQuery(this.params)
this.selections = []
}
})
},
//
handleClose(done) {
this.lengingVisible = false
done()
} }
} }
} }
@ -450,10 +596,27 @@ export default {
padding: 0 20px; padding: 0 20px;
color: #fff; color: #fff;
.search-title{ .search-title{
padding:0 30px;
padding:0 20px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-bottom: 20px; margin-bottom: 20px;
line-height: 32px;
.search-res-left{
flex: 1;
}
.search-res-num{
flex: 1;
text-align: right;
margin-right: 30px;
}
.el-button{
margin-right: 20px;
}
::v-deep .el-checkbox{
.el-checkbox__label{
color: #fff;
}
}
} }
} }
::v-deep ::-webkit-scrollbar-corner{ ::v-deep ::-webkit-scrollbar-corner{
@ -482,6 +645,7 @@ export default {
border-color: #F65163; border-color: #F65163;
background-color: #F65163; background-color: #F65163;
&.is-disabled{ &.is-disabled{
color: #666;
border-color:#7A2831; border-color:#7A2831;
background-color: #7A2831; background-color: #7A2831;
} }

5
src/views/home.vue

@ -11,7 +11,7 @@
<div class="container-left search-area"> <div class="container-left search-area">
<span class="right-top-line" /> <span class="right-top-line" />
<span class="left-bottom-line" /> <span class="left-bottom-line" />
<SearchAcrives />
<SearchAcrives :is-home-search="isHomeSearch" />
</div> </div>
</el-col> </el-col>
<el-col :xs="24" :sm="24" :lg="8"> <el-col :xs="24" :sm="24" :lg="8">
@ -186,7 +186,8 @@ export default {
data() { data() {
return { return {
waitBorrowerData: [], waitBorrowerData: [],
floorIndex: 0
floorIndex: 0,
isHomeSearch: false
} }
}, },
created() { created() {

Loading…
Cancel
Save