This commit is contained in:
2024-10-24 16:26:27 +08:00
parent b6763f37aa
commit 30837f9858
25 changed files with 2326 additions and 364 deletions

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2024-01-17 09:58:41
* @LastEditors: zwq
* @LastEditTime: 2024-09-23 14:05:14
* @LastEditTime: 2024-10-09 10:01:32
* @Description:
-->
<template>
@@ -290,7 +290,7 @@ export default {
this.getDataList();
break;
case 'export':
this.handleExport(this.aId);
this.handleExport(this.aId,'库位监控-A仓库');
break;
default:
console.log(val);

View File

@@ -1,276 +0,0 @@
<!--
* @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>

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2024-01-17 09:58:41
* @LastEditors: zwq
* @LastEditTime: 2024-02-22 14:08:47
* @LastEditTime: 2024-10-09 10:02:44
* @Description:
-->
<template>
@@ -12,18 +12,20 @@
ref="searchBarForm"
@headBtnClick="buttonClick" />
<div class="tips">
<el-tag
effect="dark"
color="#16DC09"
style="border: none">
</el-tag>
<el-button
type="primary"
size="mini"
style="margin-right: 50px"
@click="stackerBtn">
巷道开关
</el-button>
<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>
<el-tag effect="dark" color="#ff0000" style="border: none">不可用</el-tag>
</div>
<div class="mainbody">
<!-- @click="showDia()" -->
<!-- @click="showDia()" -->
<div v-for="i in listQuery.total" :key="i">
<el-row style="margin-bottom: 10px">
<el-col :span="24">
@@ -65,10 +67,10 @@
j.deactivate === 0 || j.warehouseStorehouseState === 1
? 'not-allowed'
: 'pointer',
background:
j.deactivate === 1
? bgColor[j.warehouseStorehouseState]
: '#ff0000',
background:
j.deactivate === 1
? bgColor[j.warehouseStorehouseState]
: '#ff0000',
}" />
</el-popover>
</div>
@@ -108,10 +110,10 @@
j.deactivate === 0 || j.warehouseStorehouseState === 1
? 'not-allowed'
: 'pointer',
background:
j.deactivate === 1
? bgColor[j.warehouseStorehouseState]
: '#ff0000',
background:
j.deactivate === 1
? bgColor[j.warehouseStorehouseState]
: '#ff0000',
}" />
</el-popover>
</div>
@@ -155,10 +157,10 @@
j.deactivate === 0 || j.warehouseStorehouseState === 1
? 'not-allowed'
: 'pointer',
background:
j.deactivate === 1
? bgColor[j.warehouseStorehouseState]
: '#ff0000',
background:
j.deactivate === 1
? bgColor[j.warehouseStorehouseState]
: '#ff0000',
}" />
</el-popover>
</div>
@@ -196,10 +198,10 @@
j.deactivate === 0 || j.warehouseStorehouseState === 1
? 'not-allowed'
: 'pointer',
background:
j.deactivate === 1
? bgColor[j.warehouseStorehouseState]
: '#ff0000',
background:
j.deactivate === 1
? bgColor[j.warehouseStorehouseState]
: '#ff0000',
}" />
</el-popover>
</div>
@@ -213,6 +215,10 @@
ref="dialogRef"
v-if="diaVisible"
@refreshDataList="getDataList"></pot-dialog>
<stacker-dialog
ref="stackerRef"
v-if="stackerVisible"
:warehouse-id="listQuery.bId"></stacker-dialog>
</div>
</template>
@@ -223,6 +229,7 @@ import {
exportWarehouseStorehouseExcel,
} from '@/api/asrs/warehouseStorehouse';
import potDialog from './potDialog';
import stackerDialog from './stackerDialog';
export default {
mixins: [basicPage],
@@ -236,6 +243,7 @@ export default {
wareLayer: 1,
},
diaVisible: false,
stackerVisible: false,
wareData: [],
bgColor: ['#d3d3d3', '#7362F3', '#16DC09'], //空,锁,满
formConfig: [
@@ -271,9 +279,10 @@ export default {
},
components: {
potDialog,
stackerDialog,
},
created() {
this.listQuery.warehouseId = this.bId;
this.listQuery.warehouseId = this.bId
},
methods: {
buttonClick(val) {
@@ -283,7 +292,7 @@ export default {
this.getDataList();
break;
case 'export':
this.handleExport(this.bId);
this.handleExport(this.bId,'库位监控-B仓库');
break;
default:
console.log(val);
@@ -304,6 +313,12 @@ export default {
this.$refs.dialogRef.init();
});
},
stackerBtn() {
this.stackerVisible = true;
this.$nextTick(() => {
this.$refs.stackerRef.init();
});
},
},
};
</script>
@@ -359,7 +374,7 @@ export default {
width: 100%;
height: 30px;
&:hover {
border: 1px #000000 dashed;
border: 1px #000000 dashed;
transform: scale(1.3);
}
}