|
|
|
@ -15,27 +15,37 @@ |
|
|
|
</h3> |
|
|
|
<div class="home-flowable" style="height: calc(100% - 54px); overflow-x: hidden;"> |
|
|
|
<div class="home-tab"> |
|
|
|
<span :class="{'home-tab-active': flowableTabIndex == 0}">未完成({{ stockLogIncompleteData.length !==0? stockLogIncompleteData.length: 0 }})</span> |
|
|
|
<span :class="{'home-tab-active': flowableTabIndex == 1}">已完成({{ stockLogCompletedData.length !==0? stockLogCompletedData.length: 0 }})</span> |
|
|
|
<span :class="{'home-tab-active': stockLogTabIndex == 0}" @click="changeStockLogTab(0)">未盘点({{ topObjectNum && topObjectNum.stockTakenotNum }})</span> |
|
|
|
<span :class="{'home-tab-active': stockLogTabIndex == 1}" @click="changeStockLogTab(1)">盘点中({{ topObjectNum && topObjectNum.stockTakeingNum }})</span> |
|
|
|
<span :class="{'home-tab-active': stockLogTabIndex == 2}" @click="changeStockLogTab(2)">已完成({{ topObjectNum && topObjectNum.stockTakedNum }})</span> |
|
|
|
</div> |
|
|
|
<div class="home-flowable-list" style="height: calc(100% - 45px); overflow-y: auto; overflow-x: hidden;"> |
|
|
|
<el-table v-if="stockLogIncompleteData.length !== 0" height="calc(100%)" :data="stockLogIncompleteData" class="archives-table" stripe style="width: 100%"> |
|
|
|
<el-table-column prop="stockBill" label="盘点单号" /> |
|
|
|
<el-table-column prop="state" label="状态" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="scope.row.state === 0" class="row-state row-lending state-active">已终止</span> |
|
|
|
<span v-if="scope.row.state === 1" class="row-state row-warehousing state-active">排队中</span> |
|
|
|
<span v-if="scope.row.state === 2" class="row-state row-binding state-active">盘点中</span> |
|
|
|
<span v-if="scope.row.state === 3" class="row-state row-physical state-active">已完成</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="createTime" label="时间" width="180"> |
|
|
|
<div class="home-flowable-list" style="height: calc(100% - 45px); overflow-x: hidden;"> |
|
|
|
<el-table |
|
|
|
v-show="stockData.length !== 0" |
|
|
|
ref="stockTableRef" |
|
|
|
height="calc(100%)" |
|
|
|
:data="stockData" |
|
|
|
class="archives-table" |
|
|
|
stripe |
|
|
|
style="width: 100%" |
|
|
|
@scroll="handleStockTableScroll" |
|
|
|
> |
|
|
|
<el-table-column prop="billNo" label="任务编号" min-width="180px" :show-overflow-tooltip="true" /> |
|
|
|
<el-table-column prop="warehouseName" label="所属仓库" /> |
|
|
|
<el-table-column prop="stockNum" label="总数" width="80px" align="right" /> |
|
|
|
<el-table-column prop="takeDate" label="发起时间" width="150px"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div>{{ scope.row.createTime | parseTime }}</div> |
|
|
|
<div>{{ scope.row.takeDate | parseTime }}</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<div slot="append" style="text-align:center;padding:12px 0;color:#666;font-size:13px;"> |
|
|
|
<span v-if="stockPage.loadingMore"> |
|
|
|
<i class="el-icon-loading" /> 加载中... |
|
|
|
</span> |
|
|
|
<span v-else-if="!stockPage.hasMore && stockData.length">没有更多数据</span> |
|
|
|
</div> |
|
|
|
</el-table> |
|
|
|
<div v-else class="empty-main" style="height: 100%;"> |
|
|
|
<div v-if="stockData.length === 0" class="empty-main" style="height: 100%;"> |
|
|
|
<svg-icon icon-class="empty" class-name="empty-img" /> |
|
|
|
<p>暂无数据</p> |
|
|
|
</div> |
|
|
|
@ -51,9 +61,6 @@ |
|
|
|
服务器监控 |
|
|
|
<div style="position: absolute; right: 20px; top: 20px; color: #999; cursor: pointer;" class="el-icon-refresh" @click="refreshSystemData" /> |
|
|
|
</h3> |
|
|
|
<!-- <div class="chart-wrapper"> --> |
|
|
|
<!-- <serverProgress :system-data="systemData" /> --> |
|
|
|
<!-- </div> --> |
|
|
|
<swiper |
|
|
|
ref="swiperServer" |
|
|
|
class="swiper-server" |
|
|
|
@ -66,17 +73,6 @@ |
|
|
|
<swiper-slide class="swiper-slide-server"> |
|
|
|
<serverProgress :system-data="systemData" /> |
|
|
|
</swiper-slide> |
|
|
|
<swiper-slide class="swiper-slide-server cpu-echarts"> |
|
|
|
<serverGpuUse :utilization="utilization" /> |
|
|
|
<div class="cpu-right"> |
|
|
|
<serverGpu :temperature="temperature" /> |
|
|
|
<serverGpuOther :memory-total="memoryTotal" :memory-free="memoryFree" /> |
|
|
|
</div> |
|
|
|
<div style="position: absolute; bottom: 136px; right: 70px; font-weight: bold;">{{ GPUName }}</div> |
|
|
|
</swiper-slide> |
|
|
|
<swiper-slide class="swiper-slide-server"> |
|
|
|
<serveTerminal ref="serveTerminalRefs" /> |
|
|
|
</swiper-slide> |
|
|
|
<div slot="pagination" class="swiper-pagination" /> |
|
|
|
</swiper> |
|
|
|
</div> |
|
|
|
@ -95,27 +91,48 @@ |
|
|
|
</h3> |
|
|
|
<div class="home-flowable" style="height: calc(100% - 54px); overflow-x: hidden;"> |
|
|
|
<div class="home-tab"> |
|
|
|
<span :class="{'home-tab-active': flowableTabIndex == 0}">未完成({{ stockLogIncompleteData.length !==0? stockLogIncompleteData.length: 0 }})</span> |
|
|
|
<span :class="{'home-tab-active': flowableTabIndex == 1}">已完成({{ stockLogCompletedData.length !==0? stockLogCompletedData.length: 0 }})</span> |
|
|
|
<span :class="{'home-tab-active': inOutTabIndex == 0}" @click="changeInOutTab(0)">未开始({{ topObjectNum && topObjectNum.inOutnotNum }})</span> |
|
|
|
<span :class="{'home-tab-active': inOutTabIndex == 1}" @click="changeInOutTab(1)">进行中({{ topObjectNum && topObjectNum.inOutingNum }})</span> |
|
|
|
<span :class="{'home-tab-active': inOutTabIndex == 2}" @click="changeInOutTab(2)">已完成({{ topObjectNum && topObjectNum.inOutedNum }})</span> |
|
|
|
</div> |
|
|
|
<div class="home-flowable-list" style="height: calc(100% - 45px); overflow-y: auto; overflow-x: hidden;"> |
|
|
|
<el-table v-if="stockLogIncompleteData.length !== 0" height="calc(100%)" :data="stockLogIncompleteData" class="archives-table" stripe style="width: 100%"> |
|
|
|
<el-table-column prop="stockBill" label="盘点单号" /> |
|
|
|
<el-table-column prop="state" label="状态" align="center"> |
|
|
|
<div class="home-flowable-list" style="height: calc(100% - 45px); overflow-x: hidden;"> |
|
|
|
<el-table |
|
|
|
v-show="inOutData.length !== 0" |
|
|
|
ref="inOutTableRef" |
|
|
|
height="calc(100%)" |
|
|
|
:data="inOutData" |
|
|
|
class="archives-table" |
|
|
|
stripe |
|
|
|
style="width: 100%" |
|
|
|
@scroll="handleInOutTableScroll" |
|
|
|
> |
|
|
|
<el-table-column prop="manageType" label="类型"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="scope.row.state === 0" class="row-state row-lending state-active">已终止</span> |
|
|
|
<span v-if="scope.row.state === 1" class="row-state row-warehousing state-active">排队中</span> |
|
|
|
<span v-if="scope.row.state === 2" class="row-state row-binding state-active">盘点中</span> |
|
|
|
<span v-if="scope.row.state === 3" class="row-state row-physical state-active">已完成</span> |
|
|
|
<el-tag v-if="scope.row.manageType === 1">入库</el-tag> |
|
|
|
<el-tag v-if="scope.row.manageType === 2" type="success">出库</el-tag> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="createTime" label="时间" width="180"> |
|
|
|
<el-table-column prop="mainBillNo" label="任务单号" min-width="180px" :show-overflow-tooltip="true" /> |
|
|
|
<el-table-column prop="fondsName" label="所属市州" /> |
|
|
|
<el-table-column prop="inOutCount" label="总数量" width="80px" align="right" /> |
|
|
|
<el-table-column prop="checkStartTime" label="出/入库开始时间" width="150px"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div>{{ scope.row.createTime | parseTime }}</div> |
|
|
|
<div>{{ scope.row.checkStartTime | parseTime }}</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="checkEndTime" label="出/入库结束时间" width="150px"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div>{{ scope.row.checkEndTime | parseTime }}</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<div slot="append" style="text-align:center;padding:12px 0;color:#666;font-size:13px;"> |
|
|
|
<span v-if="inOutPage.loadingMore"> |
|
|
|
<i class="el-icon-loading" /> 加载中... |
|
|
|
</span> |
|
|
|
<span v-else-if="!inOutPage.hasMore && inOutData.length">没有更多数据</span> |
|
|
|
</div> |
|
|
|
</el-table> |
|
|
|
<div v-else class="empty-main" style="height: 100%;"> |
|
|
|
<div v-if="inOutData.length === 0" class="empty-main" style="height: 100%;"> |
|
|
|
<svg-icon icon-class="empty" class-name="empty-img" /> |
|
|
|
<p>暂无数据</p> |
|
|
|
</div> |
|
|
|
@ -139,78 +156,77 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
import PanelGroup from './dashboard/PanelGroup' |
|
|
|
// import lendAcross from '@/views/components/echarts/lendAcross.vue' |
|
|
|
// import catePie from '@/views/components/echarts/catePie.vue' |
|
|
|
// import typePie from '@/views/components/echarts/typePie.vue' |
|
|
|
import serverProgress from '@/views/components/echarts/serverProgress.vue' |
|
|
|
import serverGpu from '@/views/components/echarts/serverGpu.vue' |
|
|
|
import serverGpuUse from '@/views/components/echarts/serverGpuUse.vue' |
|
|
|
import serverGpuOther from '@/views/components/echarts/serverGpuOther.vue' |
|
|
|
import serveTerminal from '@/views/components/serveTerminal.vue' |
|
|
|
import { FetchInitHomeInfo, FetchInitStockInfo } from '@/api/stockTask/index' |
|
|
|
import { FetchInitStockLogList } from '@/api/stockTaskLog/index' |
|
|
|
import { FetchInitBaseInfo } from '@/api/stockTask/index' |
|
|
|
import { FetchSystemInfo } from '@/api/home/cpu/index' |
|
|
|
import { FetchInitStockTakeBill, FetchInitInOutBill } from '@/api/asset/index' |
|
|
|
import { mapGetters } from 'vuex' |
|
|
|
import { swiper, swiperSlide } from 'vue-awesome-swiper' |
|
|
|
import 'swiper/dist/css/swiper.css' |
|
|
|
|
|
|
|
// 防抖函数 |
|
|
|
function debounce(fn, delay) { |
|
|
|
let timer = null |
|
|
|
return function(...args) { |
|
|
|
clearTimeout(timer) |
|
|
|
timer = setTimeout(() => { |
|
|
|
fn.apply(this, args) |
|
|
|
}, delay) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'Dashboard', |
|
|
|
components: { |
|
|
|
PanelGroup, |
|
|
|
// lendAcross, |
|
|
|
// catePie, |
|
|
|
// typePie, |
|
|
|
serverProgress, |
|
|
|
serverGpu, |
|
|
|
serverGpuUse, |
|
|
|
serverGpuOther, |
|
|
|
serveTerminal, |
|
|
|
swiper, |
|
|
|
swiperSlide |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
topObjectNum: { |
|
|
|
regionCount: 0, |
|
|
|
shelfCount: 0, |
|
|
|
gridCount: 0, |
|
|
|
deviceCount: 0, |
|
|
|
noStockGridCount: 0, |
|
|
|
deviceErrorCount: 0 |
|
|
|
assetTotalNum: 0, |
|
|
|
deviceNum: 0, |
|
|
|
fondsNum: 0, |
|
|
|
warehouseNum: 0, |
|
|
|
stockTakenotNum: 0, |
|
|
|
stockTakeingNum: 0, |
|
|
|
stockTakedNum: 0, |
|
|
|
inOutnotNum: 0, |
|
|
|
inOutingNum: 0, |
|
|
|
inOutedNum: 0 |
|
|
|
}, |
|
|
|
// 盘点日志 |
|
|
|
stockData: [], |
|
|
|
stockLogTabIndex: 0, |
|
|
|
stockPage: { |
|
|
|
currentPage: 1, |
|
|
|
pageSize: 10, |
|
|
|
loadingMore: false, |
|
|
|
hasMore: true |
|
|
|
}, |
|
|
|
// 出入库日志(新增) |
|
|
|
inOutData: [], |
|
|
|
inOutTabIndex: 0, |
|
|
|
inOutPage: { |
|
|
|
currentPage: 1, |
|
|
|
pageSize: 10, |
|
|
|
loadingMore: false, |
|
|
|
hasMore: true |
|
|
|
}, |
|
|
|
taskStockLogData: [], |
|
|
|
inOutLogData: [], |
|
|
|
echartsTimer: null, |
|
|
|
refreshtime: 10000, |
|
|
|
systemTimer: null, |
|
|
|
systemData: { |
|
|
|
cpuPercentage: 0, |
|
|
|
memPercentage: 0, |
|
|
|
sysFilesPercentage: 0 |
|
|
|
}, |
|
|
|
stockLogCompletedData: [], |
|
|
|
stockLogIncompleteData: [], |
|
|
|
|
|
|
|
archivesTotalNum: 0, |
|
|
|
flowableData: [], |
|
|
|
flowableTabIndex: 0, |
|
|
|
swiperOptionServer: { |
|
|
|
autoplay: { |
|
|
|
delay: 8000, |
|
|
|
disableOnInteraction: false |
|
|
|
}, |
|
|
|
slidesPerView: 'auto', |
|
|
|
pagination: { |
|
|
|
el: '.swiper-pagination', |
|
|
|
clickable: true |
|
|
|
slidesPerView: 'auto' |
|
|
|
} |
|
|
|
}, |
|
|
|
memoryFree: 0, |
|
|
|
memoryTotal: 0, |
|
|
|
GPUName: '', |
|
|
|
temperature: 0, |
|
|
|
utilization: 0 |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
@ -223,45 +239,189 @@ export default { |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.handleMainData() |
|
|
|
this.getInitStockTakeBill(true) |
|
|
|
this.getInitInOutBill(true) // 初始化出入库 |
|
|
|
this.getSystemInfo() |
|
|
|
this.getStockLog() |
|
|
|
this.handleInitStockInfo() |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
// 盘点表格滚动监听 |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.serveTerminalRefs.initData() |
|
|
|
if (this.$refs.stockTableRef) { |
|
|
|
const tableWrapper = this.$refs.stockTableRef.$el.querySelector('.el-table__body-wrapper') |
|
|
|
if (tableWrapper) { |
|
|
|
tableWrapper.addEventListener('scroll', debounce((e) => { |
|
|
|
const { scrollTop, scrollHeight, clientHeight } = e.target |
|
|
|
const distance = scrollHeight - scrollTop - clientHeight |
|
|
|
if (distance <= 80) { |
|
|
|
this.loadMoreStock() |
|
|
|
} |
|
|
|
}, 100)) |
|
|
|
} |
|
|
|
} |
|
|
|
// 出入库表格滚动监听 |
|
|
|
if (this.$refs.inOutTableRef) { |
|
|
|
const inOutTableWrapper = this.$refs.inOutTableRef.$el.querySelector('.el-table__body-wrapper') |
|
|
|
if (inOutTableWrapper) { |
|
|
|
inOutTableWrapper.addEventListener('scroll', debounce((e) => { |
|
|
|
const { scrollTop, scrollHeight, clientHeight } = e.target |
|
|
|
const distance = scrollHeight - scrollTop - clientHeight |
|
|
|
if (distance <= 80) { |
|
|
|
this.loadMoreInOut() |
|
|
|
} |
|
|
|
}, 100)) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
handleMainData() { |
|
|
|
const param = { |
|
|
|
'userId': this.user.id |
|
|
|
} |
|
|
|
FetchInitBaseInfo(param).then(data => { |
|
|
|
this.topObjectNum = { |
|
|
|
assetTotalNum: data.assetTotalNum || 0, |
|
|
|
deviceNum: data.deviceNum || 0, |
|
|
|
fondsNum: data.fondsNum || 0, |
|
|
|
warehouseNum: data.warehouseNum || 0, |
|
|
|
stockTakenotNum: data.stockTakenotNum || 0, |
|
|
|
stockTakeingNum: data.stockTakeingNum || 0, |
|
|
|
stockTakedNum: data.stockTakedNum || 0, |
|
|
|
inOutnotNum: data.inOutnotNum || 0, |
|
|
|
inOutingNum: data.inOutingNum || 0, |
|
|
|
inOutedNum: data.inOutedNum || 0 |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// ====== 盘点日志相关 ====== |
|
|
|
changeStockLogTab(index) { |
|
|
|
this.stockLogTabIndex = index |
|
|
|
this.stockData = [] |
|
|
|
this.stockPage.currentPage = 1 |
|
|
|
this.stockPage.hasMore = true |
|
|
|
this.$nextTick(() => { |
|
|
|
this.getInitStockTakeBill(true) |
|
|
|
}) |
|
|
|
}, |
|
|
|
handleStockTableScroll: debounce(function(e) { |
|
|
|
const { scrollTop, scrollHeight, clientHeight } = e.target |
|
|
|
const distance = scrollHeight - scrollTop - clientHeight |
|
|
|
if (distance <= 80) { |
|
|
|
this.loadMoreStock() |
|
|
|
} |
|
|
|
}, 100), |
|
|
|
loadMoreStock() { |
|
|
|
if (this.stockPage.loadingMore || !this.stockPage.hasMore) return |
|
|
|
this.stockPage.currentPage += 1 |
|
|
|
this.getInitStockTakeBill(false) |
|
|
|
}, |
|
|
|
getInitStockTakeBill(isFirst = false) { |
|
|
|
if (isFirst) { |
|
|
|
this.stockPage.loadingMore = true |
|
|
|
} else { |
|
|
|
if (this.stockPage.loadingMore || !this.stockPage.hasMore) return |
|
|
|
this.stockPage.loadingMore = true |
|
|
|
} |
|
|
|
const params = { |
|
|
|
'status': this.stockLogTabIndex, |
|
|
|
'userId': this.user.id, |
|
|
|
'pageNo': this.stockPage.currentPage, |
|
|
|
'pageSize': this.stockPage.pageSize |
|
|
|
} |
|
|
|
FetchInitStockTakeBill(params).then(res => { |
|
|
|
if (res.code !== 500 && Array.isArray(res.data)) { |
|
|
|
const list = res.data |
|
|
|
if (isFirst) { |
|
|
|
this.stockData = list |
|
|
|
} else { |
|
|
|
this.stockData.push(...list) |
|
|
|
} |
|
|
|
if (res.pageNo >= res.totalPages) { |
|
|
|
this.stockPage.hasMore = false |
|
|
|
} else { |
|
|
|
this.stockPage.hasMore = true |
|
|
|
} |
|
|
|
} else { |
|
|
|
if (isFirst) { |
|
|
|
this.stockData = [] |
|
|
|
} |
|
|
|
this.stockPage.hasMore = false |
|
|
|
} |
|
|
|
}).finally(() => { |
|
|
|
this.stockPage.loadingMore = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
// const _this = this |
|
|
|
// // 每隔一分钟刷新档案借阅和档案类型的数据 |
|
|
|
// this.echartsTimer = setInterval(() => { |
|
|
|
// _this.handleMainData() |
|
|
|
// }, this.refreshtime) |
|
|
|
|
|
|
|
// 服务器监控定时更新 |
|
|
|
// this.systemTimer = setInterval(() => { |
|
|
|
// _this.systemData = { |
|
|
|
// cpuPercentage: 0, |
|
|
|
// memPercentage: 0, |
|
|
|
// sysFilesPercentage: 0 |
|
|
|
// } |
|
|
|
// this.getSystemInfo() |
|
|
|
// }, 3000) |
|
|
|
// ====== 出入库日志【新增】完全复刻盘点逻辑 ====== |
|
|
|
changeInOutTab(index) { |
|
|
|
this.inOutTabIndex = index |
|
|
|
this.inOutData = [] |
|
|
|
this.inOutPage.currentPage = 1 |
|
|
|
this.inOutPage.hasMore = true |
|
|
|
this.$nextTick(() => { |
|
|
|
this.getInitInOutBill(true) |
|
|
|
}) |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
handleInOutTableScroll: debounce(function(e) { |
|
|
|
const { scrollTop, scrollHeight, clientHeight } = e.target |
|
|
|
const distance = scrollHeight - scrollTop - clientHeight |
|
|
|
if (distance <= 80) { |
|
|
|
this.loadMoreInOut() |
|
|
|
} |
|
|
|
}, 100), |
|
|
|
loadMoreInOut() { |
|
|
|
if (this.inOutPage.loadingMore || !this.inOutPage.hasMore) return |
|
|
|
this.inOutPage.currentPage += 1 |
|
|
|
this.getInitInOutBill(false) |
|
|
|
}, |
|
|
|
/** |
|
|
|
* 获取出入库列表 |
|
|
|
* @param {Boolean} isFirst true=首次/切换tab false=滚动追加 |
|
|
|
*/ |
|
|
|
getInitInOutBill(isFirst = false) { |
|
|
|
if (isFirst) { |
|
|
|
this.inOutPage.loadingMore = true |
|
|
|
} else { |
|
|
|
if (this.inOutPage.loadingMore || !this.inOutPage.hasMore) return |
|
|
|
this.inOutPage.loadingMore = true |
|
|
|
} |
|
|
|
const params = { |
|
|
|
'status': this.inOutTabIndex, |
|
|
|
'userId': this.user.id, |
|
|
|
'pageNo': this.inOutPage.currentPage, |
|
|
|
'pageSize': this.inOutPage.pageSize |
|
|
|
} |
|
|
|
FetchInitInOutBill(params).then(res => { |
|
|
|
if (res.code !== 500 && Array.isArray(res.records)) { |
|
|
|
const list = res.records |
|
|
|
if (isFirst) { |
|
|
|
this.inOutData = list |
|
|
|
} else { |
|
|
|
this.inOutData.push(...list) |
|
|
|
} |
|
|
|
console.log(res) |
|
|
|
if (res.current >= res.pages) { |
|
|
|
this.inOutPage.hasMore = false |
|
|
|
} else { |
|
|
|
this.inOutPage.hasMore = true |
|
|
|
} |
|
|
|
} else { |
|
|
|
if (isFirst) { |
|
|
|
this.inOutData = [] |
|
|
|
} |
|
|
|
this.inOutPage.hasMore = false |
|
|
|
} |
|
|
|
}).finally(() => { |
|
|
|
this.inOutPage.loadingMore = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
getSystemInfo() { |
|
|
|
FetchSystemInfo().then(res => { |
|
|
|
// cpu 占有率 (总的cpuTotal-空闲的cpuFree)/总的cpuTotal |
|
|
|
this.systemData.cpuPercentage = Math.round((res.cpuTotal - res.cpuFree) / res.cpuTotal * 100) |
|
|
|
|
|
|
|
// 内存占比 使用的memUsed/总的memTotal |
|
|
|
this.systemData.memPercentage = Math.round(res.memUsed / res.memTotal * 100) |
|
|
|
|
|
|
|
this.memoryFree = res.memoryFree |
|
|
|
this.memoryTotal = res.memoryTotal |
|
|
|
this.GPUName = res.GPUName |
|
|
|
this.temperature = res.temperature |
|
|
|
this.utilization = res.utilization |
|
|
|
|
|
|
|
// 磁盘占比 多个磁盘 使用总和sysFiles[i].used的和/总的总和sysFiles[i].total的和 |
|
|
|
let sysFilesTotalUsed = 0 |
|
|
|
let sysFilesTotal = 0 |
|
|
|
@ -278,42 +438,7 @@ export default { |
|
|
|
memPercentage: 0, |
|
|
|
sysFilesPercentage: 0 |
|
|
|
} |
|
|
|
this.memoryFree = 0 |
|
|
|
this.memoryTotal = 0 |
|
|
|
this.GPUName = '' |
|
|
|
this.temperature = 0 |
|
|
|
this.utilization = 0 |
|
|
|
|
|
|
|
this.getSystemInfo() |
|
|
|
this.$refs.serveTerminalRefs.initData() |
|
|
|
}, |
|
|
|
getStockLog() { |
|
|
|
FetchInitStockLogList().then(res => { |
|
|
|
this.stockLogCompletedData = res.content.filter(item => [0, 3].includes(item.state)) |
|
|
|
this.stockLogIncompleteData = res.content.filter(item => [1, 2].includes(item.state)) |
|
|
|
}) |
|
|
|
}, |
|
|
|
handleMainData() { |
|
|
|
FetchInitHomeInfo().then(data => { |
|
|
|
this.topObjectNum = { |
|
|
|
regionCount: data.regionCount, |
|
|
|
shelfCount: data.shelfCount, |
|
|
|
gridCount: data.gridCount, |
|
|
|
deviceCount: data.deviceCount, |
|
|
|
noStockGridCount: data.noStockGridCount, |
|
|
|
deviceErrorCount: data.deviceErrorCount |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
handleInitStockInfo(params) { |
|
|
|
FetchInitStockInfo(params).then(res => { |
|
|
|
this.taskStockLogData = [ |
|
|
|
{ value: res.onShelfNum - res.errorShelfNum - res.errorOrderNum, name: '正常在架' }, |
|
|
|
{ value: res.errorShelfNum, name: '错架' }, |
|
|
|
{ value: res.errorOrderNum, name: '错序' } |
|
|
|
] |
|
|
|
}).catch(() => { |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -374,9 +499,10 @@ export default { |
|
|
|
margin-right: 30px; |
|
|
|
padding-bottom: 3px; |
|
|
|
border-bottom: 3px solid #fff; |
|
|
|
cursor: pointer; |
|
|
|
&.home-tab-active{ |
|
|
|
color: #0348F3; |
|
|
|
// border-bottom: 3px solid #0348F3; |
|
|
|
border-color:#0348F3; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -386,7 +512,7 @@ export default { |
|
|
|
background-color: #DDE8FB !important; |
|
|
|
} |
|
|
|
|
|
|
|
::v-deep .home-flowable-list .el-table__body-wrapper::-webkit-scrollbar-thumb { |
|
|
|
::v-deep .home-flowable-list .home-flowable-list .el-table__body-wrapper::-webkit-scrollbar-thumb { |
|
|
|
border-radius: 3px; |
|
|
|
background-color: #4578F6 !important; |
|
|
|
} |
|
|
|
@ -398,6 +524,7 @@ export default { |
|
|
|
::v-deep .home-flowable-list .el-table__body-wrapper::-webkit-scrollbar-corner { |
|
|
|
background-color: #DDE8FB !important; |
|
|
|
} |
|
|
|
|
|
|
|
.refresh-date{ |
|
|
|
position: absolute; |
|
|
|
right: 14px; |
|
|
|
@ -421,14 +548,34 @@ export default { |
|
|
|
display: flex; |
|
|
|
justify-content: flex-start; |
|
|
|
align-items: center; |
|
|
|
// background-color: #000; |
|
|
|
.cpu-right{ |
|
|
|
flex: 1; |
|
|
|
height: 100%; |
|
|
|
display: flex; |
|
|
|
justify-content: flex-start; |
|
|
|
// flex-direction: column; |
|
|
|
// flex-wrap: wrap; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
::v-deep .el-tag{ |
|
|
|
&.el-tag--small{ |
|
|
|
color: #0348f3 !important; |
|
|
|
background-color: #eef5fe !important; |
|
|
|
border-color: #c1dbfc !important; |
|
|
|
} |
|
|
|
&.el-tag--success { |
|
|
|
background-color: #e7faf0 !important; |
|
|
|
border-color: #d0f5e0!important; |
|
|
|
color: #13ce66!important; |
|
|
|
} |
|
|
|
&.el-tag--info { |
|
|
|
background-color: #f4f4f5 !important; |
|
|
|
border-color: #f4f4f5!important; |
|
|
|
color: #909399!important; |
|
|
|
} |
|
|
|
&.el-tag--error { |
|
|
|
background-color: #fbc0b5 !important; |
|
|
|
border-color: #fcab9d !important; |
|
|
|
color: #ed4a41!important; |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |