代码提交
This commit is contained in:
commit
5939cf1dd3
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,15 +1,27 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en-us">
|
<html lang="en-us">
|
||||||
<head>
|
|
||||||
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
<title>Unity WebGL Player | ElectricPowerStorage_Digital Twin</title>
|
<title>Unity WebGL Player | ElectricPowerStorage_Digital Twin</title>
|
||||||
<link rel="shortcut icon" href="TemplateData/favicon.ico">
|
<link rel="shortcut icon" href="TemplateData/favicon.ico">
|
||||||
<link rel="stylesheet" href="TemplateData/style.css">
|
<link rel="stylesheet" href="TemplateData/style.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<style>
|
||||||
<div id="unity-container" class="unity-desktop">
|
body,
|
||||||
<canvas id="unity-canvas" width=960 height=600></canvas>
|
html {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div id="unity-container" style="width: 100%;height:100%" class="unity-desktop">
|
||||||
|
<canvas id="unity-canvas" style="width: 100%;height:100%"></canvas>
|
||||||
<div id="unity-loading-bar">
|
<div id="unity-loading-bar">
|
||||||
<div id="unity-logo"></div>
|
<div id="unity-logo"></div>
|
||||||
<div id="unity-progress-bar-empty">
|
<div id="unity-progress-bar-empty">
|
||||||
|
@ -47,7 +59,7 @@
|
||||||
if (type == 'error') div.style = 'background: red; padding: 10px;';
|
if (type == 'error') div.style = 'background: red; padding: 10px;';
|
||||||
else {
|
else {
|
||||||
if (type == 'warning') div.style = 'background: yellow; padding: 10px;';
|
if (type == 'warning') div.style = 'background: yellow; padding: 10px;';
|
||||||
setTimeout(function() {
|
setTimeout(function () {
|
||||||
warningBanner.removeChild(div);
|
warningBanner.removeChild(div);
|
||||||
updateBannerVisibility();
|
updateBannerVisibility();
|
||||||
}, 5000);
|
}, 5000);
|
||||||
|
@ -95,19 +107,21 @@
|
||||||
} else {
|
} else {
|
||||||
// Desktop style: Render the game canvas in a window that can be maximized to fullscreen:
|
// Desktop style: Render the game canvas in a window that can be maximized to fullscreen:
|
||||||
|
|
||||||
canvas.style.width = "960px";
|
// canvas.style.width = "960px";
|
||||||
canvas.style.height = "600px";
|
// canvas.style.height = "600px";
|
||||||
}
|
}
|
||||||
|
|
||||||
loadingBar.style.display = "block";
|
loadingBar.style.display = "block";
|
||||||
|
|
||||||
var script = document.createElement("script");
|
var script = document.createElement("script");
|
||||||
|
var unityInstanceA
|
||||||
script.src = loaderUrl;
|
script.src = loaderUrl;
|
||||||
script.onload = () => {
|
script.onload = () => {
|
||||||
createUnityInstance(canvas, config, (progress) => {
|
createUnityInstance(canvas, config, (progress) => {
|
||||||
progressBarFull.style.width = 100 * progress + "%";
|
progressBarFull.style.width = 100 * progress + "%";
|
||||||
}).then((unityInstance) => {
|
}).then((unityInstance) => {
|
||||||
loadingBar.style.display = "none";
|
loadingBar.style.display = "none";
|
||||||
|
unityInstanceA = unityInstance
|
||||||
fullscreenButton.onclick = () => {
|
fullscreenButton.onclick = () => {
|
||||||
unityInstance.SetFullscreen(1);
|
unityInstance.SetFullscreen(1);
|
||||||
};
|
};
|
||||||
|
@ -116,6 +130,37 @@
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
document.body.appendChild(script);
|
document.body.appendChild(script);
|
||||||
|
function shelvesList(val) {
|
||||||
|
console.log(val,'unity');
|
||||||
|
// unityInstanceA.Unity_ShelvesList(val)
|
||||||
|
unityInstanceA.SendMessage("Manager", "Unity_ShelvesList", val);
|
||||||
|
}
|
||||||
|
// 视角切换
|
||||||
|
function updateScene(val) {
|
||||||
|
// console.log(val,'unity');
|
||||||
|
unityInstanceA.SendMessage("Manager", "Unity_ViewportChange", val + '');
|
||||||
|
}
|
||||||
|
// 库房的定位
|
||||||
|
function selectHome(val) {
|
||||||
|
console.log(val,'库房的定位');
|
||||||
|
unityInstanceA.SendMessage("Manager", "Unity_WarehouseList", val);
|
||||||
|
}
|
||||||
|
// 库外的按钮
|
||||||
|
function outHome() {
|
||||||
|
// console.log(5);
|
||||||
|
unityInstanceA.SendMessage("Manager", "Unity_OutWarehouse", '');
|
||||||
|
}
|
||||||
|
// 转运
|
||||||
|
function transport(val) {
|
||||||
|
// console.log('转运',val);
|
||||||
|
unityInstanceA.SendMessage("Manager", "Unity_Transport", val + '');
|
||||||
|
}
|
||||||
|
// 显隐
|
||||||
|
function hide(val) {
|
||||||
|
// console.log('显隐',val);
|
||||||
|
unityInstanceA.SendMessage("Manager", "Unity_Transparence", val + '');
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
17
src/App.vue
17
src/App.vue
|
@ -25,15 +25,16 @@
|
||||||
<span class="downPull"><img :src="i == index ? s.selectImg : s.img" alt="" /></span>
|
<span class="downPull"><img :src="i == index ? s.selectImg : s.img" alt="" /></span>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<ul class="menuContent">
|
<ul class="menuContent">
|
||||||
<li v-for="(num, index) in 15" :key="index" @click="shelfHanlder($event)">LD1_B01-{{ num < 10 ? "0" + num
|
<!-- <li v-for="(num, index) in 15" :key="index" @click="shelfHanlder($event)">LD1_B01-{{ num < 10 ? "0" + num
|
||||||
: num }}</li>
|
: num }}</li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="menuContent">
|
<ul class="menuContent">
|
||||||
<li v-for="(num, index) in 9" :key="index + 1" @click="shelfHanlder($event)">LD1_C01-{{ num < 10 ? "0" +
|
<li v-for="(num, index) in 9" :key="index + 1" @click="shelfHanlder($event)">LD1_C01-{{ num < 10 ? "0" +
|
||||||
num : num }}</li>
|
num : num }}</li> -->
|
||||||
<!-- <li @click="shelfHanlder($event)">LD1_B01-01</li> -->
|
<!-- <li @click="shelfHanlder($event)">LD1_B01-01</li> -->
|
||||||
<li @click="shelfHanlder($event)">LD1_C02-01</li>
|
<!-- <li @click="shelfHanlder($event)">LD1_C02-01</li> -->
|
||||||
<li @click="shelfHanlder($event)">LD1_C03-01</li>
|
<li v-for="(num, index) in 6" :key="index" @click="shelfHanlder($event)">FF1_C01-{{ num < 10 ? "0" + num :
|
||||||
|
num }}</li>
|
||||||
</ul>
|
</ul>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
|
@ -42,10 +43,14 @@
|
||||||
<span class="downPull"><img :src="i == index ? s.selectImg : s.img" alt="" /></span>
|
<span class="downPull"><img :src="i == index ? s.selectImg : s.img" alt="" /></span>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<ul class="menuContent">
|
<ul class="menuContent">
|
||||||
|
<!-- <li @click="selectHomeN($event)">B01</li>
|
||||||
|
<li @click="selectHomeN($event)">C01</li>
|
||||||
|
<li @click="selectHomeN($event)">C02</li> -->
|
||||||
|
<li @click="selectHomeN($event)">A01</li>
|
||||||
<li @click="selectHomeN($event)">B01</li>
|
<li @click="selectHomeN($event)">B01</li>
|
||||||
<li @click="selectHomeN($event)">C01</li>
|
<li @click="selectHomeN($event)">C01</li>
|
||||||
<li @click="selectHomeN($event)">C02</li>
|
<li @click="selectHomeN($event)">D01</li>
|
||||||
<li @click="selectHomeN($event)">C03</li>
|
<li @click="selectHomeN($event)">E01</li>
|
||||||
</ul>
|
</ul>
|
||||||
<!-- <el-dropdown-item @click="selectHomeN($event)">B01</el-dropdown-item>
|
<!-- <el-dropdown-item @click="selectHomeN($event)">B01</el-dropdown-item>
|
||||||
<el-dropdown-item @click="selectHomeN($event)">C01</el-dropdown-item>
|
<el-dropdown-item @click="selectHomeN($event)">C01</el-dropdown-item>
|
||||||
|
|
|
@ -19,41 +19,41 @@ export const byPosition = (params) => {
|
||||||
}
|
}
|
||||||
// 获取物料和批次
|
// 获取物料和批次
|
||||||
export const byBatchAndMateri = (params) => {
|
export const byBatchAndMateri = (params) => {
|
||||||
axios.get('api/visualStorage/getVisualStorageListByBatchAndMateri', {
|
return axios.get('api/visualStorage/getVisualStorageListByBatchAndMateriel', {
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 仓库使用率
|
// 仓库使用率
|
||||||
export const getWarehouseUsages = (params) => {
|
export const getWarehouseUsages = (params) => {
|
||||||
axios.get('api/visualStorage/getWarehouseUsages', {
|
return axios.get('api/visualStorage/getWarehouseUsages', {
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 每月的周转率
|
// 每月的周转率
|
||||||
export const getTurnoverRate = (params) => {
|
export const getTurnoverRate = (params) => {
|
||||||
axios.get('api/visualStorage/getTurnoverRateList', {
|
return axios.get('api/visualStorage/getTurnoverRateList', {
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 当月出入库金额
|
// 当月出入库金额
|
||||||
export const getChangeAmount = (params) => {
|
export const getChangeAmount = (params) => {
|
||||||
axios.get('api/visualStorage/getChangeAmount', {
|
return axios.get('api/visualStorage/getChangeAmount', {
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 积压物质
|
// 积压物质
|
||||||
export const getBacklogMaterialInfo = (params) => {
|
export const getBacklogMaterialInfo = (params) => {
|
||||||
axios.get('api/visualStorage/getBacklogMaterialInfo', {
|
return axios.get('api/visualStorage/getBacklogMaterialInfo', {
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 库龄结构
|
// 库龄结构
|
||||||
export const getInventoryAgeInfo = (params) => {
|
export const getInventoryAgeInfo = (params) => {
|
||||||
axios.get('api/visualStorage/getInventoryAgeInfo', {
|
return axios.get('api/visualStorage/getInventoryAgeInfo', {
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -61,14 +61,14 @@ export const getInventoryAgeInfo = (params) => {
|
||||||
// 库存构成
|
// 库存构成
|
||||||
|
|
||||||
export const getStore = (params) => {
|
export const getStore = (params) => {
|
||||||
axios.get('api/visualStorage/getInventoryConstitute', {
|
return axios.get('api/visualStorage/getInventoryConstitute', {
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 库容预测
|
// 库容预测
|
||||||
export const getMaterialDataList = (params) => {
|
export const getMaterialDataList = (params) => {
|
||||||
axios.get('api/visualStorage/getMaterialDataList', {
|
return axios.get('api/visualStorage/getMaterialDataList', {
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
Binary file not shown.
After Width: | Height: | Size: 4.0 KiB |
|
@ -8,7 +8,7 @@
|
||||||
<!-- 每月周转率 -->
|
<!-- 每月周转率 -->
|
||||||
<div class="monthlyTurnover">
|
<div class="monthlyTurnover">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
每日周转率
|
每月周转率
|
||||||
</div>
|
</div>
|
||||||
<div class="turnoverChart" ref="turnoverChart">
|
<div class="turnoverChart" ref="turnoverChart">
|
||||||
|
|
||||||
|
@ -36,6 +36,7 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import { getWarehouseUsages, getTurnoverRate, getBacklogMaterialInfo } from '@/api/index'
|
||||||
export default {
|
export default {
|
||||||
name: '',
|
name: '',
|
||||||
data() {
|
data() {
|
||||||
|
@ -44,20 +45,45 @@ export default {
|
||||||
myChart2: '',//每月周转率echarts
|
myChart2: '',//每月周转率echarts
|
||||||
myChart3: '',//当月出库金额echarts
|
myChart3: '',//当月出库金额echarts
|
||||||
myChart4: '',//积压物资
|
myChart4: '',//积压物资
|
||||||
|
|
||||||
|
storeData: {
|
||||||
|
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
||||||
|
|
||||||
|
this.drawOutbound()
|
||||||
this.drawStore()
|
this.drawStore()
|
||||||
this.drawTurnoverChart()
|
this.drawTurnoverChart()
|
||||||
this.drawOutbound()
|
|
||||||
this.drawOverStock()
|
this.drawOverStock()
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
// 仓库的使用率
|
||||||
|
// getWarehouseUsages({wareHouseCode:'HA1'}).then(res=>{
|
||||||
|
// console.log(res,'仓库使用率');
|
||||||
|
// this.storeData = res.data.data
|
||||||
|
// this.drawStore(this.storeData)
|
||||||
|
// // console.log(this.storeData,'......');
|
||||||
|
// })
|
||||||
|
// getTurnoverRate({wareHouseCode:'HA1'}).then(res=>{
|
||||||
|
// console.log(res,'每月的周转率');
|
||||||
|
// this.drawTurnoverChart(res.data.data.rateList)
|
||||||
|
// })
|
||||||
|
// getBacklogMaterialInfo({wareHouseCode:'HA1'}).then(res=>{
|
||||||
|
// console.log(res,'积压物资');
|
||||||
|
// this.drawOverStock(res.data.data)
|
||||||
|
// })
|
||||||
|
// },
|
||||||
|
// 积压物资
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 仓库使用率的ecahrt图
|
// 仓库使用率的ecahrt图
|
||||||
drawStore() {
|
drawStore(storeData) {
|
||||||
this.storemyChart = this.$echarts.init(this.$refs.storeUse)
|
this.storemyChart = this.$echarts.init(this.$refs.storeUse)
|
||||||
const chartData = [
|
const chartData = [
|
||||||
{
|
{
|
||||||
|
@ -70,6 +96,11 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
];
|
];
|
||||||
|
if (storeData) {
|
||||||
|
chartData[0].value = storeData.usage
|
||||||
|
chartData[1].value = storeData.idleRate
|
||||||
|
}
|
||||||
|
|
||||||
const colorList = ['#f49a58', '#4351fd'];
|
const colorList = ['#f49a58', '#4351fd'];
|
||||||
const pieData1 = [];
|
const pieData1 = [];
|
||||||
// const pieData2 = [];
|
// const pieData2 = [];
|
||||||
|
@ -140,7 +171,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
formatter:
|
formatter:
|
||||||
`{aa| ` + chartData[i].name + ` }{val| ` + parseInt(chartData[i].value / total * 100) + `% }`, // 也可以是个函数return
|
`{aa| ` + chartData[i].name + ` }{val| ` + chartData[i].value + `% }`, // 也可以是个函数return
|
||||||
x: "left",
|
x: "left",
|
||||||
textStyle: {
|
textStyle: {
|
||||||
// color: "#BAFF7F",
|
// color: "#BAFF7F",
|
||||||
|
@ -245,13 +276,23 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 每日周转率
|
// 每日周转率
|
||||||
drawTurnoverChart() {
|
drawTurnoverChart(turnoverList) {
|
||||||
this.myChart2 = this.$echarts.init(this.$refs.turnoverChart)
|
this.myChart2 = this.$echarts.init(this.$refs.turnoverChart)
|
||||||
var xDataArr = ['1月', '2月', '3月', '4月', '5月', '6月']
|
var xDataArr = ['1月', '2月', '3月', '4月', '5月', '6月']
|
||||||
var yDataArr = [0, 182, 191, 150, 0, 0, 0]
|
var yDataArr = [0, 182, 191, 150, 0, 0, 0]
|
||||||
|
if (turnoverList) {
|
||||||
|
xDataArr = turnoverList.map(ele => {
|
||||||
|
return ele.month + '月'
|
||||||
|
})
|
||||||
|
yDataArr = turnoverList.map(ele => {
|
||||||
|
return ele.rate
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
var colors = ['#4587E7', '#55c3f6', '#4351fd', '#f49a58', '#da70d6', '#32cd32'];
|
var colors = ['#4587E7', '#55c3f6', '#4351fd', '#f49a58', '#da70d6', '#32cd32'];
|
||||||
let option = {
|
let option = {
|
||||||
|
tooltip: {},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
boundaryGap: true,
|
boundaryGap: true,
|
||||||
type: 'category',
|
type: 'category',
|
||||||
|
@ -301,7 +342,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
name: '星期',
|
name: '周转率',
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
barWidth: 20,
|
barWidth: 20,
|
||||||
data: yDataArr
|
data: yDataArr
|
||||||
|
@ -444,7 +485,7 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 积压物质
|
// 积压物质
|
||||||
drawOverStock() {
|
drawOverStock(overData) {
|
||||||
this.myChart4 = this.$echarts.init(this.$refs.oveChart)
|
this.myChart4 = this.$echarts.init(this.$refs.oveChart)
|
||||||
var data = [
|
var data = [
|
||||||
{
|
{
|
||||||
|
@ -457,6 +498,11 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
];
|
];
|
||||||
|
if (overData) {
|
||||||
|
data[0].value = overData.backlogAmount
|
||||||
|
data[1].value = overData.noBacklogAmount
|
||||||
|
}
|
||||||
|
|
||||||
var total = data.reduce((pre, cur) => {
|
var total = data.reduce((pre, cur) => {
|
||||||
console.log(pre, cur.value, '数据');
|
console.log(pre, cur.value, '数据');
|
||||||
return pre.value + cur.value
|
return pre.value + cur.value
|
||||||
|
@ -487,7 +533,7 @@ export default {
|
||||||
color: colors[index],
|
color: colors[index],
|
||||||
},
|
},
|
||||||
formatter:
|
formatter:
|
||||||
`{aa|20000万}\n{bb|总物资}`, // 也可以是个函数return
|
overData?`{aa|${overData.amount}万}\n{bb|总物资}`:`{aa|5241万}\n{bb|总物资}`, // 也可以是个函数return
|
||||||
x: "left",
|
x: "left",
|
||||||
textStyle: {
|
textStyle: {
|
||||||
// color: "#BAFF7F",
|
// color: "#BAFF7F",
|
||||||
|
@ -516,7 +562,7 @@ export default {
|
||||||
color: colors[index],
|
color: colors[index],
|
||||||
},
|
},
|
||||||
formatter:
|
formatter:
|
||||||
`{aa|${(item.value / 100 * 100).toFixed(2)}% }\n{bb| ${item.name}占比}`, // 也可以是个函数return
|
overData?`{aa|${overData.noBacklogRate}% }\n{bb| ${item.name}占比}`:`{aa|${60}% }\n{bb| ${item.name}占比}`, // 也可以是个函数return
|
||||||
x: "left",
|
x: "left",
|
||||||
textStyle: {
|
textStyle: {
|
||||||
// color: "#BAFF7F",
|
// color: "#BAFF7F",
|
||||||
|
|
|
@ -16,9 +16,10 @@
|
||||||
</div>
|
</div>
|
||||||
<ul class="ul">
|
<ul class="ul">
|
||||||
<li v-for="(s, i) in ulList" class="stockLi" :key="i">
|
<li v-for="(s, i) in ulList" class="stockLi" :key="i">
|
||||||
<img :src="s.pic" alt="">
|
<img :src="pics[i]" alt="">
|
||||||
<span class="liName">{{ s.name }}:</span>
|
<span class="liName">{{ s.name }}:</span>
|
||||||
<span class="liNum" :class="'num' + i">{{ s.num }} <span style="font-size: 13px;">万元</span></span>
|
<span class="liNum" :class="'num' + i">{{ s.value }} <span
|
||||||
|
style="font-size: 13px;">{{ s.unit == true ? s.unit : '万元' }}</span></span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -51,27 +52,41 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import { getStore } from "@/api/index"
|
||||||
export default {
|
export default {
|
||||||
name: 'Stock',
|
name: 'Stock',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
ulList: [
|
ulList: [
|
||||||
{ name: '非限制', pic: require('@/assets/images/upstock.png'), num: '26285.91' },
|
{ name: '非限制', value: '26285.91' },
|
||||||
{ name: '质检', pic: require('@/assets/images/testing.png'), num: '1338.31' },
|
{ name: '质检', value: '1338.31' },
|
||||||
{ name: '冻结', pic: require('@/assets/images/freeze.png'), num: '2066.08' },
|
{ name: '冻结', value: '2066.08' },
|
||||||
],
|
],
|
||||||
|
pics: [require('@/assets/images/upstock.png'), require('@/assets/images/testing.png'), require('@/assets/images/freeze.png')],
|
||||||
inputVal: '',
|
inputVal: '',
|
||||||
ISRList: [
|
ISRList: [
|
||||||
{ productMsg: '镇江扬中国电电力线缆', address: 'B01-050103', num: '26823' },
|
{ productMsg: '镇江扬中国电电力线缆', address: 'B01-050103', num: '26823' },
|
||||||
{ productMsg: '镇江扬中国电电力线缆', address: 'B01-050104', num: '17895' },
|
{ productMsg: '镇江扬中国电电力线缆', address: 'B01-050104', num: '17895' },
|
||||||
],
|
],
|
||||||
textarea:''
|
textarea: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// 当月出库率
|
// 当月出库率
|
||||||
this.drawOutboundStock()
|
this.drawOutboundStock()
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
// 库存结构
|
||||||
|
|
||||||
|
// getStore({wareHouseCode:'HA1'}).then(res=>{
|
||||||
|
// // console.log(res,'库存结构');
|
||||||
|
// if(res.data.code==200){
|
||||||
|
// // console.log(res.data.data,'kulin');
|
||||||
|
// this.ulList = res.data.data.infoList
|
||||||
|
// // console.log(this.ulList);
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@ -289,15 +304,18 @@ export default {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-evenly;
|
justify-content: space-evenly;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
p>span:nth-child(1){
|
|
||||||
|
p>span:nth-child(1) {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 5em;
|
width: 5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.address,.num{
|
.address,
|
||||||
|
.num {
|
||||||
font-family: quare;
|
font-family: quare;
|
||||||
color: #4c59fd;
|
color: #4c59fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
.p1 {
|
.p1 {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
|
|
|
@ -1,19 +1,23 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="aside">
|
<div class="aside" @click="stopHandle()">
|
||||||
<div class="aside-box">
|
<div class="aside-box">
|
||||||
<div class="left-item">
|
<div class="left-item">
|
||||||
<div class="logo">
|
<div class="logo">
|
||||||
<img src="@/assets/images/logo.png" alt="">
|
<img src="@/assets/images/logo.png" alt="" />
|
||||||
</div>
|
</div>
|
||||||
<!-- 右边小图标样式 -->
|
<!-- 右边小图标样式 -->
|
||||||
<ul class="icons">
|
<ul class="icons">
|
||||||
<li class="icon-item" ref="iconItem" v-for="(s, i) in asideList" data-num="0" :key="i"
|
<li
|
||||||
@click="updateImg(i, $event)">
|
class="icon-item"
|
||||||
<img :src="i == index ? s.select : s.pic" alt="">
|
ref="iconItem"
|
||||||
|
v-for="(s, i) in asideList"
|
||||||
|
data-num="0"
|
||||||
|
:key="i"
|
||||||
|
@click="updateImg(i, $event)"
|
||||||
|
>
|
||||||
|
<img :src="i == index ? s.select : s.pic" alt="" />
|
||||||
<span :style="i == index ? 'color:#2620b1' : ''">{{ s.name }}</span>
|
<span :style="i == index ? 'color:#2620b1' : ''">{{ s.name }}</span>
|
||||||
<div class="mark">
|
<div class="mark"></div>
|
||||||
|
|
||||||
</div>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -35,69 +39,125 @@
|
||||||
</transition>
|
</transition>
|
||||||
</keep-alive>
|
</keep-alive>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
// 库存组件
|
// 库存组件
|
||||||
import Stock from '@/component/Stock.vue'
|
import Stock from "@/component/Stock.vue";
|
||||||
// 管理组件
|
// 管理组件
|
||||||
import Manage from '@/component/Manage.vue'
|
import Manage from "@/component/Manage.vue";
|
||||||
// 入库组件
|
// 入库组件
|
||||||
import EnterStore from '@/component/EnterStore.vue'
|
import EnterStore from "@/component/EnterStore.vue";
|
||||||
// 出库组件
|
// 出库组件
|
||||||
import OutStore from '@/component/OutStore.vue'
|
import OutStore from "@/component/OutStore.vue";
|
||||||
import OverView from '@/component/OverView.vue'
|
import OverView from "@/component/OverView.vue";
|
||||||
|
|
||||||
|
import {getBacklogMaterialInfo,byPosition, byBatchAndMateri ,getWarehouseUsages,getTurnoverRate,getChangeAmount ,getInventoryAgeInfo ,getStore,getMaterialDataList} from "@/api/index";
|
||||||
export default {
|
export default {
|
||||||
name: 'index',
|
name: "index",
|
||||||
components: {
|
components: {
|
||||||
Stock,
|
Stock,
|
||||||
Manage,
|
Manage,
|
||||||
EnterStore,
|
EnterStore,
|
||||||
OutStore,
|
OutStore,
|
||||||
OverView
|
OverView,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
index: 0,
|
index: 0,
|
||||||
asideList: [
|
asideList: [
|
||||||
{ name: '总览', select: require("@/assets/images/overview-select.png"), pic: require('@/assets/images/overview-default.png') },
|
{
|
||||||
{ name: '库存', select: require("@/assets/images/stock-select.png"), pic: require('@/assets/images/stock-default.png') },
|
name: "总览",
|
||||||
{ name: '入库', select: require("@/assets/images/enter-select.png"), pic: require('@/assets/images/enter-default.png') },
|
select: require("@/assets/images/overview-select.png"),
|
||||||
{ name: '出库', select: require("@/assets/images/out-select.png"), pic: require('@/assets/images/out-default.png') },
|
pic: require("@/assets/images/overview-default.png"),
|
||||||
{ name: '管理', select: require("@/assets/images/manage-select.png"), pic: require('@/assets/images/manage-default.png') }
|
},
|
||||||
|
{
|
||||||
|
name: "库存",
|
||||||
|
select: require("@/assets/images/stock-select.png"),
|
||||||
|
pic: require("@/assets/images/stock-default.png"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "入库",
|
||||||
|
select: require("@/assets/images/enter-select.png"),
|
||||||
|
pic: require("@/assets/images/enter-default.png"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "出库",
|
||||||
|
select: require("@/assets/images/out-select.png"),
|
||||||
|
pic: require("@/assets/images/out-default.png"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "管理",
|
||||||
|
select: require("@/assets/images/manage-select.png"),
|
||||||
|
pic: require("@/assets/images/manage-default.png"),
|
||||||
|
},
|
||||||
],
|
],
|
||||||
view: '',
|
view: "",
|
||||||
asideShow: false,
|
asideShow: false,
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// setTimeout(()=>{
|
// setTimeout(()=>{
|
||||||
this.view = 'OverView'
|
this.view = "OverView";
|
||||||
// },2000)
|
// },2000)
|
||||||
|
// 获取仓位号接口
|
||||||
|
// byPosition({ wareHouseCode: "HA1", position: "B01-010102" }).then((res) => {
|
||||||
|
// console.log(res, "仓位号");
|
||||||
|
// });
|
||||||
|
// // 获取物料批次
|
||||||
|
// byBatchAndMateri({ batch:"2021093009",wareHouseCode:'HA1' }).then((res) => {
|
||||||
|
// console.log(res,'物料批次');
|
||||||
|
// });
|
||||||
|
// // 仓库的使用率
|
||||||
|
// getWarehouseUsages({wareHouseCode:'HA1'}).then(res=>{
|
||||||
|
// console.log(res,'仓库使用率');
|
||||||
|
// })
|
||||||
|
//每月的周转率
|
||||||
|
// getTurnoverRate({wareHouseCode:'HA1'}).then(res=>{
|
||||||
|
// console.log(res,'每月的周转率');
|
||||||
|
// })
|
||||||
|
// 当月出入库金额
|
||||||
|
// getChangeAmount({wareHouseCode:'HA1'}).then(res=>{
|
||||||
|
// console.log(res,'当月出入库金额');
|
||||||
|
// })
|
||||||
|
// 积压物资
|
||||||
|
|
||||||
},
|
|
||||||
created(){
|
|
||||||
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
|
|
||||||
|
// 库龄结构
|
||||||
|
// getInventoryAgeInfo({wareHouseCode:'HA1'}).then(res=>{
|
||||||
|
// console.log(res,'库龄结构');
|
||||||
|
// })
|
||||||
|
|
||||||
|
// 库存构成
|
||||||
|
// getStore({wareHouseCode:'HA1'}).then(res=>{
|
||||||
|
// console.log(res,'库存结构');
|
||||||
|
// })
|
||||||
|
|
||||||
|
// 库容预测
|
||||||
|
// getMaterialDataList({method:'getYckc',LGUNM:"HA1",NY:"202304"}).then(res=>{
|
||||||
|
// console.log(res,'库容预测');
|
||||||
|
// })
|
||||||
},
|
},
|
||||||
|
created() {},
|
||||||
|
computed: {},
|
||||||
methods: {
|
methods: {
|
||||||
|
stopHandle(){
|
||||||
|
// console.log(this.$parent,'父组件');
|
||||||
|
if(this.$parent.index==0||this.$parent.index==2){
|
||||||
|
this.$parent.index=null
|
||||||
|
}
|
||||||
|
},
|
||||||
// 切图
|
// 切图
|
||||||
updateImg(i, event) {
|
updateImg(i, event) {
|
||||||
// 当页面显示出来时 再次点击隐藏
|
// 当页面显示出来时 再次点击隐藏
|
||||||
this.asideShow = !this.asideShow
|
this.asideShow = !this.asideShow;
|
||||||
if (this.index == i && this.asideShow) {
|
if (this.index == i && this.asideShow) {
|
||||||
// console.log(1);
|
// console.log(1);
|
||||||
this.view = ''
|
this.view = "";
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
this.index = i
|
this.index = i;
|
||||||
// let rightBox = document.querySelector('.right-item')
|
// let rightBox = document.querySelector('.right-item')
|
||||||
// rightBox.style.transform = 'translateX(0)'
|
// rightBox.style.transform = 'translateX(0)'
|
||||||
// console.log(rightBox,'dom元素');
|
// console.log(rightBox,'dom元素');
|
||||||
|
@ -111,23 +171,20 @@ export default {
|
||||||
// this.drawOutbound()
|
// this.drawOutbound()
|
||||||
// this.drawOverStock()
|
// this.drawOverStock()
|
||||||
// })
|
// })
|
||||||
this.view = 'OverView'
|
this.view = "OverView";
|
||||||
} else if (this.index == 1) {
|
} else if (this.index == 1) {
|
||||||
this.view = 'Stock'
|
this.view = "Stock";
|
||||||
} else if (this.index == 2) {
|
} else if (this.index == 2) {
|
||||||
this.view = 'EnterStore'
|
this.view = "EnterStore";
|
||||||
} else if (this.index == 3) {
|
} else if (this.index == 3) {
|
||||||
|
this.view = "OutStore";
|
||||||
this.view = 'OutStore'
|
|
||||||
} else if (this.index == 4) {
|
} else if (this.index == 4) {
|
||||||
this.view = 'Manage'
|
this.view = "Manage";
|
||||||
}
|
}
|
||||||
this.asideShow = false
|
this.asideShow = false;
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
.mark {
|
.mark {
|
||||||
|
@ -145,7 +202,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
.slide-fade-leave-active {
|
.slide-fade-leave-active {
|
||||||
transition: all 1s cubic-bezier(1.0, 0.5, 0.8, 1.0);
|
transition: all 1s cubic-bezier(1, 0.5, 0.8, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.slide-fade-enter,
|
.slide-fade-enter,
|
||||||
|
@ -223,7 +280,7 @@ export default {
|
||||||
// transition: all 1s;
|
// transition: all 1s;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
// transform: translateX(-100%);
|
// transform: translateX(-100%);
|
||||||
background-color: rgba(229, 237, 242, .5);
|
background-color: rgba(229, 237, 242, 0.5);
|
||||||
border-top-right-radius: 20px;
|
border-top-right-radius: 20px;
|
||||||
border-bottom-right-radius: 20px;
|
border-bottom-right-radius: 20px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -264,8 +321,6 @@ export default {
|
||||||
height: 80%;
|
height: 80%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ module.exports = {
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api': { //代理的名字
|
'/api': { //代理的名字
|
||||||
// target:'http://111.229.30.246:3111/',
|
// target:'http://111.229.30.246:3111/',
|
||||||
target: 'http://ip:30005/gwcp/',
|
target: 'http://192.168.80.111:30005/gwcpedge/',
|
||||||
// target:'http://www.weather.com.cn/',
|
// target:'http://www.weather.com.cn/',
|
||||||
ws: true,
|
ws: true,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
|
|
Loading…
Reference in New Issue