You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
279 lines
9.9 KiB
279 lines
9.9 KiB
<template>
|
|
<div class="app-container">
|
|
<div class="venue-header">
|
|
<h4><i class="iconfont icon-shuju" />数据总览</h4>
|
|
<p><i class="iconfont icon-gongsi" />{{ user.fonds.fondsName }}</p>
|
|
</div>
|
|
<div class="venue-content dataScreening-content">
|
|
<crudOperation :permission="permission">
|
|
<template v-slot:middle>
|
|
<el-button v-permission="permission.add" class="check-btn" size="mini" @click="toAdd(1)">
|
|
<i class="iconfont icon-shengchengpandiandan" />
|
|
全量盘点
|
|
</el-button>
|
|
</template>
|
|
<template v-slot:right>
|
|
<el-button :loading="crud.downloadLoading" size="mini" @click="doExport(crud.selections)">
|
|
<i class="iconfont icon-daochu" />
|
|
导出
|
|
</el-button>
|
|
</template>
|
|
</crudOperation>
|
|
<div class="venue-left">
|
|
<div class="container-right tab-content">
|
|
<span class="right-top-line" />
|
|
<span class="left-bottom-line" />
|
|
<ul class="tab-nav">
|
|
<li v-for="(item,index) in floorOptions" :key="index" :class="{ 'active-tab-nav': tabIndex == index }" @click="changeActiveTab(index)">{{ item.floorName }}<i /></li>
|
|
<!-- 最右侧装饰img -->
|
|
<span class="tab-right-img" />
|
|
</ul>
|
|
<div class="total-data">
|
|
<span>楼层概况</span>
|
|
<p>区域:1</p>
|
|
<p>书架:4</p>
|
|
<p>摄像头:12</p>
|
|
</div>
|
|
<CanvasPreview ref="previewRefs" v-loading="prewLoading" page-preview="floor" :current-mark-data="currentMarkData" :image-url="imageUrl" />
|
|
</div>
|
|
</div>
|
|
<div class="venue-right">
|
|
<div class="lib-right-item lib-info">
|
|
<h4>场馆概况</h4>
|
|
<ul class="data-right-list">
|
|
<li><p>楼层</p><span><i>5</i>层</span></li>
|
|
<li><p>区域</p><span><i>25</i>层</span></li>
|
|
<li><p>书架</p><span><i>100</i>层</span></li>
|
|
<li><p>摄像头</p><span><i>300</i>层</span></li>
|
|
</ul>
|
|
</div>
|
|
<div class="lib-right-item">
|
|
<h4>盘点概况</h4>
|
|
<div class="refresh-date">2024-11-28 09:46</div>
|
|
<ul class="data-right-list">
|
|
<li><p>在架</p><span><i>15000</i>册</span></li>
|
|
<li><p>错架</p><span><i>300</i>层</span> <span class="percentage">(2.00%)</span></li>
|
|
<li><p>错序</p><span><i>0</i>层</span><span class="percentage">(0.00%)</span></li>
|
|
</ul>
|
|
</div>
|
|
<div class="lib-right-item">
|
|
<h4>流通统计</h4>
|
|
<div class="refresh-date">2024-11-28 09:46</div>
|
|
<bookSwiper />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- form -->
|
|
<!-- <el-dialog append-to-body :close-on-click-modal="false" :modal-append-to-body="false" :before-close="crud.cancelCU" :visible="crud.status.cu > 0" :title="crud.status.title">
|
|
<span class="dialog-right-top" />
|
|
<span class="dialog-left-bottom" />
|
|
<div class="setting-dialog">
|
|
<el-form ref="form" :inline="true" :model="form" :rules="rules" size="small" label-width="80px">
|
|
<el-form-item label="盘点单号" prop="stockBill">
|
|
<el-input v-model="form.stockBill" disabled />
|
|
</el-form-item>
|
|
<el-form-item label="盘点类型" prop="stockTypeName">
|
|
<el-input v-model="form.stockTypeName" disabled />
|
|
</el-form-item>
|
|
<el-form-item label="目标位置" prop="stockRegion">
|
|
<el-input v-model="form.stockRegion" disabled />
|
|
</el-form-item>
|
|
<el-form-item label="目标数量" prop="stockGridNumName">
|
|
<el-input v-model="form.stockGridNumName" disabled />
|
|
</el-form-item>
|
|
<el-row>
|
|
<el-form-item label="备注" prop="stockRemarks">
|
|
<el-input v-model="form.stockRemarks" type="textarea" style="width: 572px;" :rows="4" />
|
|
</el-form-item>
|
|
</el-row>
|
|
</el-form>
|
|
<div slot="footer" class="dialog-footer">
|
|
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
|
<el-button :loading="crud.status.cu === 2" type="primary" @click="crud.submitCU">保存</el-button>
|
|
</div>
|
|
</div>
|
|
</el-dialog> -->
|
|
<!-- @refresh="initData" -->
|
|
<eForm ref="eform" />
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import { FetchInitLibraryRegionList } from '@/api/area/index'
|
|
import crudStockTaskLog from '@/api/stockTaskLog/index'
|
|
// import crudFloor from '@/api/floor/index'
|
|
import CRUD, { presenter, header, crud } from '@crud/crud'
|
|
import crudOperation from '@crud/CRUD.operation'
|
|
import { mapGetters } from 'vuex'
|
|
import defaultImg from '@/assets/images/system/default-img.jpg'
|
|
import bookSwiper from '@/views/components/bookSwiper.vue'
|
|
import CanvasPreview from '@/views/components/canvasPreview.vue'
|
|
import eForm from './module/form'
|
|
|
|
export default {
|
|
name: 'DataScreening',
|
|
components: { crudOperation, bookSwiper, CanvasPreview, eForm },
|
|
cruds() {
|
|
return CRUD({ title: '数据总览', url: 'api/libraryFloor/initLibraryFloorList', crudMethod: { ...crudStockTaskLog }, sort: [], optShow: {
|
|
add: false,
|
|
edit: false,
|
|
del: false,
|
|
download: false,
|
|
group: false,
|
|
reset: false
|
|
}})
|
|
},
|
|
mixins: [presenter(), header(), crud()],
|
|
data() {
|
|
const _this = this
|
|
return {
|
|
prewLoading: false,
|
|
floorOptions: [],
|
|
tabIndex: 0,
|
|
defaultImg: defaultImg,
|
|
imageUrl: defaultImg,
|
|
imageRegionUrl: defaultImg,
|
|
currentMarkData: null,
|
|
allCoverData: [],
|
|
swiperActiveIndex: 0,
|
|
rightDataIndex: null,
|
|
swiperOptionContent: {
|
|
slidesPerView: 'auto',
|
|
on: {
|
|
slideChangeTransitionStart: function() {
|
|
_this.rightDataIndex = null
|
|
_this.swiperActiveIndex = this.activeIndex
|
|
_this.swiperTitle.slideTo(this.activeIndex, 500, false)
|
|
}
|
|
}
|
|
},
|
|
swiperOptionTitle: {
|
|
slidesPerView: 'auto',
|
|
freeMode: true
|
|
},
|
|
tabListData: [{ name: '热门图书' }, { name: '热门架位' }, { name: '冷面图书' }],
|
|
permission: {
|
|
add: ['admin', 'floor:add'],
|
|
edit: ['admin', 'floor:edit'],
|
|
del: ['admin', 'floor:del']
|
|
}
|
|
}
|
|
},
|
|
computed: {
|
|
...mapGetters([
|
|
'user',
|
|
'baseApi'
|
|
]),
|
|
swiperContent() {
|
|
return this.$refs.swiperContent.$el.swiper
|
|
}
|
|
},
|
|
methods: {
|
|
[CRUD.HOOK.beforeRefresh]() {
|
|
},
|
|
[CRUD.HOOK.afterRefresh](crud) {
|
|
this.floorOptions = crud.data
|
|
|
|
if (this.$route.query.floorTabIndex) {
|
|
this.tabIndex = this.$route.query.floorTabIndex
|
|
} else {
|
|
this.tabIndex = 0
|
|
}
|
|
|
|
this.changeActiveTab(this.tabIndex)
|
|
},
|
|
// // 新增前
|
|
// [CRUD.HOOK.beforeToAdd]() {
|
|
// if (this.crud.form.stockType === 1) {
|
|
// this.crud.form.stockTypeName = '全量盘点'
|
|
// }
|
|
|
|
// Promise.all([
|
|
// crudStockTaskLog.FetchNewBillNo(),
|
|
// crudStockTaskLog.FetchStockGirdNum()
|
|
// ]).then(([newBillNoRes, stockGridNumRes]) => {
|
|
// this.crud.form.stockBill = newBillNoRes
|
|
// this.crud.form.stockGridNumName = stockGridNumRes + ' / 层位'
|
|
// this.crud.form.stockGridNum = stockGridNumRes
|
|
// }).catch(error => {
|
|
// console.error(error)
|
|
// })
|
|
// },
|
|
// // 提交前的验证
|
|
// [CRUD.HOOK.afterValidateCU](crud) {
|
|
// console.log(crud.form)
|
|
// delete crud.form.stockGridNumName
|
|
// delete crud.form.stockTypeName
|
|
// return true
|
|
// },
|
|
toAdd(type) {
|
|
this.$refs.eform.formVisible = true
|
|
this.$refs.eform.setData(type)
|
|
this.$refs.eform.form.stockRegion = '全部区域'
|
|
},
|
|
changeActiveTab(index) {
|
|
this.prewLoading = true
|
|
if (this.$refs.previewRefs.canvasPreview.lowerCanvasEl) {
|
|
this.$refs.previewRefs.canvasPreview.clear()
|
|
this.$refs.previewRefs.canvasPreview.dispose()
|
|
}
|
|
this.allCoverData = []
|
|
this.tabIndex = index
|
|
const params = {
|
|
'floorId': this.floorOptions[index].id
|
|
}
|
|
FetchInitLibraryRegionList(params).then(res => {
|
|
this.allCoverData = res.content
|
|
if (this.floorOptions[index].floorMap) {
|
|
this.imageUrl = this.baseApi + '/api/fileRelevant/getImg?imgId=' + this.floorOptions[index].floorMap
|
|
} else {
|
|
this.imageUrl = this.defaultImg
|
|
}
|
|
|
|
if (this.allCoverData.length !== 0) {
|
|
this.currentMarkData = this.allCoverData[0]
|
|
const parsedSignPoints = this.allCoverData.map(item => {
|
|
const signPoint = JSON.parse(item.signPoint)
|
|
return {
|
|
id: item.id,
|
|
name: item.regionName,
|
|
floorName: item.floorName,
|
|
floorId: item.floorId,
|
|
pointInfo: signPoint.pointInfo[0].pointInfo
|
|
}
|
|
})
|
|
const imgInfo = JSON.parse(this.allCoverData[0].signPoint).imgInfo
|
|
|
|
const result = {
|
|
pointInfo: parsedSignPoints,
|
|
imgInfo: imgInfo
|
|
}
|
|
this.$nextTick(() => {
|
|
this.$refs.previewRefs.initCanvasPreview(result, this.tabIndex)
|
|
})
|
|
} else {
|
|
this.currentMarkData = {}
|
|
setTimeout(() => {
|
|
this.prewLoading = false
|
|
}, 500)
|
|
}
|
|
}).catch(() => {
|
|
})
|
|
},
|
|
handleSlidClickFun(index) {
|
|
this.rightDataIndex = null
|
|
this.handleSlideToFun(index)
|
|
},
|
|
handleSlideToFun(index) {
|
|
this.swiperActiveIndex = index
|
|
this.swiperContent.slideTo(index, 500, false)
|
|
this.swiperTitle.slideTo(index, 500, false)
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
</style>
|