按照现场修改

just-order-rfid
LAPTOP-S9HJSOEB\昊天 7 months ago
parent b26695e00e
commit 400acf8822

Binary file not shown.

@ -42,7 +42,7 @@ html {--antd-wave-shadow-color: @primary-color;}
.ant-alert-info .ant-alert-icon {color: #1890ff;}
.ant-alert-warning {background-color: #fffbe6;border: 1px solid #ffe58f;}
.ant-alert-warning .ant-alert-icon {color: #faad14;}
.ant-alert-error {background-color: #fff1f0;border: 1px solid #ffa39e;}
.ant-alert-error {background-color: color(~`colorPalette("@{text-color}", 1)`);border: 1px solid #ffa39e;}
.ant-alert-error .ant-alert-icon {color: #f5222d;}
.ant-alert-close-icon {background-color: transparent;border: none;}
.ant-alert-close-icon .anticon-close {color: @text-color-secondary;}
@ -1377,7 +1377,7 @@ tr.ant-table-expanded-row:hover {background: #fbfbfb;}
.ant-tag-pink-inverse {color: #fff;background: #eb2f96;border-color: #eb2f96;}
.ant-tag-magenta {color: #eb2f96;background: #fff0f6;border-color: #ffadd2;}
.ant-tag-magenta-inverse {color: #fff;background: #eb2f96;border-color: #eb2f96;}
.ant-tag-red {color: #f5222d;background: #fff1f0;border-color: #ffa39e;}
.ant-tag-red {color: #f5222d;background: color(~`colorPalette("@{text-color}", 1)`);border-color: #ffa39e;}
.ant-tag-red-inverse {color: #fff;background: #f5222d;border-color: #f5222d;}
.ant-tag-volcano {color: #fa541c;background: #fff2e8;border-color: #ffbb96;}
.ant-tag-volcano-inverse {color: #fff;background: #fa541c;border-color: #fa541c;}

@ -10,12 +10,12 @@
<!-- <script src="/video_play_plugins/video.js"></script> -->
<script src="/video_play_plugins/webrtcplayer.js"></script>
<title>昆船垛机视觉系统</title>
<title>RFID盘点系统</title>
</head>
<body>
<noscript>
<strong>We're sorry but 昆船垛机视觉系统 doesn't work properly without JavaScript enabled. Please enable it to
<strong>We're sorry but RFID盘点系统 doesn't work properly without JavaScript enabled. Please enable it to
continue.</strong>
</noscript>

@ -11,11 +11,11 @@ const store = {
"primary-color":"rgba(184, 68, 13, 1)"
},
"title":{
"text":"昆船垛机智能视觉系统",
"text":"RFID盘点系统",
"style":{
"color":"rgba(255, 255, 255, 1)",
"background-color":"rgba(163, 60, 12, 1)",
"font-size":"24px"
"font-size":"20px"
}
},
"menu":{

@ -20,24 +20,33 @@
<!-- <slot :data="{select, nums, random}"></slot> -->
<div class="roadway-buttom">
<div class="roadway-box">
<div class="line" v-for="(row,rowIndex) in total.row" :key="rowIndex" v-if="row >= random.row[0] && row <= random.row[1]">
<div
class="line"
v-for="(row,rowIndex) in total.row"
:key="rowIndex"
v-if="row >= random.row[0] && row <= random.row[1]"
>
<p style="width:90px;">
{{ random.row[0] + random.row[1] - rowIndex - 1 +"层"}}
</p>
<div v-for="(column,index) in total.column" :key="index" class="el" v-if="column >= random.column[0] && column <= random.column[1]">
<div
v-for="(column,index) in total.column"
:key="index"
class="el"
v-if="column >= random.column[0] && column <= random.column[1]"
>
<!--渲染默认巷道框架规格 定位浮在 已有巷道上做对应-->
<span
<span
class="default"
:id="`${direction}-${side}-${random.row[0] + random.row[1] - rowIndex - 1}-${column}`"
>
:id="`${direction}-${side}-${random.row[0] + random.row[1] - rowIndex - 1}-${column}`"
>
<!-- @click="tocheckPage(random.row[0] + random.row[1] - rowIndex - 1,column)"> -->
<!-- {{column}}-{{ random.row[0] + random.row[1] - rowIndex - 1}} -->
{{column}}
{{column}}
</span>
</div>
</div>
@ -47,23 +56,62 @@
</a-layout>
<a-layout-footer>
<!-- <a-tabs default-active-key="1" tab-position="bottom" @change="value => select.row = value" v-if="total.row > nums.row"> -->
<a-tabs :activeKey="this.select.column" tab-position="bottom" @change="changeTab" v-if="total.column > nums.column">
<a-tabs
:activeKey="this.select.column"
tab-position="bottom"
@change="changeTab"
v-if="total.column > nums.column"
>
<a-tab-pane
v-for="index in latticeColumn"
:key="index"
>
<span slot="tab">
{{ getRandom(index, latticeColumn, nums.column, total.column) }}
<!-- <a-icon :id="`${shelveId}-row-${getRandom(index,latticeRow,nums.row,total.row)}`"/> -->
<a-icon type="info-circle" v-if="status.column[index] === 1" style="color: #d81e06"/>
<a-icon type="exclamation-circle" v-else style="color: #909399" />
</span>
<span slot="tab">
{{ getRandom(index, latticeColumn, nums.column, total.column) }}
<!-- <a-icon :id="`${shelveId}-row-${getRandom(index,latticeRow,nums.row,total.row)}`"/> -->
<a-icon
type="info-circle"
v-if="status.column[index] === 1"
style="color: #d81e06"
/>
<a-icon
type="exclamation-circle"
v-else
style="color: #909399"
/>
</span>
</a-tab-pane>
</a-tabs>
</a-layout-footer>
</a-layout>
<a-modal
title="盘点信息"
:visible="visible"
:confirm-loading="confirmLoading"
@ok="handleOk"
@cancel="handleCancel"
>
<template slot="footer">
<a-button
key="submit"
type="primary"
:loading="loading"
@click="handleOk"
>
人工核对正确
</a-button>
<a-button
key="back"
@click="handleCancel"
>
退出
</a-button>
</template>
<p>上位标签{{ wmsTrayCode }}</p>
<p>扫码标签{{ trayCode }}</p>
</a-modal>
</div>
</template>
@ -78,76 +126,78 @@ export default {
default: () => {
return {
row: 1,
column: 1
}
}
column: 1,
};
},
},
//
total:{
total: {
type: Object,
default:()=>{
return {}
}
default: () => {
return {};
},
},
nums: {
type: Object,
default: () => {
return {
row: 20,
column: 71
}
}
column: 71,
};
},
},
direction: {
type: Number,
default: () => {
return {}
}
return {};
},
},
side: {
type: Number,
default: () => {
return {}
}
return {};
},
},
streetId: {
type: Number,
default: () => {
return {}
}
return {};
},
},
streetName: {
type: String,
default: () => {
return {}
}
return {};
},
},
},
computed: {
//
latticeRow() {
return parseInt(this.total.row / this.nums.row) + (this.total.row % this.nums.row > 0 ? 1 : 0);
return (
parseInt(this.total.row / this.nums.row) +
(this.total.row % this.nums.row > 0 ? 1 : 0)
);
},
latticeColumn() {
return parseInt(this.total.column / this.nums.column) + (this.total.column % this.nums.column > 0 ? 1 : 0);
return (
parseInt(this.total.column / this.nums.column) +
(this.total.column % this.nums.column > 0 ? 1 : 0)
);
},
random() {
return {
row: this.getRandomRow(this.select.row),
column: this.getRandomColumn(this.select.column),
}
};
},
watchDirection(){
watchDirection() {
return this.direction;
},
watchSide(){
},
watchSide() {
return this.side;
},
},
},
watch: {
watchDirection() {
@ -157,185 +207,304 @@ export default {
this.getStatus();
},
immediate: true,
},
data() {
return {
status: {
row: {},
column: {}
column: {},
},
timer: null,
}
trayCode: "",
wmsTrayCode: "",
visible: false,
confirmLoading: false,
id: "",
};
},
mounted() {
this.$nextTick(() => {
this.getStatus();
})
this.$on('hook:activated', () => {
});
this.$on("hook:activated", () => {
this.timer = window.setInterval(this.getStatus, 3000);
})
});
this.timer = window.setInterval(this.getStatus, 3000);
this.$on('hook:deactivated', () => {
clearInterval(this.timer)
this.timer = null
})
this.$on("hook:deactivated", () => {
clearInterval(this.timer);
this.timer = null;
});
},
beforeDestroy() {
console.log("beforeDestroy")
window.clearInterval(this.timer);
console.log("beforeDestroy");
window.clearInterval(this.timer);
this.timer = null;
},
created() {
var nameEQC = "s"+this.streetId+"d"+this.direction+"e"+this.side + "c" + "=";
var nameEQR = "s"+this.streetId+"d"+this.direction+"e"+this.side + "r" + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var nameEQC =
"s" +
this.streetId +
"d" +
this.direction +
"e" +
this.side +
"c" +
"=";
var nameEQR =
"s" +
this.streetId +
"d" +
this.direction +
"e" +
this.side +
"r" +
"=";
var ca = document.cookie.split(";");
for (var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
while (c.charAt(0) == " ") c = c.substring(1, c.length);
if (c.indexOf(nameEQC) == 0) {
this.select.column = Number(c.substring(nameEQC.length,c.length));
this.select.column = Number(
c.substring(nameEQC.length, c.length)
);
}
if (c.indexOf(nameEQR) == 0) {
this.select.row = Number(c.substring(nameEQR.length,c.length));
this.select.row = Number(c.substring(nameEQR.length, c.length));
}
}
},
destroyed() {
window.clearInterval(this.timer);
window.clearInterval(this.timer);
this.timer = null;
},
methods: {
getTrayCode(row,column,direction){
console.log(row,column,direction);
methods: {
showModal(trayCode, wmsTrayCode, id) {
this.trayCode = trayCode;
this.wmsTrayCode = wmsTrayCode;
this.id = id;
this.visible = true;
},
//
handleOk(e) {
if (this.id != "") {
this.$api.httpApi
.stockCheckCorrect({
data: {
id: this.id,
ok: 1,
},
})
.then((res) => {
if (res.code == 200) {
this.$message.success("操作成功");
this.getStockInfo(this.row, this.column);
}
});
}
this.visible = false;
},
handleCancel(e) {
console.log("Clicked cancel button");
this.visible = false;
},
changeTab(value){
document.cookie = "s"+this.streetId+"d"+this.direction+"e"+this.side + "c"+ "=" +value;
getTrayCode(row, column, direction) {
console.log(row, column, direction);
},
changeTab(value) {
document.cookie =
"s" +
this.streetId +
"d" +
this.direction +
"e" +
this.side +
"c" +
"=" +
value;
this.select.column = value
this.getStatus()
this.select.column = value;
this.getStatus();
},
changeTabLeft(value){
document.cookie = "s"+this.streetId+"d"+this.direction+"e"+this.side + "r" + "=" +value;
this.select.row = value
this.getStatus()
changeTabLeft(value) {
document.cookie =
"s" +
this.streetId +
"d" +
this.direction +
"e" +
this.side +
"r" +
"=" +
value;
this.select.row = value;
this.getStatus();
},
//
getRandom(index, lattice, num, total) {
if(index !== lattice) {
if (index !== lattice) {
return `${(index - 1) * num + 1} - ${index * num}`;
}else {
} else {
return `${(index - 1) * num + 1} - ${total}`;
}
},
//
getRandomRow(val) {
console.log(" "+this.latticeRow);
console.log(this.latticeRow + 1 - val, this.latticeRow, this.nums.row, this.total.row)
return this.getRandom(this.latticeRow + 1 - val, this.latticeRow, this.nums.row, this.total.row).split(' - ').map(item => Number(item));
console.log(" " + this.latticeRow);
console.log(
this.latticeRow + 1 - val,
this.latticeRow,
this.nums.row,
this.total.row
);
return this.getRandom(
this.latticeRow + 1 - val,
this.latticeRow,
this.nums.row,
this.total.row
)
.split(" - ")
.map((item) => Number(item));
},
getRandomColumn(val) {
return this.getRandom(val, this.latticeColumn, this.nums.column, this.total.column).split(' - ').map(item => Number(item));
return this.getRandom(
val,
this.latticeColumn,
this.nums.column,
this.total.column
)
.split(" - ")
.map((item) => Number(item));
},
getStatusBg(row,column,status,trayCode) {
var dom = document.getElementById(this.direction+"-"+this.side+"-"+row+'-'+column);
getStatusBg(row, column, status, trayCode, wmsTrayCode, id) {
var dom = document.getElementById(
this.direction + "-" + this.side + "-" + row + "-" + column
);
var color;
if(status == -1){
color = '#f2ed48'
}else if(status == 2){
color = '#1afa29'
}else if( status == 3){
color = '#4c71d8'
}else if(status == 1){
color = '#d81e06'
}else if(status == 4){
color = '#bc55cf'
}else{
color = '#bfbfbf'
if (status == -1) {
color = "#f2ed48";
} else if (status == 2) {
color = "#1afa29";
} else if (status == 3) {
color = "#4c71d8";
} else if (status == 1) {
color = "#d81e06";
} else if (status == 4) {
color = "#bc55cf";
} else {
color = "#bfbfbf";
}
dom.style.background = color
console.log(trayCode);
dom.style.background = color;
// console.log(trayCode);
if (trayCode != null && trayCode !== "") {
dom.title ="rfid扫描结果"+ trayCode
dom.title = "rfid扫描结果" + trayCode;
dom.addEventListener("click", () => {
this.showModal(trayCode, wmsTrayCode, id); // showModal
});
}
},
getStatus(){
var columnTab = []
for(let c = 1; c <= this.latticeColumn ;c++){
let tab = this.getRandom(c,this.latticeColumn,this.nums.column,this.total.column)
columnTab.push(tab)
getStatus() {
var columnTab = [];
for (let c = 1; c <= this.latticeColumn; c++) {
let tab = this.getRandom(
c,
this.latticeColumn,
this.nums.column,
this.total.column
);
columnTab.push(tab);
}
var rowTab = []
for(let r = 1; r <= this.latticeRow ;r++){
let tab = this.getRandom(r,this.latticeRow,this.nums.row,this.total.row)
rowTab.push(tab)
var rowTab = [];
for (let r = 1; r <= this.latticeRow; r++) {
let tab = this.getRandom(
r,
this.latticeRow,
this.nums.row,
this.total.row
);
rowTab.push(tab);
}
this.$api.httpApi.getStatusByRowColumn({
data: {
columnStart: this.random.column[0],
columnEnd: this.random.column[1],
rowStart: this.random.row[0],
rowEnd: this.random.row[1],
streetId: this.streetId,
direction: this.direction,
side: this.side,
rowTabs: rowTab,
columnTabs: columnTab
}
}).then(res => {
if(res.code == 200){
if(res.data.stocks){
for(let a of res.data.stocks){
this.getStatusBg(a.row,a.column,a.status,a.trayCode)
this.$api.httpApi
.getStatusByRowColumn({
data: {
columnStart: this.random.column[0],
columnEnd: this.random.column[1],
rowStart: this.random.row[0],
rowEnd: this.random.row[1],
streetId: this.streetId,
direction: this.direction,
side: this.side,
rowTabs: rowTab,
columnTabs: columnTab,
},
})
.then((res) => {
if (res.code == 200) {
if (res.data.stocks) {
for (let a of res.data.stocks) {
this.getStatusBg(
a.row,
a.column,
a.status,
a.trayCode,
a.wmsTrayCode,
a.id
);
}
}
}
var i = 1;
for(let a in res.data.columnTabStatus){
this.$set(this.status.column, i, res.data.columnTabStatus[a]);
i++;
}
var j = 0;
for(let a in res.data.rowTabStatus){
j++;
}
for(let a in res.data.rowTabStatus){
this.$set(this.status.row, j, res.data.rowTabStatus[a]);
j--;
}
}
}).catch(err => {
});
var i = 1;
for (let a in res.data.columnTabStatus) {
this.$set(
this.status.column,
i,
res.data.columnTabStatus[a]
);
i++;
}
var j = 0;
for (let a in res.data.rowTabStatus) {
j++;
}
for (let a in res.data.rowTabStatus) {
this.$set(
this.status.row,
j,
res.data.rowTabStatus[a]
);
j--;
}
}
})
.catch((err) => {});
},
tocheckPage(row,column){
tocheckPage(row, column) {
this.$router.push({
name: 'checkOperation',
query: {row: row, column: column, direction: this.direction,side:this.side, streetId: this.streetId, name:this.streetName}
})
}
}
}
name: "checkOperation",
query: {
row: row,
column: column,
direction: this.direction,
side: this.side,
streetId: this.streetId,
name: this.streetName,
},
});
},
},
};
</script>
<style scoped lang="scss">
.subsection /deep/{
.subsection /deep/ {
width: 100%;
height: 360px;
overflow: hidden;
@ -344,7 +513,7 @@ export default {
margin-right: 0;
}
.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled) {
&:hover{
&:hover {
background: #40a9ff;
border-color: #40a9ff;
}
@ -381,7 +550,9 @@ export default {
margin-top: 0;
}
}
.ant-layout, .ant-layout-sider, .ant-layout-footer {
.ant-layout,
.ant-layout-sider,
.ant-layout-footer {
background-color: #ffffff;
}
roadway-buttom {

Loading…
Cancel
Save