This commit is contained in:
朱文强 2024-01-23 15:11:43 +08:00
parent dc406786e7
commit 49bbd6fcda
12 changed files with 955 additions and 295 deletions

View File

@ -55,6 +55,7 @@
"file-saver": "2.0.5", "file-saver": "2.0.5",
"fuse.js": "6.6.2", "fuse.js": "6.6.2",
"highlight.js": "9.18.5", "highlight.js": "9.18.5",
"jquery": "^3.7.1",
"js-beautify": "1.13.0", "js-beautify": "1.13.0",
"jsencrypt": "3.3.1", "jsencrypt": "3.3.1",
"min-dash": "3.5.2", "min-dash": "3.5.2",

View File

@ -32,6 +32,7 @@ import basicPage from '../mixins/basic-page';
import { parseTime } from '../mixins/code-filter'; import { parseTime } from '../mixins/code-filter';
import codeFilter from '../mixins/code-filter'; import codeFilter from '../mixins/code-filter';
import { getMainTaskPage, deleteMainTask } from '@/api/oth/mainTask'; import { getMainTaskPage, deleteMainTask } from '@/api/oth/mainTask';
import point from './point';
const tableProps = [ const tableProps = [
{ {
@ -58,13 +59,18 @@ const tableProps = [
width:110 width:110
}, },
{ {
prop: 'trayCode', prop: 'barCode',
label: '托盘编码', label: '托盘编码',
}, },
{ {
prop: 'agv', prop: 'agv',
label: 'agv', label: 'agv',
}, },
{
prop: 'agvPoint',
label: 'AGV起终点',
subcomponent: point,
},
{ {
prop: 'mainTaskState', prop: 'mainTaskState',
label: '状态', label: '状态',
@ -240,7 +246,7 @@ export default {
this.listQuery.pageSize = 10; this.listQuery.pageSize = 10;
this.listQuery.mainTaskCode = val.code; this.listQuery.mainTaskCode = val.code;
this.listQuery.mainTaskType = val.taskType; this.listQuery.mainTaskType = val.taskType;
this.listQuery.trayCode = val.tcode; this.listQuery.barCode = val.tcode;
this.listQuery.mainTaskState = val.status; this.listQuery.mainTaskState = val.status;
this.listQuery.agv = val.agv; this.listQuery.agv = val.agv;
this.listQuery.createTime = val.searchTime; this.listQuery.createTime = val.searchTime;

View File

@ -0,0 +1,32 @@
<!--
* @Author: zwq
* @Date: 2023-09-22 15:36:40
* @LastEditors: zwq
* @LastEditTime: 2023-09-26 15:59:57
* @Description:
-->
<template>
<div>
{{ injectData.mainTaskType===1? injectData.agvStartPoint:injectData.agvEndPoint}}
</div>
</template>
<script>
export default {
name: "point",
props: {
injectData: {
type: Object,
default: () => ({}),
},
},
data() {
return {
list: this.injectData,
};
},
methods: {
},
};
</script>
<style scoped>
</style>

View File

@ -25,6 +25,7 @@ import basicPage from '../mixins/basic-page';
import { parseTime } from '../mixins/code-filter'; import { parseTime } from '../mixins/code-filter';
import codeFilter from '../mixins/code-filter'; import codeFilter from '../mixins/code-filter';
import { getMainTaskHistoryPage } from '@/api/oth/mainTaskHistory'; import { getMainTaskHistoryPage } from '@/api/oth/mainTaskHistory';
import point from './point';
const tableProps = [ const tableProps = [
{ {
@ -51,13 +52,18 @@ const tableProps = [
width:110 width:110
}, },
{ {
prop: 'trayCode', prop: 'barCode',
label: '托盘编码', label: '托盘编码',
}, },
{ {
prop: 'agv', prop: 'agv',
label: 'agv', label: 'agv',
}, },
{
prop: 'agvPoint',
label: 'AGV起终点',
subcomponent: point,
},
{ {
prop: 'mainTaskState', prop: 'mainTaskState',
label: '状态', label: '状态',
@ -246,7 +252,7 @@ export default {
this.listQuery.pageSize = 10; this.listQuery.pageSize = 10;
this.listQuery.mainTaskCode = val.code; this.listQuery.mainTaskCode = val.code;
this.listQuery.mainTaskType = val.taskType; this.listQuery.mainTaskType = val.taskType;
this.listQuery.trayCode = val.tcode; this.listQuery.barCode = val.tcode;
// this.listQuery.mainTaskState = val.status; // this.listQuery.mainTaskState = val.status;
this.listQuery.mainTaskState = 5; this.listQuery.mainTaskState = 5;
this.listQuery.stacker = val.stacker; this.listQuery.stacker = val.stacker;

View File

@ -0,0 +1,32 @@
<!--
* @Author: zwq
* @Date: 2023-09-22 15:36:40
* @LastEditors: zwq
* @LastEditTime: 2023-09-26 15:59:57
* @Description:
-->
<template>
<div>
{{ injectData.mainTaskType===1? injectData.agvStartPoint:injectData.agvEndPoint}}
</div>
</template>
<script>
export default {
name: "point",
props: {
injectData: {
type: Object,
default: () => ({}),
},
},
data() {
return {
list: this.injectData,
};
},
methods: {
},
};
</script>
<style scoped>
</style>

View File

@ -2,7 +2,7 @@
/* /*
* @Date: 2020-12-29 16:49:28 * @Date: 2020-12-29 16:49:28
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-10-30 15:05:30 * @LastEditTime: 2024-01-19 13:50:00
* @FilePath: \basic-admin\src\filters\basicData\index.js * @FilePath: \basic-admin\src\filters\basicData\index.js
* @Description: * @Description:
*/ */
@ -29,6 +29,7 @@ const table = {
1: '入库', 1: '入库',
2: '出库', 2: '出库',
3: '移库', 3: '移库',
4: '出库带移库',
}, },
mainTaskState:{ mainTaskState:{
0: '开始', 0: '开始',
@ -37,6 +38,8 @@ const table = {
3: '已发送堆垛机', 3: '已发送堆垛机',
4: '堆垛机运行中', 4: '堆垛机运行中',
5: '完成', 5: '完成',
6: '已发送传输线',
7: '传输线运行中',
}, },
taskSource: { taskSource: {
1: 'mes下发', 1: 'mes下发',

View 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>

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: zwq * @Author: zwq
* @Date: 2023-08-21 14:26:23 * @Date: 2024-01-17 09:58:41
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-10-30 15:08:26 * @LastEditTime: 2024-01-23 10:02:15
* @Description: * @Description:
--> -->
<template> <template>
@ -12,9 +12,9 @@
ref="searchBarForm" ref="searchBarForm"
@headBtnClick="buttonClick" /> @headBtnClick="buttonClick" />
<div class="tips"> <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="#16DC09" style="border: none"></el-tag> <el-tag effect="dark" color="#d3d3d3" style="border: none"></el-tag>
<el-tag effect="dark" color="#FFA08F" style="border: none"></el-tag> <el-tag effect="dark" color="#7362F3" style="border: none"></el-tag>
</div> </div>
<div class="mainbody"> <div class="mainbody">
<div v-for="i in listQuery.total" :key="i"> <div v-for="i in listQuery.total" :key="i">
@ -23,31 +23,52 @@
<el-row type="flex" class="flex-warp"> <el-row type="flex" class="flex-warp">
<div <div
class="dashboard-layout-item" class="dashboard-layout-item"
v-for="a in wareData.one.slice((i - 1) * 10, i * 10)" v-for="j in wareData.filter(
:key="a.id + a.warehouseStorehouseCode" (item) => item.wareRow === (i - 1) * 4 + 1
:title="a.warehouseStorehouseName" )"
style="background: #fff8e8; float: left"> :key="j.id + j.warehouseStorehouseName"
<div :title="j.warehouseStorehouseName"
class="dashboard-layout-item-cricle"
:style="{ :style="{
background: bgColor[a.warehouseStorehouseState], background: bgColor[j.warehouseStorehouseState],
}" /> }">
<p class="p-name">{{ a.warehouseStorehouseName }}</p> <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> </div>
</el-row> </el-row>
<el-row type="flex" class="flex-warp"> <el-row type="flex" class="flex-warp">
<div <div
class="dashboard-layout-item" class="dashboard-layout-item"
v-for="b in wareData.two.slice((i - 1) * 10, i * 10)" v-for="j in wareData.filter(
:key="b.id + b.warehouseStorehouseCode" (item) => item.wareRow === (i - 1) * 4 + 2
:title="b.warehouseStorehouseName" )"
style="background: #fff8e8; float: left"> :key="j.id + j.warehouseStorehouseName"
<div :title="j.warehouseStorehouseName"
class="dashboard-layout-item-cricle"
:style="{ :style="{
background: bgColor[b.warehouseStorehouseState], background: bgColor[j.warehouseStorehouseState],
}" /> }">
<p class="p-name">{{ b.warehouseStorehouseName }}</p> <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> </div>
</el-row> </el-row>
</el-col> </el-col>
@ -58,31 +79,47 @@
<el-row type="flex" class="flex-warp"> <el-row type="flex" class="flex-warp">
<div <div
class="dashboard-layout-item" class="dashboard-layout-item"
v-for="c in wareData.there.slice((i - 1) * 10, i * 10)" v-for="j in wareData.filter(
:key="c.id + c.warehouseStorehouseCode" (item) => item.wareRow === (i - 1) * 4 + 3
:title="c.warehouseStorehouseName" )"
style="background: #fff8e8; float: left"> :key="j.id + j.warehouseStorehouseName"
<div :title="j.warehouseStorehouseName"
class="dashboard-layout-item-cricle"
:style="{ :style="{
background: bgColor[c.warehouseStorehouseState], background: bgColor[j.warehouseStorehouseState],
}" /> }">
<p class="p-name">{{ c.warehouseStorehouseName }}</p> <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> </div>
</el-row> </el-row>
<el-row type="flex" class="flex-warp"> <el-row type="flex" class="flex-warp">
<div <div
class="dashboard-layout-item" class="dashboard-layout-item"
v-for="d in wareData.four.slice((i - 1) * 10, i * 10)" v-for="j in wareData.filter((item) => item.wareRow === i * 4)"
:key="d.id + d.warehouseStorehouseCode" :key="j.id + j.warehouseStorehouseName"
:title="d.warehouseStorehouseName" :title="j.warehouseStorehouseName"
style="background: #fff8e8; float: left">
<div
class="dashboard-layout-item-cricle"
:style="{ :style="{
background: bgColor[d.warehouseStorehouseState], background: bgColor[j.warehouseStorehouseState],
}" /> }">
<p class="p-name">{{ d.warehouseStorehouseName }}</p> <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> </div>
</el-row> </el-row>
</el-col> </el-col>
@ -108,32 +145,12 @@ export default {
exportURL: exportWarehouseStorehouseExcel, exportURL: exportWarehouseStorehouseExcel,
}, },
listQuery: { listQuery: {
stacker: 1,
wareLayer: 1, wareLayer: 1,
total: 0, total: 0,
}, },
wareData: { wareData: [],
one: [], bgColor: ['#d3d3d3', '#7362F3', '#16DC09'], //
two: [],
there: [],
four: [],
},
bgColor: ['#16DC09', '#FFA08F', '#7362F3'],
formConfig: [ 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', type: 'select',
label: '选择层', label: '选择层',
@ -167,36 +184,10 @@ export default {
components: {}, components: {},
created() {}, created() {},
methods: { 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) { buttonClick(val) {
switch (val.btnName) { switch (val.btnName) {
case 'search': case 'search':
this.listQuery.wareLayer = val.value; this.listQuery.wareLayer = val.value;
this.listQuery.stacker = val.stacker;
this.getDataList(); this.getDataList();
break; break;
case 'export': case 'export':
@ -206,6 +197,15 @@ export default {
console.log(val); 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> </script>
@ -213,52 +213,59 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.mainbody { .mainbody {
display: flex; display: flex;
gap: 70px;
flex-direction: column; flex-direction: column;
justify-content: space-around;
min-width: 80vw;
border-radius: 5px;
padding-top: 25px;
} }
.flex-warp { .flex-warp {
flex-wrap: nowrap; flex-wrap: nowrap;
} }
.dashboard-layout-item { .hoverDiv {
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; cursor: pointer;
width: 100%;
height: 30px;
&:hover {
background-color: #ff0000;
z-index: 10; z-index: 10;
transform: scale(1.3) translateZ(0); 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) { &:nth-child(2n) {
margin-right: 30px; margin-right: 30px;
} }
&:first-child { &:first-child {
margin-left: 50px; margin-left: 40px;
} }
&:last-child { &:last-child {
margin-right: 30px; 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 { .el-divider--horizontal {
margin: 10px 0; margin: 10px 0;

View 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>

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: zwq * @Author: zwq
* @Date: 2023-08-21 14:26:23 * @Date: 2024-01-17 09:58:41
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2023-10-30 15:08:33 * @LastEditTime: 2024-01-23 10:02:53
* @Description: * @Description:
--> -->
<template> <template>
@ -12,9 +12,9 @@
ref="searchBarForm" ref="searchBarForm"
@headBtnClick="buttonClick" /> @headBtnClick="buttonClick" />
<div class="tips"> <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="#16DC09" style="border: none"></el-tag> <el-tag effect="dark" color="#d3d3d3" style="border: none"></el-tag>
<el-tag effect="dark" color="#FFA08F" style="border: none"></el-tag> <el-tag effect="dark" color="#7362F3" style="border: none"></el-tag>
</div> </div>
<div class="mainbody"> <div class="mainbody">
<div v-for="i in listQuery.total" :key="i"> <div v-for="i in listQuery.total" :key="i">
@ -23,31 +23,52 @@
<el-row type="flex" class="flex-warp"> <el-row type="flex" class="flex-warp">
<div <div
class="dashboard-layout-item" class="dashboard-layout-item"
v-for="a in wareData.one.slice((i - 1) * 10, i * 10)" v-for="j in wareData.filter(
:key="a.id + a.warehouseStorehouseCode" (item) => item.wareRow === (i - 1) * 4 + 1
:title="a.warehouseStorehouseName" )"
style="background: #fff8e8; float: left"> :key="j.id + j.warehouseStorehouseName"
<div :title="j.warehouseStorehouseName"
class="dashboard-layout-item-cricle"
:style="{ :style="{
background: bgColor[a.warehouseStorehouseState], background: bgColor[j.warehouseStorehouseState],
}" /> }">
<p class="p-name">{{ a.warehouseStorehouseName }}</p> <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> </div>
</el-row> </el-row>
<el-row type="flex" class="flex-warp"> <el-row type="flex" class="flex-warp">
<div <div
class="dashboard-layout-item" class="dashboard-layout-item"
v-for="b in wareData.two.slice((i - 1) * 10, i * 10)" v-for="j in wareData.filter(
:key="b.id + b.warehouseStorehouseCode" (item) => item.wareRow === (i - 1) * 4 + 2
:title="b.warehouseStorehouseName" )"
style="background: #fff8e8; float: left"> :key="j.id + j.warehouseStorehouseName"
<div :title="j.warehouseStorehouseName"
class="dashboard-layout-item-cricle"
:style="{ :style="{
background: bgColor[b.warehouseStorehouseState], background: bgColor[j.warehouseStorehouseState],
}" /> }">
<p class="p-name">{{ b.warehouseStorehouseName }}</p> <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> </div>
</el-row> </el-row>
</el-col> </el-col>
@ -58,31 +79,47 @@
<el-row type="flex" class="flex-warp"> <el-row type="flex" class="flex-warp">
<div <div
class="dashboard-layout-item" class="dashboard-layout-item"
v-for="c in wareData.there.slice((i - 1) * 10, i * 10)" v-for="j in wareData.filter(
:key="c.id + c.warehouseStorehouseCode" (item) => item.wareRow === (i - 1) * 4 + 3
:title="c.warehouseStorehouseName" )"
style="background: #fff8e8; float: left"> :key="j.id + j.warehouseStorehouseName"
<div :title="j.warehouseStorehouseName"
class="dashboard-layout-item-cricle"
:style="{ :style="{
background: bgColor[c.warehouseStorehouseState], background: bgColor[j.warehouseStorehouseState],
}" /> }">
<p class="p-name">{{ c.warehouseStorehouseName }}</p> <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> </div>
</el-row> </el-row>
<el-row type="flex" class="flex-warp"> <el-row type="flex" class="flex-warp">
<div <div
class="dashboard-layout-item" class="dashboard-layout-item"
v-for="d in wareData.four.slice((i - 1) * 10, i * 10)" v-for="j in wareData.filter((item) => item.wareRow === i * 4)"
:key="d.id + d.warehouseStorehouseCode" :key="j.id + j.warehouseStorehouseName"
:title="d.warehouseStorehouseName" :title="j.warehouseStorehouseName"
style="background: #fff8e8; float: left">
<div
class="dashboard-layout-item-cricle"
:style="{ :style="{
background: bgColor[d.warehouseStorehouseState], background: bgColor[j.warehouseStorehouseState],
}" /> }">
<p class="p-name">{{ d.warehouseStorehouseName }}</p> <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> </div>
</el-row> </el-row>
</el-col> </el-col>
@ -108,32 +145,12 @@ export default {
exportURL: exportWarehouseStorehouseExcel, exportURL: exportWarehouseStorehouseExcel,
}, },
listQuery: { listQuery: {
//stacker: 1,
wareLayer: 1, wareLayer: 1,
total: 0, total: 0,
}, },
wareData: { wareData: [],
one: [], bgColor: ['#d3d3d3', '#7362F3', '#16DC09'], //
two: [],
there: [],
four: [],
},
bgColor: ['#16DC09', '#FFA08F', '#7362F3'],
formConfig: [ 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', type: 'select',
label: '选择层', label: '选择层',
@ -169,36 +186,10 @@ export default {
this.listQuery.warehouseId = this.bId; this.listQuery.warehouseId = this.bId;
}, },
methods: { 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) { buttonClick(val) {
switch (val.btnName) { switch (val.btnName) {
case 'search': case 'search':
this.listQuery.wareLayer = val.value; this.listQuery.wareLayer = val.value;
this.listQuery.stacker = val.stacker;
this.getDataList(); this.getDataList();
break; break;
case 'export': case 'export':
@ -208,6 +199,15 @@ export default {
console.log(val); 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> </script>
@ -215,52 +215,59 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.mainbody { .mainbody {
display: flex; display: flex;
gap: 70px;
flex-direction: column; flex-direction: column;
justify-content: space-around;
min-width: 80vw;
border-radius: 5px;
padding-top: 25px;
} }
.flex-warp { .flex-warp {
flex-wrap: nowrap; flex-wrap: nowrap;
} }
.dashboard-layout-item { .hoverDiv {
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; cursor: pointer;
width: 100%;
height: 30px;
&:hover {
background-color: #ff0000;
z-index: 10; z-index: 10;
transform: scale(1.3) translateZ(0); 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) { &:nth-child(2n) {
margin-right: 30px; margin-right: 30px;
} }
&:first-child { &:first-child {
margin-left: 50px; margin-left: 40px;
} }
&:last-child { &:last-child {
margin-right: 30px; 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 { .el-divider--horizontal {
margin: 10px 0; margin: 10px 0;

View File

@ -113,7 +113,12 @@
<div style="position: absolute; bottom: 24px; right: 24px"> <div style="position: absolute; bottom: 24px; right: 24px">
<el-button style="margin-right: 10px" @click="goback()">返回</el-button> <el-button style="margin-right: 10px" @click="goback()">返回</el-button>
<span> <span>
<el-button type="primary" @click="dataFormSubmit()">保存</el-button> <el-button
type="primary"
@click="dataFormSubmit()"
:loading="isloading">
保存
</el-button>
</span> </span>
</div> </div>
@ -221,6 +226,7 @@ export default {
trayCode: '', trayCode: '',
startInfo: '', startInfo: '',
}, },
isloading: false,
updata: {}, updata: {},
listQuery: { listQuery: {
pageSize: 10, pageSize: 10,
@ -250,6 +256,7 @@ export default {
this.productAttributeList.splice(0); this.productAttributeList.splice(0);
}, },
init(val) { init(val) {
this.isloading = false;
this.updata = val; this.updata = val;
this.dataForm.id = val.id; this.dataForm.id = val.id;
this.dataForm.warehouseStorehouseName = val.warehouseStorehouseName; this.dataForm.warehouseStorehouseName = val.warehouseStorehouseName;
@ -342,12 +349,14 @@ export default {
this.updata.agvGroundCode = this.dataForm.startInfo.split('-')[1]; this.updata.agvGroundCode = this.dataForm.startInfo.split('-')[1];
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (valid) { if (valid) {
this.isloading = true;
// //
this.updata.list = this.productAttributeList; this.updata.list = this.productAttributeList;
if (this.dataForm.id) { if (this.dataForm.id) {
inWarehouseStorehouse(this.updata).then((response) => { inWarehouseStorehouse(this.updata).then((response) => {
this.$modal.msgSuccess('修改成功'); this.$modal.msgSuccess('修改成功');
this.visible = false; this.visible = false;
this.isloading = false;
this.$emit('refreshDataList'); this.$emit('refreshDataList');
}); });
return; return;

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-11-18 14:16:25 * @Date: 2021-11-18 14:16:25
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2024-01-16 14:49:00 * @LastEditTime: 2024-01-16 16:27:06
* @Description: * @Description:
--> -->
<template> <template>
@ -107,6 +107,7 @@ export default {
potArr2: [], potArr2: [],
potArr3, potArr3,
type: 0, type: 0,
isloading: false,
dataRule: { dataRule: {
targetId: [ targetId: [
{ required: true, message: '位置不能为空', trigger: 'blur' }, { required: true, message: '位置不能为空', trigger: 'blur' },
@ -121,9 +122,10 @@ export default {
}, },
methods: { methods: {
init(id, type, wId, stacker) { init(id, type, wId, stacker) {
this.isloading = false;
this.dataForm.sourceId = id || ''; this.dataForm.sourceId = id || '';
this.warehouseId = wId || null; this.warehouseId = wId || null;
this.dataForm.targetId = null this.dataForm.targetId = null;
this.type = type; this.type = type;
this.visible = true; this.visible = true;
this.$nextTick(() => { this.$nextTick(() => {
@ -166,10 +168,12 @@ export default {
}, },
// //
dataFormSubmit() { dataFormSubmit() {
if (!this.isloading) {
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((valid) => {
if (!valid) { if (!valid) {
return false; return false;
} }
this.isloading = true;
if (this.type) { if (this.type) {
const lQ = { const lQ = {
warehouseId: this.warehouseId, warehouseId: this.warehouseId,
@ -210,6 +214,9 @@ export default {
this.$emit('refreshDataList'); this.$emit('refreshDataList');
}); });
}); });
} else {
this.$modal.msgWarning('请勿重复提交!');
}
}, },
}, },
}; };