no message
parent
8c84a72b14
commit
d6584e6c2c
|
|
@ -2410,6 +2410,11 @@
|
|||
"sprintf-js": "~1.0.2"
|
||||
}
|
||||
},
|
||||
"aring-vue-marquee": {
|
||||
"version": "2.0.8",
|
||||
"resolved": "https://registry.npmjs.org/aring-vue-marquee/-/aring-vue-marquee-2.0.8.tgz",
|
||||
"integrity": "sha512-KyxSVfQFqM3l+nBF2lbsupk906kpV1q9hHpq5M1fRxEl4cgq37Khc1ItmByXyvzZMPQiQj5Rql4pGAYSsZGbEw=="
|
||||
},
|
||||
"arr-diff": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz",
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
"dependencies": {
|
||||
"@jiaminghi/data-view": "^2.10.0",
|
||||
"@riophae/vue-treeselect": "^0.4.0",
|
||||
"aring-vue-marquee": "^2.0.8",
|
||||
"axios": "^0.21.1",
|
||||
"clipboard": "2.0.4",
|
||||
"codemirror": "^5.49.2",
|
||||
|
|
|
|||
|
|
@ -80,4 +80,12 @@ export function getItemCode(stockCode) {
|
|||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del,containerIn,containerOut,callStock,getItemCode,lineReturn}
|
||||
export function stockMsg(data) {
|
||||
return request({
|
||||
url: 'api/stock/stockMsg',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del,containerIn,containerOut,callStock,getItemCode,lineReturn,stockMsg}
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 6.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 5.2 KiB |
23
src/main.js
23
src/main.js
|
|
@ -1,7 +1,7 @@
|
|||
import Vue from 'vue'
|
||||
import Cookies from 'js-cookie'
|
||||
import 'normalize.css/normalize.css'
|
||||
import Element, { Table, TableColumn } from 'element-ui'
|
||||
import Element, {Table, TableColumn} from 'element-ui'
|
||||
import elementTableTooltip from 'vue-element-table-tooltip';
|
||||
// 数据字典
|
||||
import dict from './components/Dict'
|
||||
|
|
@ -21,16 +21,17 @@ import './assets/icons' // icon
|
|||
import './router/index' // permission control
|
||||
|
||||
|
||||
|
||||
const TableProps = Element.Table.props
|
||||
const TableColumnProps = Element.TableColumn.props
|
||||
TableProps.border = { type: Boolean, default: true } // 边框
|
||||
TableProps.align = { type: String, default: 'center' } // 居中
|
||||
TableProps.stripe = { type: Boolean, default: true } // 斑马纹
|
||||
TableColumnProps.showOverflowTooltip = { type: Boolean, default: true } // 文本溢出
|
||||
TableProps.border = {type: Boolean, default: true} // 边框
|
||||
TableProps.align = {type: String, default: 'center'} // 居中
|
||||
TableProps.stripe = {type: Boolean, default: true} // 斑马纹
|
||||
TableColumnProps.showOverflowTooltip = {type: Boolean, default: true} // 文本溢出
|
||||
Vue.use(Table)
|
||||
Vue.use(TableColumn)
|
||||
Vue.use(elementTableTooltip, {
|
||||
theme: "dark", // dark | light
|
||||
theme: "dark", // dark | light
|
||||
});
|
||||
|
||||
|
||||
|
|
@ -39,14 +40,14 @@ Vue.use(permission)
|
|||
Vue.use(dict)
|
||||
Vue.use(dataV)
|
||||
Vue.use(Element, {
|
||||
size: Cookies.get('size') || 'small' // set element-ui default size
|
||||
size: Cookies.get('size') || 'small' // set element-ui default size
|
||||
})
|
||||
|
||||
Vue.config.productionTip = false
|
||||
|
||||
new Vue({
|
||||
el: '#app',
|
||||
router,
|
||||
store,
|
||||
render: h => h(App)
|
||||
el: '#app',
|
||||
router,
|
||||
store,
|
||||
render: h => h(App)
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
|
|
@ -10,37 +11,37 @@
|
|||
|
||||
<label class="el-form-item-label">状态</label>
|
||||
<el-select
|
||||
v-model="query.status"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="状态"
|
||||
class="filter-item"
|
||||
style="width: 130px"
|
||||
@change="crud.toQuery"
|
||||
v-model="query.status"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="状态"
|
||||
class="filter-item"
|
||||
style="width: 130px"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.use_status"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
v-for="item in dict.use_status"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
|
||||
<label class="el-form-item-label">容器类型</label>
|
||||
<el-select
|
||||
v-model="query.stockType"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="容器类型"
|
||||
class="filter-item"
|
||||
style="width: 130px"
|
||||
@change="crud.toQuery"
|
||||
v-model="query.stockType"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="容器类型"
|
||||
class="filter-item"
|
||||
style="width: 130px"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.stock_type"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
v-for="item in dict.stock_type"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
|
||||
|
|
@ -48,10 +49,10 @@
|
|||
<el-select v-model="query.areaName" style="width: 130px;" clearable placeholder="库区"
|
||||
@keyup.enter.native="crud.toQuery" class="filter-item" @change="crud.toQuery">
|
||||
<el-option
|
||||
v-for="area in areas"
|
||||
:key="area.id"
|
||||
:label="area.name"
|
||||
:value="area.name"
|
||||
v-for="area in areas"
|
||||
:key="area.id"
|
||||
:label="area.name"
|
||||
:value="area.name"
|
||||
/>
|
||||
</el-select>
|
||||
|
||||
|
|
@ -65,19 +66,24 @@
|
|||
<crudOperation :permission="permission" :tableKey="this.$options.name">
|
||||
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
slot='right'
|
||||
style="float: right;padding-left: 5px"
|
||||
:headers="headers"
|
||||
:action="baseApi+'/api/stock/import_stock'"
|
||||
:file-list="fileList"
|
||||
:on-error="handleErr"
|
||||
:on-success=" (response, file, fileList) => { return handleSuccess(response, file, fileList,crud);}"
|
||||
:show-file-list="true">
|
||||
class="upload-demo"
|
||||
slot='right'
|
||||
style="float: right;padding-left: 5px"
|
||||
:headers="headers"
|
||||
:action="baseApi+'/api/stock/import_stock'"
|
||||
:file-list="fileList"
|
||||
:on-error="handleErr"
|
||||
:on-success=" (response, file, fileList) => { return handleSuccess(response, file, fileList,crud);}"
|
||||
:show-file-list="true">
|
||||
<el-button size="mini" type="success" icon="el-icon-upload2">导入</el-button>
|
||||
</el-upload>
|
||||
|
||||
</crudOperation>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--表单组件-->
|
||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0"
|
||||
:title="crud.status.title" width="350px">
|
||||
|
|
@ -91,28 +97,28 @@
|
|||
<el-form-item label="类型" prop="stockType">
|
||||
<el-select v-model="form.stockType" value-key="id" filterable placeholder="请选择" style="width: 180px;">
|
||||
<el-option
|
||||
v-for="item in dict.stock_type"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
v-for="item in dict.stock_type"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="状态">
|
||||
<el-select
|
||||
v-model="form.status"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="状态"
|
||||
class="filter-item"
|
||||
style="width: 180px"
|
||||
v-model="form.status"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="状态"
|
||||
class="filter-item"
|
||||
style="width: 180px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.use_status"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
v-for="item in dict.use_status"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
|
@ -121,12 +127,12 @@
|
|||
<el-select v-model="form.point" @focus="findByPoint" clearable value-key="id" filterable style="width:180px"
|
||||
placeholder="请选择点位">
|
||||
<el-option
|
||||
v-for="point in pointList"
|
||||
:key="point.id"
|
||||
:label="point.code"
|
||||
:value="point">
|
||||
v-for="point in pointList"
|
||||
:key="point.id"
|
||||
:label="point.code"
|
||||
:value="point">
|
||||
<span style="float: left">{{ point.area.name }}</span>
|
||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ point.code}}</span>
|
||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ point.code }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
|
@ -166,10 +172,10 @@
|
|||
<el-table-column label="启用" align="center" prop="enabled">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.enabled"
|
||||
active-color="#409EFF"
|
||||
inactive-color="#F56C6C"
|
||||
@change="changeEnabled(scope.row, scope.row.enabled)"
|
||||
v-model="scope.row.enabled"
|
||||
active-color="#409EFF"
|
||||
inactive-color="#F56C6C"
|
||||
@change="changeEnabled(scope.row, scope.row.enabled)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -206,6 +212,8 @@
|
|||
<pagination/>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
@ -386,7 +394,7 @@ export default {
|
|||
toReturnEntity(data) {
|
||||
this.$refs.returnContainer.dialog = true
|
||||
this.$refs.returnContainer.returnEntityClick(data)
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,13 +1,32 @@
|
|||
<template>
|
||||
<div id="div1" style="height: 700px;width: 100%">
|
||||
<dv-border-box-11 title="库位信息化看板" style="background-color: black;width: 100%">
|
||||
<div class="div2">当前时间: {{ currentTime }} 周{{ dayOfWeek }}
|
||||
<div class="div2">
|
||||
当前时间: {{ currentTime }} 周{{ dayOfWeek }}
|
||||
|
||||
</div>
|
||||
<!-- <div id="container"></div>-->
|
||||
<div id="threeDEarth" ></div>
|
||||
<dv-border-box-8 class="grid-container" :reverse="true">
|
||||
|
||||
<!-- <div id="container"></div>-->
|
||||
<div id="threeDEarth"></div>
|
||||
<dv-border-box-8 class="grid-container" :reverse="true">
|
||||
<div style="display: flex; align-items: center;">
|
||||
|
||||
|
||||
<img :src="imageUrl" style="weight: 16px;height: 16px;" alt="Logo" v-if="msg">
|
||||
<div style="flex-grow: 1; overflow: hidden;">
|
||||
<vue-marquee
|
||||
:speed="10"
|
||||
:delayTime="500"
|
||||
:mouseover="true"
|
||||
color="white"
|
||||
direction="left"
|
||||
>
|
||||
|
||||
<span style="font-size: 18px;font-weight: bold">{{ msg }}</span>
|
||||
</vue-marquee>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<dv-border-box-10 class="box10" v-for="(div, index) in divs" :key="index">
|
||||
<el-tooltip placement="top" class="item" effect="dark">
|
||||
<div slot="content">
|
||||
|
|
@ -37,8 +56,8 @@
|
|||
</div>
|
||||
|
||||
<dv-scroll-board
|
||||
:config="this.config2"
|
||||
style="width: 365px; height: 280px;margin-left:10px;"/>
|
||||
:config="this.config2"
|
||||
style="width: 365px; height: 280px;margin-left:10px;"/>
|
||||
</dv-border-box-8>
|
||||
|
||||
</div>
|
||||
|
|
@ -51,12 +70,12 @@
|
|||
|
||||
<div class="div5">
|
||||
<el-pagination
|
||||
background
|
||||
layout="prev, pager, next"
|
||||
@current-change="handleCurrentClick"
|
||||
:current-page="currentPage"
|
||||
:page-size="pageSize"
|
||||
:total="total">
|
||||
background
|
||||
layout="prev, pager, next"
|
||||
@current-change="handleCurrentClick"
|
||||
:current-page="currentPage"
|
||||
:page-size="pageSize"
|
||||
:total="total">
|
||||
</el-pagination>
|
||||
</div>
|
||||
</dv-border-box-11>
|
||||
|
|
@ -71,10 +90,18 @@ import crudPoint from "@/api/point";
|
|||
import crudAgvTask from "@/api/agvTask"
|
||||
import CRUD from "@crud/crud";
|
||||
import 'echarts-gl';
|
||||
import VueMarquee from 'aring-vue-marquee';
|
||||
import stockUrl from "@/api/stock";
|
||||
|
||||
export default {
|
||||
name: 'DeptData',
|
||||
components: {
|
||||
VueMarquee
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
msg: '',
|
||||
imageUrl: require("@/assets/images/igw-l-news-noticewhite.png"),
|
||||
total: 0,
|
||||
pageSize: 25,
|
||||
currentPage: 1,
|
||||
|
|
@ -138,7 +165,8 @@ export default {
|
|||
this.queryAgvTaskInfo();//AGV任务列表
|
||||
this.queryListInfo(this.currentPage, this.pageSize)//库位图
|
||||
this.intervalId = setInterval(this.printNextItem, 5000);//定时分页调用
|
||||
|
||||
this.stockMsg();
|
||||
this.initWebSocket();
|
||||
},
|
||||
methods: {
|
||||
updateTime() {
|
||||
|
|
@ -252,6 +280,38 @@ export default {
|
|||
clearInterval(this.intervalId);
|
||||
this.intervalId = null;
|
||||
}
|
||||
},
|
||||
initWebSocket() {
|
||||
const wsUri = (process.env.VUE_APP_WS_API === '/' ? '/' : (process.env.VUE_APP_WS_API + '/')) + 'webSocket/stock'
|
||||
this.websock = new WebSocket(wsUri)
|
||||
this.websock.onerror = this.webSocketOnError
|
||||
this.websock.onmessage = this.webSocketOnMessage
|
||||
},
|
||||
webSocketOnError(e) {
|
||||
this.$notify({
|
||||
title: 'WebSocket连接发生错误',
|
||||
type: 'error',
|
||||
duration: 0
|
||||
})
|
||||
}, webSocketOnMessage(e) {
|
||||
const data = JSON.parse(e.data)
|
||||
if (data.msgType === 'INFO') {
|
||||
this.msg = data.msg
|
||||
} else if (data.msgType === 'ERROR') {
|
||||
this.$notify({
|
||||
title: '',
|
||||
message: data.msg,
|
||||
dangerouslyUseHTMLString: true,
|
||||
type: 'error',
|
||||
duration: 0
|
||||
})
|
||||
}
|
||||
},
|
||||
webSocketSend(agentData) {
|
||||
this.websock.send(agentData)
|
||||
},
|
||||
stockMsg() {
|
||||
stockUrl.stockMsg()
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -293,6 +353,7 @@ export default {
|
|||
top: 640px;
|
||||
left: 30%;
|
||||
}
|
||||
|
||||
#container {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
|
|
@ -304,15 +365,19 @@ export default {
|
|||
top: 34px;
|
||||
}
|
||||
|
||||
.marquee-item {
|
||||
margin-right: 50px;
|
||||
}
|
||||
|
||||
#threeDEarth {
|
||||
/* width: 30px;
|
||||
height: 30px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
left: 79%;
|
||||
top: 34px;
|
||||
border: 1px solid red;*/
|
||||
/* width: 30px;
|
||||
height: 30px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
left: 79%;
|
||||
top: 34px;
|
||||
border: 1px solid red;*/
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
<Search/>
|
||||
<crudOperation>
|
||||
<el-button
|
||||
v-if="false"
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="danger"
|
||||
|
|
|
|||
Loading…
Reference in New Issue