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