更新
This commit is contained in:
274
src/views/asrs/warehouseLocationMonitoring/index-low.vue
Normal file
274
src/views/asrs/warehouseLocationMonitoring/index-low.vue
Normal file
@@ -0,0 +1,274 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-21 14:26:23
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-10-30 15:08:26
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick" />
|
||||
<div class="tips">
|
||||
<el-tag effect="dark" color="#7362F3" style="border: none">满</el-tag>
|
||||
<el-tag effect="dark" color="#16DC09" style="border: none">空</el-tag>
|
||||
<el-tag effect="dark" color="#FFA08F" style="border: none">锁</el-tag>
|
||||
</div>
|
||||
<div class="mainbody">
|
||||
<div v-for="i in listQuery.total" :key="i">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-row type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="a in wareData.one.slice((i - 1) * 10, i * 10)"
|
||||
:key="a.id + a.warehouseStorehouseCode"
|
||||
:title="a.warehouseStorehouseName"
|
||||
style="background: #fff8e8; float: left">
|
||||
<div
|
||||
class="dashboard-layout-item-cricle"
|
||||
:style="{
|
||||
background: bgColor[a.warehouseStorehouseState],
|
||||
}" />
|
||||
<p class="p-name">{{ a.warehouseStorehouseName }}</p>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="b in wareData.two.slice((i - 1) * 10, i * 10)"
|
||||
:key="b.id + b.warehouseStorehouseCode"
|
||||
:title="b.warehouseStorehouseName"
|
||||
style="background: #fff8e8; float: left">
|
||||
<div
|
||||
class="dashboard-layout-item-cricle"
|
||||
:style="{
|
||||
background: bgColor[b.warehouseStorehouseState],
|
||||
}" />
|
||||
<p class="p-name">{{ b.warehouseStorehouseName }}</p>
|
||||
</div>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-divider class="divider"></el-divider>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-row type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="c in wareData.there.slice((i - 1) * 10, i * 10)"
|
||||
:key="c.id + c.warehouseStorehouseCode"
|
||||
:title="c.warehouseStorehouseName"
|
||||
style="background: #fff8e8; float: left">
|
||||
<div
|
||||
class="dashboard-layout-item-cricle"
|
||||
:style="{
|
||||
background: bgColor[c.warehouseStorehouseState],
|
||||
}" />
|
||||
<p class="p-name">{{ c.warehouseStorehouseName }}</p>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="d in wareData.four.slice((i - 1) * 10, i * 10)"
|
||||
:key="d.id + d.warehouseStorehouseCode"
|
||||
:title="d.warehouseStorehouseName"
|
||||
style="background: #fff8e8; float: left">
|
||||
<div
|
||||
class="dashboard-layout-item-cricle"
|
||||
:style="{
|
||||
background: bgColor[d.warehouseStorehouseState],
|
||||
}" />
|
||||
<p class="p-name">{{ d.warehouseStorehouseName }}</p>
|
||||
</div>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from '../mixins/basic-page';
|
||||
import {
|
||||
getWarehouseStorehouseList,
|
||||
exportWarehouseStorehouseExcel,
|
||||
} from '@/api/asrs/warehouseStorehouse';
|
||||
|
||||
export default {
|
||||
mixins: [basicPage],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: getWarehouseStorehouseList,
|
||||
exportURL: exportWarehouseStorehouseExcel,
|
||||
},
|
||||
listQuery: {
|
||||
stacker: 1,
|
||||
wareLayer: 1,
|
||||
total: 0,
|
||||
},
|
||||
wareData: {
|
||||
one: [],
|
||||
two: [],
|
||||
there: [],
|
||||
four: [],
|
||||
},
|
||||
bgColor: ['#16DC09', '#FFA08F', '#7362F3'],
|
||||
formConfig: [
|
||||
{
|
||||
type: 'select',
|
||||
label: '选择巷道',
|
||||
selectOptions: [
|
||||
{ id: 1, name: '巷道一' },
|
||||
{ id: 2, name: '巷道二' },
|
||||
{ id: 3, name: '巷道三' },
|
||||
{ id: 4, name: '巷道四' },
|
||||
],
|
||||
param: 'stacker',
|
||||
filterable: true,
|
||||
defaultSelect: 1,
|
||||
clearable: false,
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '选择层',
|
||||
selectOptions: [
|
||||
{ id: 1, name: '1' },
|
||||
{ id: 2, name: '2' },
|
||||
{ id: 3, name: '3' },
|
||||
{ id: 4, name: '4' },
|
||||
],
|
||||
param: 'value',
|
||||
filterable: true,
|
||||
defaultSelect: 1,
|
||||
clearable: false,
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '搜索',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '下载',
|
||||
name: 'export',
|
||||
plain: true,
|
||||
color: 'primary',
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {},
|
||||
created() {},
|
||||
methods: {
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataListLoading = true;
|
||||
(this.wareData = {
|
||||
one: [],
|
||||
two: [],
|
||||
there: [],
|
||||
four: [],
|
||||
}),
|
||||
this.urlOptions.getDataListURL(this.listQuery).then((response) => {
|
||||
response.data.forEach((a, b) => {
|
||||
if (b % 4 === 0) {
|
||||
this.wareData.one.push(a);
|
||||
} else if (b % 4 === 1) {
|
||||
this.wareData.two.push(a);
|
||||
} else if (b % 4 === 2) {
|
||||
this.wareData.there.push(a);
|
||||
} else if (b % 4 === 3) {
|
||||
this.wareData.four.push(a);
|
||||
}
|
||||
});
|
||||
this.listQuery.total = Math.ceil(response.data.length / 40);
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.wareLayer = val.value;
|
||||
this.listQuery.stacker = val.stacker;
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'export':
|
||||
this.handleExport(this.aId);
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.mainbody {
|
||||
display: flex;
|
||||
gap: 70px;
|
||||
flex-direction: column;
|
||||
}
|
||||
.flex-warp {
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
.dashboard-layout-item {
|
||||
width: 100px;
|
||||
text-align: center;
|
||||
height: 32px;
|
||||
box-shadow: 0px 3px 6px 0px rgba(166, 174, 190, 0.8);
|
||||
border-radius: 2px 4px 4px 2px;
|
||||
margin: 0 3px 8px 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
.dashboard-layout-item-cricle {
|
||||
display: inline-block;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border-radius: 6px;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 3px;
|
||||
}
|
||||
.p-name {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
margin-left: 15px;
|
||||
}
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
z-index: 10;
|
||||
transform: scale(1.3) translateZ(0);
|
||||
}
|
||||
&:nth-child(2n) {
|
||||
margin-right: 30px;
|
||||
}
|
||||
&:first-child {
|
||||
margin-left: 50px;
|
||||
}
|
||||
&:last-child {
|
||||
margin-right: 30px;
|
||||
}
|
||||
}
|
||||
.el-divider--horizontal {
|
||||
margin: 10px 0;
|
||||
}
|
||||
.el-divider {
|
||||
background-color: black;
|
||||
}
|
||||
.tips {
|
||||
position: absolute;
|
||||
top: 22px;
|
||||
right: 120px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,8 +1,8 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-21 14:26:23
|
||||
* @Date: 2024-01-17 09:58:41
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-10-30 15:08:26
|
||||
* @LastEditTime: 2024-01-23 10:02:15
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@@ -12,9 +12,9 @@
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick" />
|
||||
<div class="tips">
|
||||
<el-tag effect="dark" color="#7362F3" style="border: none">满</el-tag>
|
||||
<el-tag effect="dark" color="#16DC09" style="border: none">空</el-tag>
|
||||
<el-tag effect="dark" color="#FFA08F" style="border: none">锁</el-tag>
|
||||
<el-tag effect="dark" color="#16DC09" style="border: none">满</el-tag>
|
||||
<el-tag effect="dark" color="#d3d3d3" style="border: none">空</el-tag>
|
||||
<el-tag effect="dark" color="#7362F3" style="border: none">锁</el-tag>
|
||||
</div>
|
||||
<div class="mainbody">
|
||||
<div v-for="i in listQuery.total" :key="i">
|
||||
@@ -23,31 +23,52 @@
|
||||
<el-row type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="a in wareData.one.slice((i - 1) * 10, i * 10)"
|
||||
:key="a.id + a.warehouseStorehouseCode"
|
||||
:title="a.warehouseStorehouseName"
|
||||
style="background: #fff8e8; float: left">
|
||||
<div
|
||||
class="dashboard-layout-item-cricle"
|
||||
:style="{
|
||||
background: bgColor[a.warehouseStorehouseState],
|
||||
}" />
|
||||
<p class="p-name">{{ a.warehouseStorehouseName }}</p>
|
||||
v-for="j in wareData.filter(
|
||||
(item) => item.wareRow === (i - 1) * 4 + 1
|
||||
)"
|
||||
:key="j.id + j.warehouseStorehouseName"
|
||||
:title="j.warehouseStorehouseName"
|
||||
:style="{
|
||||
background: bgColor[j.warehouseStorehouseState],
|
||||
}">
|
||||
<div class="x-coordinate coordinate" v-if="j.wareRow === 1">
|
||||
{{ j.wareColumn }}
|
||||
</div>
|
||||
<div class="y-coordinate coordinate" v-if="j.wareColumn === 1">
|
||||
{{ j.wareRow }}
|
||||
</div>
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
:title="j.warehouseStorehouseName"
|
||||
width="200"
|
||||
trigger="hover"
|
||||
:content="j.warehouseStorehouseName">
|
||||
<div slot="reference" class="hoverDiv" />
|
||||
</el-popover>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="b in wareData.two.slice((i - 1) * 10, i * 10)"
|
||||
:key="b.id + b.warehouseStorehouseCode"
|
||||
:title="b.warehouseStorehouseName"
|
||||
style="background: #fff8e8; float: left">
|
||||
<div
|
||||
class="dashboard-layout-item-cricle"
|
||||
:style="{
|
||||
background: bgColor[b.warehouseStorehouseState],
|
||||
}" />
|
||||
<p class="p-name">{{ b.warehouseStorehouseName }}</p>
|
||||
v-for="j in wareData.filter(
|
||||
(item) => item.wareRow === (i - 1) * 4 + 2
|
||||
)"
|
||||
:key="j.id + j.warehouseStorehouseName"
|
||||
:title="j.warehouseStorehouseName"
|
||||
:style="{
|
||||
background: bgColor[j.warehouseStorehouseState],
|
||||
}">
|
||||
<div class="y-coordinate coordinate" v-if="j.wareColumn === 1">
|
||||
{{ j.wareRow }}
|
||||
</div>
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
:title="j.warehouseStorehouseName"
|
||||
width="200"
|
||||
trigger="hover"
|
||||
:content="j.warehouseStorehouseName">
|
||||
<div slot="reference" class="hoverDiv" />
|
||||
</el-popover>
|
||||
</div>
|
||||
</el-row>
|
||||
</el-col>
|
||||
@@ -58,31 +79,47 @@
|
||||
<el-row type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="c in wareData.there.slice((i - 1) * 10, i * 10)"
|
||||
:key="c.id + c.warehouseStorehouseCode"
|
||||
:title="c.warehouseStorehouseName"
|
||||
style="background: #fff8e8; float: left">
|
||||
<div
|
||||
class="dashboard-layout-item-cricle"
|
||||
:style="{
|
||||
background: bgColor[c.warehouseStorehouseState],
|
||||
}" />
|
||||
<p class="p-name">{{ c.warehouseStorehouseName }}</p>
|
||||
v-for="j in wareData.filter(
|
||||
(item) => item.wareRow === (i - 1) * 4 + 3
|
||||
)"
|
||||
:key="j.id + j.warehouseStorehouseName"
|
||||
:title="j.warehouseStorehouseName"
|
||||
:style="{
|
||||
background: bgColor[j.warehouseStorehouseState],
|
||||
}">
|
||||
<div class="y-coordinate coordinate" v-if="j.wareColumn === 1">
|
||||
{{ j.wareRow }}
|
||||
</div>
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
:title="j.warehouseStorehouseName"
|
||||
width="200"
|
||||
trigger="hover"
|
||||
:content="j.warehouseStorehouseName">
|
||||
<div slot="reference" class="hoverDiv" />
|
||||
</el-popover>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="d in wareData.four.slice((i - 1) * 10, i * 10)"
|
||||
:key="d.id + d.warehouseStorehouseCode"
|
||||
:title="d.warehouseStorehouseName"
|
||||
style="background: #fff8e8; float: left">
|
||||
<div
|
||||
class="dashboard-layout-item-cricle"
|
||||
:style="{
|
||||
background: bgColor[d.warehouseStorehouseState],
|
||||
}" />
|
||||
<p class="p-name">{{ d.warehouseStorehouseName }}</p>
|
||||
v-for="j in wareData.filter((item) => item.wareRow === i * 4)"
|
||||
:key="j.id + j.warehouseStorehouseName"
|
||||
:title="j.warehouseStorehouseName"
|
||||
:style="{
|
||||
background: bgColor[j.warehouseStorehouseState],
|
||||
}">
|
||||
<div class="y-coordinate coordinate" v-if="j.wareColumn === 1">
|
||||
{{ j.wareRow }}
|
||||
</div>
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
:title="j.warehouseStorehouseName"
|
||||
width="200"
|
||||
trigger="hover"
|
||||
:content="j.warehouseStorehouseName">
|
||||
<div slot="reference" class="hoverDiv" />
|
||||
</el-popover>
|
||||
</div>
|
||||
</el-row>
|
||||
</el-col>
|
||||
@@ -108,32 +145,12 @@ export default {
|
||||
exportURL: exportWarehouseStorehouseExcel,
|
||||
},
|
||||
listQuery: {
|
||||
stacker: 1,
|
||||
wareLayer: 1,
|
||||
total: 0,
|
||||
},
|
||||
wareData: {
|
||||
one: [],
|
||||
two: [],
|
||||
there: [],
|
||||
four: [],
|
||||
},
|
||||
bgColor: ['#16DC09', '#FFA08F', '#7362F3'],
|
||||
wareData: [],
|
||||
bgColor: ['#d3d3d3', '#7362F3', '#16DC09'], //空,锁,满
|
||||
formConfig: [
|
||||
{
|
||||
type: 'select',
|
||||
label: '选择巷道',
|
||||
selectOptions: [
|
||||
{ id: 1, name: '巷道一' },
|
||||
{ id: 2, name: '巷道二' },
|
||||
{ id: 3, name: '巷道三' },
|
||||
{ id: 4, name: '巷道四' },
|
||||
],
|
||||
param: 'stacker',
|
||||
filterable: true,
|
||||
defaultSelect: 1,
|
||||
clearable: false,
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '选择层',
|
||||
@@ -167,36 +184,10 @@ export default {
|
||||
components: {},
|
||||
created() {},
|
||||
methods: {
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataListLoading = true;
|
||||
(this.wareData = {
|
||||
one: [],
|
||||
two: [],
|
||||
there: [],
|
||||
four: [],
|
||||
}),
|
||||
this.urlOptions.getDataListURL(this.listQuery).then((response) => {
|
||||
response.data.forEach((a, b) => {
|
||||
if (b % 4 === 0) {
|
||||
this.wareData.one.push(a);
|
||||
} else if (b % 4 === 1) {
|
||||
this.wareData.two.push(a);
|
||||
} else if (b % 4 === 2) {
|
||||
this.wareData.there.push(a);
|
||||
} else if (b % 4 === 3) {
|
||||
this.wareData.four.push(a);
|
||||
}
|
||||
});
|
||||
this.listQuery.total = Math.ceil(response.data.length / 40);
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.wareLayer = val.value;
|
||||
this.listQuery.stacker = val.stacker;
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'export':
|
||||
@@ -206,6 +197,15 @@ export default {
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataListLoading = true;
|
||||
this.urlOptions.getDataListURL(this.listQuery).then((response) => {
|
||||
this.wareData = response.data;
|
||||
this.listQuery.total = Math.ceil(response.data.length / 120);
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -213,52 +213,59 @@ export default {
|
||||
<style lang="scss" scoped>
|
||||
.mainbody {
|
||||
display: flex;
|
||||
gap: 70px;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
min-width: 80vw;
|
||||
border-radius: 5px;
|
||||
padding-top: 25px;
|
||||
}
|
||||
.flex-warp {
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
.dashboard-layout-item {
|
||||
width: 100px;
|
||||
text-align: center;
|
||||
height: 32px;
|
||||
box-shadow: 0px 3px 6px 0px rgba(166, 174, 190, 0.8);
|
||||
border-radius: 2px 4px 4px 2px;
|
||||
margin: 0 3px 8px 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
.dashboard-layout-item-cricle {
|
||||
display: inline-block;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border-radius: 6px;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 3px;
|
||||
}
|
||||
.p-name {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
margin-left: 15px;
|
||||
}
|
||||
.hoverDiv {
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
background-color: #ff0000;
|
||||
z-index: 10;
|
||||
transform: scale(1.3) translateZ(0);
|
||||
}
|
||||
}
|
||||
.dashboard-layout-item {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
background-color: #d3d3d3;
|
||||
border-radius: 2px;
|
||||
margin: 0 3px 8px 0;
|
||||
position: relative;
|
||||
&:nth-child(2n) {
|
||||
margin-right: 30px;
|
||||
}
|
||||
&:first-child {
|
||||
margin-left: 50px;
|
||||
margin-left: 40px;
|
||||
}
|
||||
&:last-child {
|
||||
margin-right: 30px;
|
||||
}
|
||||
.coordinate{
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
}
|
||||
.x-coordinate {
|
||||
position: absolute;
|
||||
top: -25px;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
}
|
||||
.y-coordinate {
|
||||
position: absolute;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
width: 20px;
|
||||
height: 30px;
|
||||
left: -25px;
|
||||
}
|
||||
}
|
||||
.el-divider--horizontal {
|
||||
margin: 10px 0;
|
||||
|
||||
276
src/views/asrs/warehouseLocationMonitoring/indexb-low.vue
Normal file
276
src/views/asrs/warehouseLocationMonitoring/indexb-low.vue
Normal file
@@ -0,0 +1,276 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-21 14:26:23
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-10-30 15:08:33
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick" />
|
||||
<div class="tips">
|
||||
<el-tag effect="dark" color="#7362F3" style="border: none">满</el-tag>
|
||||
<el-tag effect="dark" color="#16DC09" style="border: none">空</el-tag>
|
||||
<el-tag effect="dark" color="#FFA08F" style="border: none">锁</el-tag>
|
||||
</div>
|
||||
<div class="mainbody">
|
||||
<div v-for="i in listQuery.total" :key="i">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-row type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="a in wareData.one.slice((i - 1) * 10, i * 10)"
|
||||
:key="a.id + a.warehouseStorehouseCode"
|
||||
:title="a.warehouseStorehouseName"
|
||||
style="background: #fff8e8; float: left">
|
||||
<div
|
||||
class="dashboard-layout-item-cricle"
|
||||
:style="{
|
||||
background: bgColor[a.warehouseStorehouseState],
|
||||
}" />
|
||||
<p class="p-name">{{ a.warehouseStorehouseName }}</p>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="b in wareData.two.slice((i - 1) * 10, i * 10)"
|
||||
:key="b.id + b.warehouseStorehouseCode"
|
||||
:title="b.warehouseStorehouseName"
|
||||
style="background: #fff8e8; float: left">
|
||||
<div
|
||||
class="dashboard-layout-item-cricle"
|
||||
:style="{
|
||||
background: bgColor[b.warehouseStorehouseState],
|
||||
}" />
|
||||
<p class="p-name">{{ b.warehouseStorehouseName }}</p>
|
||||
</div>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-divider class="divider"></el-divider>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-row type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="c in wareData.there.slice((i - 1) * 10, i * 10)"
|
||||
:key="c.id + c.warehouseStorehouseCode"
|
||||
:title="c.warehouseStorehouseName"
|
||||
style="background: #fff8e8; float: left">
|
||||
<div
|
||||
class="dashboard-layout-item-cricle"
|
||||
:style="{
|
||||
background: bgColor[c.warehouseStorehouseState],
|
||||
}" />
|
||||
<p class="p-name">{{ c.warehouseStorehouseName }}</p>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="d in wareData.four.slice((i - 1) * 10, i * 10)"
|
||||
:key="d.id + d.warehouseStorehouseCode"
|
||||
:title="d.warehouseStorehouseName"
|
||||
style="background: #fff8e8; float: left">
|
||||
<div
|
||||
class="dashboard-layout-item-cricle"
|
||||
:style="{
|
||||
background: bgColor[d.warehouseStorehouseState],
|
||||
}" />
|
||||
<p class="p-name">{{ d.warehouseStorehouseName }}</p>
|
||||
</div>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from '../mixins/basic-page';
|
||||
import {
|
||||
getWarehouseStorehouseList,
|
||||
exportWarehouseStorehouseExcel,
|
||||
} from '@/api/asrs/warehouseStorehouse';
|
||||
|
||||
export default {
|
||||
mixins: [basicPage],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: getWarehouseStorehouseList,
|
||||
exportURL: exportWarehouseStorehouseExcel,
|
||||
},
|
||||
listQuery: {
|
||||
//stacker: 1,
|
||||
wareLayer: 1,
|
||||
total: 0,
|
||||
},
|
||||
wareData: {
|
||||
one: [],
|
||||
two: [],
|
||||
there: [],
|
||||
four: [],
|
||||
},
|
||||
bgColor: ['#16DC09', '#FFA08F', '#7362F3'],
|
||||
formConfig: [
|
||||
{
|
||||
type: 'select',
|
||||
label: '选择巷道',
|
||||
selectOptions: [
|
||||
{ id: 1, name: '巷道一' },
|
||||
{ id: 2, name: '巷道二' },
|
||||
{ id: 3, name: '巷道三' },
|
||||
{ id: 4, name: '巷道四' },
|
||||
],
|
||||
param: 'stacker',
|
||||
filterable: true,
|
||||
defaultSelect: 1,
|
||||
clearable: false,
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '选择层',
|
||||
selectOptions: [
|
||||
{ id: 1, name: '1' },
|
||||
{ id: 2, name: '2' },
|
||||
{ id: 3, name: '3' },
|
||||
{ id: 4, name: '4' },
|
||||
],
|
||||
param: 'value',
|
||||
filterable: true,
|
||||
defaultSelect: 1,
|
||||
clearable: false,
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '搜索',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '下载',
|
||||
name: 'export',
|
||||
plain: true,
|
||||
color: 'primary',
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
components: {},
|
||||
created() {
|
||||
this.listQuery.warehouseId = this.bId;
|
||||
},
|
||||
methods: {
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataListLoading = true;
|
||||
(this.wareData = {
|
||||
one: [],
|
||||
two: [],
|
||||
there: [],
|
||||
four: [],
|
||||
}),
|
||||
this.urlOptions.getDataListURL(this.listQuery).then((response) => {
|
||||
response.data.forEach((a, b) => {
|
||||
if (b % 4 === 0) {
|
||||
this.wareData.one.push(a);
|
||||
} else if (b % 4 === 1) {
|
||||
this.wareData.two.push(a);
|
||||
} else if (b % 4 === 2) {
|
||||
this.wareData.there.push(a);
|
||||
} else if (b % 4 === 3) {
|
||||
this.wareData.four.push(a);
|
||||
}
|
||||
});
|
||||
this.listQuery.total = Math.ceil(response.data.length / 40);
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.wareLayer = val.value;
|
||||
this.listQuery.stacker = val.stacker;
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'export':
|
||||
this.handleExport(this.bId);
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.mainbody {
|
||||
display: flex;
|
||||
gap: 70px;
|
||||
flex-direction: column;
|
||||
}
|
||||
.flex-warp {
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
.dashboard-layout-item {
|
||||
width: 100px;
|
||||
text-align: center;
|
||||
height: 32px;
|
||||
box-shadow: 0px 3px 6px 0px rgba(166, 174, 190, 0.8);
|
||||
border-radius: 2px 4px 4px 2px;
|
||||
margin: 0 3px 8px 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
.dashboard-layout-item-cricle {
|
||||
display: inline-block;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border-radius: 6px;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 3px;
|
||||
}
|
||||
.p-name {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
margin-left: 15px;
|
||||
}
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
z-index: 10;
|
||||
transform: scale(1.3) translateZ(0);
|
||||
}
|
||||
&:nth-child(2n) {
|
||||
margin-right: 30px;
|
||||
}
|
||||
&:first-child {
|
||||
margin-left: 50px;
|
||||
}
|
||||
&:last-child {
|
||||
margin-right: 30px;
|
||||
}
|
||||
}
|
||||
.el-divider--horizontal {
|
||||
margin: 10px 0;
|
||||
}
|
||||
.el-divider {
|
||||
background-color: black;
|
||||
}
|
||||
.tips {
|
||||
position: absolute;
|
||||
top: 22px;
|
||||
right: 120px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,8 +1,8 @@
|
||||
<!--
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-21 14:26:23
|
||||
* @Date: 2024-01-17 09:58:41
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-10-30 15:08:33
|
||||
* @LastEditTime: 2024-01-23 10:02:53
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@@ -12,9 +12,9 @@
|
||||
ref="searchBarForm"
|
||||
@headBtnClick="buttonClick" />
|
||||
<div class="tips">
|
||||
<el-tag effect="dark" color="#7362F3" style="border: none">满</el-tag>
|
||||
<el-tag effect="dark" color="#16DC09" style="border: none">空</el-tag>
|
||||
<el-tag effect="dark" color="#FFA08F" style="border: none">锁</el-tag>
|
||||
<el-tag effect="dark" color="#16DC09" style="border: none">满</el-tag>
|
||||
<el-tag effect="dark" color="#d3d3d3" style="border: none">空</el-tag>
|
||||
<el-tag effect="dark" color="#7362F3" style="border: none">锁</el-tag>
|
||||
</div>
|
||||
<div class="mainbody">
|
||||
<div v-for="i in listQuery.total" :key="i">
|
||||
@@ -23,31 +23,52 @@
|
||||
<el-row type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="a in wareData.one.slice((i - 1) * 10, i * 10)"
|
||||
:key="a.id + a.warehouseStorehouseCode"
|
||||
:title="a.warehouseStorehouseName"
|
||||
style="background: #fff8e8; float: left">
|
||||
<div
|
||||
class="dashboard-layout-item-cricle"
|
||||
:style="{
|
||||
background: bgColor[a.warehouseStorehouseState],
|
||||
}" />
|
||||
<p class="p-name">{{ a.warehouseStorehouseName }}</p>
|
||||
v-for="j in wareData.filter(
|
||||
(item) => item.wareRow === (i - 1) * 4 + 1
|
||||
)"
|
||||
:key="j.id + j.warehouseStorehouseName"
|
||||
:title="j.warehouseStorehouseName"
|
||||
:style="{
|
||||
background: bgColor[j.warehouseStorehouseState],
|
||||
}">
|
||||
<div class="x-coordinate coordinate" v-if="j.wareRow === 1">
|
||||
{{ j.wareColumn }}
|
||||
</div>
|
||||
<div class="y-coordinate coordinate" v-if="j.wareColumn === 1">
|
||||
{{ j.wareRow }}
|
||||
</div>
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
:title="j.warehouseStorehouseName"
|
||||
width="200"
|
||||
trigger="hover"
|
||||
:content="j.warehouseStorehouseName">
|
||||
<div slot="reference" class="hoverDiv" />
|
||||
</el-popover>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="b in wareData.two.slice((i - 1) * 10, i * 10)"
|
||||
:key="b.id + b.warehouseStorehouseCode"
|
||||
:title="b.warehouseStorehouseName"
|
||||
style="background: #fff8e8; float: left">
|
||||
<div
|
||||
class="dashboard-layout-item-cricle"
|
||||
:style="{
|
||||
background: bgColor[b.warehouseStorehouseState],
|
||||
}" />
|
||||
<p class="p-name">{{ b.warehouseStorehouseName }}</p>
|
||||
v-for="j in wareData.filter(
|
||||
(item) => item.wareRow === (i - 1) * 4 + 2
|
||||
)"
|
||||
:key="j.id + j.warehouseStorehouseName"
|
||||
:title="j.warehouseStorehouseName"
|
||||
:style="{
|
||||
background: bgColor[j.warehouseStorehouseState],
|
||||
}">
|
||||
<div class="y-coordinate coordinate" v-if="j.wareColumn === 1">
|
||||
{{ j.wareRow }}
|
||||
</div>
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
:title="j.warehouseStorehouseName"
|
||||
width="200"
|
||||
trigger="hover"
|
||||
:content="j.warehouseStorehouseName">
|
||||
<div slot="reference" class="hoverDiv" />
|
||||
</el-popover>
|
||||
</div>
|
||||
</el-row>
|
||||
</el-col>
|
||||
@@ -58,31 +79,47 @@
|
||||
<el-row type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="c in wareData.there.slice((i - 1) * 10, i * 10)"
|
||||
:key="c.id + c.warehouseStorehouseCode"
|
||||
:title="c.warehouseStorehouseName"
|
||||
style="background: #fff8e8; float: left">
|
||||
<div
|
||||
class="dashboard-layout-item-cricle"
|
||||
:style="{
|
||||
background: bgColor[c.warehouseStorehouseState],
|
||||
}" />
|
||||
<p class="p-name">{{ c.warehouseStorehouseName }}</p>
|
||||
v-for="j in wareData.filter(
|
||||
(item) => item.wareRow === (i - 1) * 4 + 3
|
||||
)"
|
||||
:key="j.id + j.warehouseStorehouseName"
|
||||
:title="j.warehouseStorehouseName"
|
||||
:style="{
|
||||
background: bgColor[j.warehouseStorehouseState],
|
||||
}">
|
||||
<div class="y-coordinate coordinate" v-if="j.wareColumn === 1">
|
||||
{{ j.wareRow }}
|
||||
</div>
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
:title="j.warehouseStorehouseName"
|
||||
width="200"
|
||||
trigger="hover"
|
||||
:content="j.warehouseStorehouseName">
|
||||
<div slot="reference" class="hoverDiv" />
|
||||
</el-popover>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row type="flex" class="flex-warp">
|
||||
<div
|
||||
class="dashboard-layout-item"
|
||||
v-for="d in wareData.four.slice((i - 1) * 10, i * 10)"
|
||||
:key="d.id + d.warehouseStorehouseCode"
|
||||
:title="d.warehouseStorehouseName"
|
||||
style="background: #fff8e8; float: left">
|
||||
<div
|
||||
class="dashboard-layout-item-cricle"
|
||||
:style="{
|
||||
background: bgColor[d.warehouseStorehouseState],
|
||||
}" />
|
||||
<p class="p-name">{{ d.warehouseStorehouseName }}</p>
|
||||
v-for="j in wareData.filter((item) => item.wareRow === i * 4)"
|
||||
:key="j.id + j.warehouseStorehouseName"
|
||||
:title="j.warehouseStorehouseName"
|
||||
:style="{
|
||||
background: bgColor[j.warehouseStorehouseState],
|
||||
}">
|
||||
<div class="y-coordinate coordinate" v-if="j.wareColumn === 1">
|
||||
{{ j.wareRow }}
|
||||
</div>
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
:title="j.warehouseStorehouseName"
|
||||
width="200"
|
||||
trigger="hover"
|
||||
:content="j.warehouseStorehouseName">
|
||||
<div slot="reference" class="hoverDiv" />
|
||||
</el-popover>
|
||||
</div>
|
||||
</el-row>
|
||||
</el-col>
|
||||
@@ -108,32 +145,12 @@ export default {
|
||||
exportURL: exportWarehouseStorehouseExcel,
|
||||
},
|
||||
listQuery: {
|
||||
//stacker: 1,
|
||||
wareLayer: 1,
|
||||
total: 0,
|
||||
},
|
||||
wareData: {
|
||||
one: [],
|
||||
two: [],
|
||||
there: [],
|
||||
four: [],
|
||||
},
|
||||
bgColor: ['#16DC09', '#FFA08F', '#7362F3'],
|
||||
wareData: [],
|
||||
bgColor: ['#d3d3d3', '#7362F3', '#16DC09'], //空,锁,满
|
||||
formConfig: [
|
||||
{
|
||||
type: 'select',
|
||||
label: '选择巷道',
|
||||
selectOptions: [
|
||||
{ id: 1, name: '巷道一' },
|
||||
{ id: 2, name: '巷道二' },
|
||||
{ id: 3, name: '巷道三' },
|
||||
{ id: 4, name: '巷道四' },
|
||||
],
|
||||
param: 'stacker',
|
||||
filterable: true,
|
||||
defaultSelect: 1,
|
||||
clearable: false,
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '选择层',
|
||||
@@ -169,36 +186,10 @@ export default {
|
||||
this.listQuery.warehouseId = this.bId;
|
||||
},
|
||||
methods: {
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataListLoading = true;
|
||||
(this.wareData = {
|
||||
one: [],
|
||||
two: [],
|
||||
there: [],
|
||||
four: [],
|
||||
}),
|
||||
this.urlOptions.getDataListURL(this.listQuery).then((response) => {
|
||||
response.data.forEach((a, b) => {
|
||||
if (b % 4 === 0) {
|
||||
this.wareData.one.push(a);
|
||||
} else if (b % 4 === 1) {
|
||||
this.wareData.two.push(a);
|
||||
} else if (b % 4 === 2) {
|
||||
this.wareData.there.push(a);
|
||||
} else if (b % 4 === 3) {
|
||||
this.wareData.four.push(a);
|
||||
}
|
||||
});
|
||||
this.listQuery.total = Math.ceil(response.data.length / 40);
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
buttonClick(val) {
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.wareLayer = val.value;
|
||||
this.listQuery.stacker = val.stacker;
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'export':
|
||||
@@ -208,6 +199,15 @@ export default {
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataListLoading = true;
|
||||
this.urlOptions.getDataListURL(this.listQuery).then((response) => {
|
||||
this.wareData = response.data;
|
||||
this.listQuery.total = Math.ceil(response.data.length / 120);
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -215,52 +215,59 @@ export default {
|
||||
<style lang="scss" scoped>
|
||||
.mainbody {
|
||||
display: flex;
|
||||
gap: 70px;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
min-width: 80vw;
|
||||
border-radius: 5px;
|
||||
padding-top: 25px;
|
||||
}
|
||||
.flex-warp {
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
.dashboard-layout-item {
|
||||
width: 100px;
|
||||
text-align: center;
|
||||
height: 32px;
|
||||
box-shadow: 0px 3px 6px 0px rgba(166, 174, 190, 0.8);
|
||||
border-radius: 2px 4px 4px 2px;
|
||||
margin: 0 3px 8px 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
.dashboard-layout-item-cricle {
|
||||
display: inline-block;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border-radius: 6px;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 3px;
|
||||
}
|
||||
.p-name {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
margin-left: 15px;
|
||||
}
|
||||
.hoverDiv {
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
z-index: 10;
|
||||
background-color: #ff0000;
|
||||
z-index: 10;
|
||||
transform: scale(1.3) translateZ(0);
|
||||
}
|
||||
}
|
||||
.dashboard-layout-item {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
background-color: #d3d3d3;
|
||||
border-radius: 2px;
|
||||
margin: 0 3px 8px 0;
|
||||
position: relative;
|
||||
&:nth-child(2n) {
|
||||
margin-right: 30px;
|
||||
}
|
||||
&:first-child {
|
||||
margin-left: 50px;
|
||||
margin-left: 40px;
|
||||
}
|
||||
&:last-child {
|
||||
margin-right: 30px;
|
||||
}
|
||||
.coordinate{
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
}
|
||||
.x-coordinate {
|
||||
position: absolute;
|
||||
top: -25px;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
}
|
||||
.y-coordinate {
|
||||
position: absolute;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
width: 20px;
|
||||
height: 30px;
|
||||
left: -25px;
|
||||
}
|
||||
}
|
||||
.el-divider--horizontal {
|
||||
margin: 10px 0;
|
||||
|
||||
Reference in New Issue
Block a user