1.窗口拉动

2.图片旋转
3.增加状态查找
just-order
LAPTOP-S9HJSOEB\昊天 2 years ago
parent 545385dcbe
commit b428ae6eda

5
package-lock.json generated

@ -5598,6 +5598,11 @@
"integrity": "sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==", "integrity": "sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==",
"dev": true "dev": true
}, },
"draggable": {
"version": "4.2.0",
"resolved": "https://registry.npmmirror.com/draggable/-/draggable-4.2.0.tgz",
"integrity": "sha512-mu0FSsNY1Sb2q3EuAi3IBI6oVMV8l74y6xxYmloHq2/PJjOJEfpZCLGShzNUQKAF7JMfxA6ejxoGPyw5x6v8Ow=="
},
"duplexer": { "duplexer": {
"version": "0.1.2", "version": "0.1.2",
"resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz",

@ -14,6 +14,7 @@
"axios": "^0.19.2", "axios": "^0.19.2",
"bootstrap": "^5.1.3", "bootstrap": "^5.1.3",
"core-js": "^3.6.5", "core-js": "^3.6.5",
"draggable": "^4.2.0",
"echarts": "^5.4.3", "echarts": "^5.4.3",
"echarts-gl": "^2.0.9", "echarts-gl": "^2.0.9",
"element-ui": "^2.15.6", "element-ui": "^2.15.6",

@ -1,4 +1,51 @@
import Vue from 'vue' import Vue from 'vue'
Vue.directive('drag', {
bind(el, binding, vnode) {
let dialogHeader = el.querySelector('.ant-modal-header')
let dialog = el.querySelector('.ant-modal')
dialogHeader.style.cursor = 'move'
dialogHeader.onmousedown = (e) => {
let scale = e.scale || 1; // 或者 e.webkitScale 对于旧版Webkit浏览器
let startX = dialog.offsetLeft;
let disX = e.clientX - dialog.offsetLeft * scale;
let disY = e.clientY - dialog.offsetTop * scale;
document.onmousemove = (lo) => {
console.log(dialog.style.left);
let left = lo.clientX - disX - startX
let top = lo.clientY / scale - disY
console.log("aaaa");
dialog.style.left = left + 'px'
console.log(dialog.style.left);
dialog.style.top = top + 'px'
}
document.onmouseup = (e) => {
dialog.style.willChange = 'auto'; // 恢复默认值
document.onmousemove = null
document.onmouseup = null
}
}
}
})
import App from './App.vue' import App from './App.vue'
import router from './router' import router from './router'
import store from './store' import store from './store'
@ -13,7 +60,7 @@ Vue.prototype.$utils = utils
Vue.prototype.$api = api Vue.prototype.$api = api
// import axios from 'axios' // import axios from 'axios'
// Vue.prototype.$axios = axios // Vue.prototype.$axios = axios
import {HappyScroll} from 'vue-happy-scroll' import { HappyScroll } from 'vue-happy-scroll'
//自定义组件名 //自定义组件名
Vue.component('happy-scroll', HappyScroll) Vue.component('happy-scroll', HappyScroll)
// 引入css // 引入css
@ -22,7 +69,13 @@ import 'vue-happy-scroll/docs/happy-scroll.css'
// 图片预览插件 viewer // 图片预览插件 viewer
import 'viewerjs/dist/viewer.css' import 'viewerjs/dist/viewer.css'
import viewer from 'v-viewer' import viewer from 'v-viewer'
Vue.use(viewer) // main.js
Vue.use(viewer, {
defaultOptions: {
// 其他配置...
initialRotate: 90, // 初始旋转角度
},
})
new Vue({ new Vue({

@ -253,8 +253,6 @@ export default {
columnTabs: columnTab columnTabs: columnTab
} }
}).then(res => { }).then(res => {
console.log(this.status.column)
console.log(this.status.row)
if(res.code == 200){ if(res.code == 200){
if(res.data.stocks){ if(res.data.stocks){
for(let a of res.data.stocks){ for(let a of res.data.stocks){

@ -49,7 +49,7 @@
</a-select> </a-select>
</span> </span>
</li> </li>
<li class="img-box-item"> <!-- <li class="img-box-item">
<span class="img-box-title"> <span class="img-box-title">
个数: 个数:
</span> </span>
@ -63,7 +63,7 @@
/> />
</span> </span>
</li> </li> -->
<li <li
class="img-box-item" class="img-box-item"
v-for="item in params" v-for="item in params"
@ -83,7 +83,7 @@
class="img-box" class="img-box"
style="width: 100%;" style="width: 100%;"
> >
<div class="carousel-wrapper"> <div class="carousel-wrapper">
<div <div
v-for="ite in checkPics" v-for="ite in checkPics"
@ -95,7 +95,7 @@
:src="ite" :src="ite"
> >
</div> </div>
</div> </div>
<p>盘点图</p> <p>盘点图</p>
</div> </div>
@ -136,14 +136,23 @@
@click="getOveroperationPic()" @click="getOveroperationPic()"
> >
<a-modal <a-modal
width="1005px" v-drag
width="600px"
v-model="visible_pic" v-model="visible_pic"
title="随行图像" title="随行图像"
style="top: 20px;"
@ok="overoperationPicStop" @ok="overoperationPicStop"
> >
<img <div style="height: 700px;" class="parent">
style="height:100%; width:100% ;"
:src="checkObj.overoperationPic" >
<img
style="width:700px ;"
:src="checkObj.overoperationPic"
>
</div>
</a-modal> </a-modal>
随行图像 随行图像
@ -175,7 +184,7 @@ export default {
upUrl: "", upUrl: "",
checkObj: {}, checkObj: {},
row: 1, row: 1,
pcd:'15555', pcd: "15555",
column: 1, column: 1,
streetName: "", streetName: "",
visible: false, visible: false,
@ -185,8 +194,16 @@ export default {
modelData: {}, modelData: {},
index: 0, index: 0,
imgUrl: "", imgUrl: "",
categorys: ["3","2"], categorys: ["3", "2"],
params: [ params: [
{
label: "上位个数",
key: "wmsCount",
},
{
label: "上位品规",
key: "wmsCategory",
},
{ {
label: "盘点任务号", label: "盘点任务号",
key: "checkNum", key: "checkNum",
@ -244,8 +261,8 @@ export default {
pointCloud, pointCloud,
}, },
methods: { methods: {
handleChangeVlue(value){ handleChangeVlue(value) {
this.checkObj.category = value this.checkObj.category = value;
}, },
get3D() { get3D() {
this.visible = true; this.visible = true;
@ -261,7 +278,6 @@ export default {
}, },
// //
getStockInfo(row, column) { getStockInfo(row, column) {
this.$api.httpApi this.$api.httpApi
.getStockInfo({ .getStockInfo({
data: { data: {
@ -388,7 +404,7 @@ export default {
this.streetName = res.data.streetName; this.streetName = res.data.streetName;
var pic = this.checkObj.checkPic; var pic = this.checkObj.checkPic;
this.checkPics = pic.toString().split(";"); this.checkPics = pic.toString().split(";");
console.log(this.checkPics); console.log(this.checkPics);
this.$forceUpdate(); this.$forceUpdate();
} else { } else {
@ -406,17 +422,17 @@ export default {
/* For demo */ /* For demo */
.carousel-wrapper { .carousel-wrapper {
overflow: hidden; overflow: hidden;
width: 100%; width: 100%;
display: flex; display: flex;
} }
.ant-carousel .slick-list { .ant-carousel .slick-list {
margin: 0 -8px; margin: 0 -8px;
} }
.ant-carousel .slick-slide { .ant-carousel .slick-slide {
padding: 0 8px; padding: 0 8px;
} }
.checkOperation { .checkOperation {
@ -540,6 +556,15 @@ export default {
height: auto; height: auto;
} }
img {
transform: rotate(270deg);
}
.parent {
display: flex;
justify-content: center; /* 水平居中 */
align-items: center; /* 垂直居中 */
}
.carousel-box { .carousel-box {
text-align: center; text-align: center;
background: #364d79; background: #364d79;

@ -1,14 +1,17 @@
<template> <template>
<div class="check-page"> <div class="check-page">
<div class="button-box"> <div class="button-box">
<a-popconfirm <a-popconfirm
title="是否清空全部盘点" title="是否清空全部盘点"
ok-text="是" ok-text="是"
cancel-text="否" cancel-text="否"
@confirm="allStockClear" @confirm="allStockClear"
> >
<a-button type="primary" class="export-all"> <a-button
type="primary"
class="export-all"
>
盘点清空 盘点清空
</a-button> </a-button>
</a-popconfirm> </a-popconfirm>
@ -18,15 +21,26 @@
cancel-text="否" cancel-text="否"
@confirm="allStockCheck" @confirm="allStockCheck"
> >
<a-button type="primary" class="export-all"> <a-button
type="primary"
class="export-all"
>
全部盘点 全部盘点
</a-button> </a-button>
</a-popconfirm> </a-popconfirm>
<a-button type="primary" @click="exportStock" class="export-all"> <a-button
type="primary"
@click="exportStock"
class="export-all"
>
导出巷道盘点数据 导出巷道盘点数据
</a-button> </a-button>
<a-button type="primary" @click="exportAllStock" class="export-all"> <a-button
type="primary"
@click="exportAllStock"
class="export-all"
>
导出全部巷道盘点数据 导出全部巷道盘点数据
</a-button> </a-button>
</div> </div>
@ -61,9 +75,18 @@
style="width: 200px" style="width: 200px"
v-model="select" v-model="select"
> >
<a-select-option v-for="i in data" :key="i.name" :value="i.id"> <a-select-option
v-for="i in data"
:key="i.name"
:value="i.id"
>
{{ i.name }} {{ i.name }}
<a-icon type="exclamation-circle" theme="filled" v-if="i.statusCount> 0" style="color: #f3e73f; text-align: right;"/> <a-icon
type="exclamation-circle"
theme="filled"
v-if="i.statusCount> 0"
style="color: #f3e73f; text-align: right;"
/>
</a-select-option> </a-select-option>
</a-select> </a-select>
</div> </div>
@ -83,7 +106,11 @@
</a-radio-group> </a-radio-group>
</div> </div>
<div class="check-content" v-for="item in data" :key="item.id"> <div
class="check-content"
v-for="item in data"
:key="item.id"
>
<subsection <subsection
v-if="item.id == select" v-if="item.id == select"
:total="{ row: item.leftRow, column: item.leftColumn }" :total="{ row: item.leftRow, column: item.leftColumn }"
@ -109,7 +136,11 @@
</a-radio-group> </a-radio-group>
</div> </div>
<div class="check-content" v-for="item in data" :key="item.name"> <div
class="check-content"
v-for="item in data"
:key="item.name"
>
<subsection <subsection
v-if="item.id == select" v-if="item.id == select"
:total="{ row: item.rightRow, column: item.rightColumn }" :total="{ row: item.rightRow, column: item.rightColumn }"
@ -146,14 +177,13 @@ export default {
select: "", select: "",
streetId: 0, streetId: 0,
streetDetail: {}, streetDetail: {},
streetStockStatusMap:{}, streetStockStatusMap: {},
}; };
}, },
computed: {}, computed: {},
mounted() { mounted() {
this.request(); this.request();
}, },
created() {}, created() {},
activated() { activated() {
@ -169,14 +199,14 @@ export default {
created() { created() {
this.initWebSocket(); this.initWebSocket();
this.timerRequestData = window.setInterval(this.requestData, 10000); this.timerRequestData = window.setInterval(this.requestData, 10000);
//, created beforeDestroy //, created beforeDestroy
this.timer = window.setInterval(() => { this.timer = window.setInterval(() => {
setTimeout(this.pollingFunc(), 0); setTimeout(this.pollingFunc(), 0);
}, 2000); }, 2000);
}, },
beforeDestroy(){ beforeDestroy() {
clearInterval(this.timerRequestData); clearInterval(this.timerRequestData);
}, },
destroyed() { destroyed() {
@ -189,10 +219,27 @@ export default {
.getAllStreet({}) .getAllStreet({})
.then((res) => { .then((res) => {
console.log("update data"); console.log("update data");
console.log(res) console.log(res);
for (let i = 0; i < res.data.length; i++) { for (let i = 0; i < res.data.length; i++) {
this.$set(this.data, i, res.data[i]); this.$set(this.data, i, res.data[i]);
} }
console.log(document.cookie);
if (document.cookie.length > 0) {
console.log(document.cookie);
var c_start = document.cookie.indexOf(c_name + "=");
//document.cookiecookiecookiecookie
if (c_start != -1) {
c_start = c_start + c_name.length + 1;
var c_end = document.cookie.indexOf(";", c_start);
if (c_end == -1) c_end = document.cookie.length;
console.log(
document.cookie.substring(c_start, c_end)
);
this.select = Number(
document.cookie.substring(c_start, c_end)
);
}
}
//this.select = res.data[0].id; //this.select = res.data[0].id;
//this.selectName = res.data[0].name; //this.selectName = res.data[0].name;
//this.$set(this.select,res.data.list[0].id,0) //this.$set(this.select,res.data.list[0].id,0)
@ -205,13 +252,37 @@ export default {
this.$api.httpApi this.$api.httpApi
.getAllStreet({}) .getAllStreet({})
.then((res) => { .then((res) => {
console.log("update data");
console.log(res)
for (let i = 0; i < res.data.length; i++) { for (let i = 0; i < res.data.length; i++) {
console.log(res);
this.$set(this.data, i, res.data[i]); this.$set(this.data, i, res.data[i]);
} }
this.select = res.data[0].id; this.select = res.data[0].id;
this.selectName = res.data[0].name; this.selectName = res.data[0].name;
if (document.cookie.length > 0) {
var c_name = "streetId";
console.log(document.cookie);
var c_start = document.cookie.indexOf(c_name + "=");
//document.cookiecookiecookiecookie
if (c_start != -1) {
c_start = c_start + c_name.length + 1;
var c_end = document.cookie.indexOf(";", c_start);
if (c_end == -1) c_end = document.cookie.length;
console.log(
document.cookie.substring(c_start, c_end)
);
this.select = Number(
document.cookie.substring(c_start, c_end)
);
}
}
for (let i = 0; i < res.data.length; i++) {
if (res.data[i].id == this.select) {
this.selectName = res.data[i].name;
}
}
//this.$set(this.select,res.data.list[0].id,0) //this.$set(this.select,res.data.list[0].id,0)
this.getStreetDetail(this.select); this.getStreetDetail(this.select);
}) })
@ -219,10 +290,28 @@ export default {
}, },
// //
getWsData(e) { getWsData(e) {
console.log(e) console.log(e);
console.log(this.wsData) console.log(this.wsData);
console.log( e.message.streetName + (e.message.fromDirection == 1 ?"左侧":"右侧") + e.message.fromRow +"行" +e.message.fromColumn + "列" + (e.message.separation1 == 2 ?"外侧货架":"内侧货架")+"发生盘点") console.log(
return ( e.message.streetName + (e.message.fromDirection == 1 ?"左侧":"右侧") + e.message.fromRow +"行" +e.message.fromColumn + "列" + (e.message.separation1 == 2 ?"外侧货架":"内侧货架")+"发生盘点") e.message.streetName +
(e.message.fromDirection == 1 ? "左侧" : "右侧") +
e.message.fromRow +
"行" +
e.message.fromColumn +
"列" +
(e.message.separation1 == 2 ? "外侧货架" : "内侧货架") +
"发生盘点"
);
return (
e.message.streetName +
(e.message.fromDirection == 1 ? "左侧" : "右侧") +
e.message.fromRow +
"行" +
e.message.fromColumn +
"列" +
(e.message.separation1 == 2 ? "外侧货架" : "内侧货架") +
"发生盘点"
);
}, },
// //
getStreetDetail(id) { getStreetDetail(id) {
@ -240,6 +329,14 @@ export default {
handleChange(value) { handleChange(value) {
this.select = value; this.select = value;
document.cookie = "streetId=" + value + ";";
for (let i = 0; i < this.data.length; i++) {
if (this.data[i].id == this.select) {
this.selectName = this.data[i].name;
}
}
console.log(document.cookie);
this.getStreetDetail(value); this.getStreetDetail(value);
}, },
@ -282,42 +379,6 @@ export default {
}) })
.catch((err) => {}); .catch((err) => {});
}, },
// initWebSocket() {
// //weosocket
// const wsuri = "ws://127.0.0.1:8099/ws/111";
// this.websock = new WebSocket(wsuri);
// this.websock.onmessage = this.websocketonmessage;
// this.websock.onopen = this.websocketonopen;
// this.websock.onerror = this.websocketonerror;
// this.websock.onclose = this.websocketclose;
// },
// websocketonopen() {
// //send
// this.websocketsend(JSON.stringify(actions));
// },
// websocketonerror() {
// //
// this.initWebSocket();
// },
// websocketonmessage(e) {
// console.log("aaaa");
// var el = JSON.parse(e.data)
// console.log(el.type);
// if (el.type == "InventoryPush") {
// this.wsData.push(el);
// }
// //
// const redata = JSON.parse(e.data);
// },
// websocketsend(Data) {
// //
// this.websock.send(Data);
// },
// websocketclose(e) {
// //
// console.log("", e);
// },
}, },
components: { components: {
Subsection, Subsection,

@ -6,7 +6,7 @@
:form="queryParam" :form="queryParam"
> >
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :span="4"> <a-col :span="3">
<a-form-item label="巷道"> <a-form-item label="巷道">
<a-select <a-select
@change="handleChange" @change="handleChange"
@ -98,6 +98,30 @@
/> />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col
:span="3"
style="text-align: left"
>
<a-form-item label="状态">
<a-select style="width: 100px"
v-model="queryParam.status" allowClear
@change="statusChange"
>
<a-select-option :value=0>
未盘点
</a-select-option>
<a-select-option :value=1>
盘点异常
</a-select-option>
<a-select-option :value=2>
盘点正常
</a-select-option>
<a-select-option :value=3>
人工核对正确
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="4"> <a-col :span="4">
<a-form-item label="时间"> <a-form-item label="时间">
<a-range-picker <a-range-picker
@ -172,13 +196,22 @@
style="width:320px;height:90px;" style="width:320px;height:90px;"
> >
<viewer :images="text.pic"> <viewer :images="text.pics">
<li <li
v-for="item in text.pics" v-for="item in text.pics"
:key="item" :key="item"
style="float:left" style="float:left"
> >
<img style="height:90px" :src="item"> <a-tooltip>
<template slot="title">
{{removeAfterLastChar(item, "/")}}
</template>
<img
style="height:90px"
:src="item"
>
</a-tooltip>
</li> </li>
</viewer> </viewer>
</happy-scroll> </happy-scroll>
@ -290,6 +323,14 @@ export default {
this.queryParam.leftRight = ""; this.queryParam.leftRight = "";
this.queryParam.side = ""; this.queryParam.side = "";
}, },
removeAfterLastChar(str, charToRemove) {
let lastIndex = str.lastIndexOf(charToRemove);
if (lastIndex !== -1) {
return str.substring(0, lastIndex + 1);
} else {
return str; //
}
},
getPics(val) { getPics(val) {
return val.split(";"); return val.split(";");
@ -313,6 +354,25 @@ export default {
this.queryParam.side = ""; this.queryParam.side = "";
} }
}, },
//
statusChange(value) {
if (value == 1) {
//
if (this.streetDetail.leftType == 0) {
this.queryParam.side = "";
} else {
this.queryParam.side = 0;
}
} else if (value == 2) {
if (this.streetDetail.rightType == 0) {
this.queryParam.side = "";
} else {
this.queryParam.side = 0;
}
} else {
this.queryParam.side = "";
}
},
handleSearch() { handleSearch() {
console.log(this.queryParam); console.log(this.queryParam);
this.pageNum = 1; this.pageNum = 1;
@ -400,6 +460,9 @@ export default {
display: flex; display: flex;
width: 100%; width: 100%;
} }
img {
transform: rotate(270deg);
}
.historyImg { .historyImg {
width: 80px; width: 80px;

@ -37,7 +37,9 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="6" style="text-align: right"> <a-col :span="6" style="text-align: right">
<a-button type="primary" @click="handleSearch"></a-button> <a-button type="primary" @click="handleSearch"></a-button>
<a-button style="margin-left: 15px" @click="reset"></a-button> <a-button style="margin-left: 15px" @click="reset"></a-button>
</a-col> </a-col>
</a-row> </a-row>
@ -60,8 +62,9 @@
<span v-if="text.pics" style="height:100%;"> <span v-if="text.pics" style="height:100%;">
<happy-scroll color="rgba(100,100,100,0.5)" size="8" class="scroll-box" style="width:320px;height:90px;"> <happy-scroll color="rgba(100,100,100,0.5)" size="8" class="scroll-box" style="width:320px;height:90px;">
<viewer :images="text.pics"> <viewer :images="text.pics">
<img class="historyImg" v-for="(src,index) in text.pics" :src="imgUrl+src" <img class="historyImg" v-for="(src,index) in text.pics" :src="imgUrl+src"
:key="index"/> :key="index"/>
</viewer> </viewer>
</happy-scroll> </happy-scroll>
</span> </span>

Loading…
Cancel
Save