lion 7 months ago
parent f3e06fef48
commit 6645cadfe5

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 938 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 771 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

@ -1,5 +1,5 @@
<template>
<el-breadcrumb class="app-breadcrumb" separator="/">
<el-breadcrumb v-if="!$route.path.includes('dashboard')" class="app-breadcrumb" separator="/">
<transition-group name="breadcrumb">
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
<span v-if="item.redirect==='noRedirect'||index===levelList.length-1||item.path.includes('key')"
@ -60,7 +60,7 @@
return toPath(params)
},
handleLink(item) {
console.log(1111,this.levelList)
console.log('111',this.levelList)
const {
redirect,
path

@ -724,7 +724,12 @@ export default {
}
},
mounted() {
this.initLoad();
if(this.height){
}else{
this.initLoad();
}
},
updated() {
this.$nextTick(() => {

@ -86,7 +86,7 @@ export const constantRoutes = [{
children: [{
path: 'dashboard',
name: '系统首页',
component: () => import('@/views/dashboard/index'),
component: () => import('@/views/jsc/index'),
meta: {
title: '系统首页',
icon: 'dashboard'

@ -0,0 +1,195 @@
<template>
<div ref="chart" style="width:350px" class="bar3d-chart"></div>
</template>
<script>
import echarts from 'echarts'
export default {
name: 'Bar3DChart',
mounted() {
this.chart = echarts.init(this.$refs.chart)
this.chart.setOption({
backgroundColor: 'transparent',
title: {
text: '各地区物资存量2025',
left: 'center',
top: 20,
textStyle: {
color: '#6dcde6'
}
},
grid: {
left: 40,
right: 20,
bottom: 40,
top: 40
},
xAxis: {
type: 'category',
data: ['姑苏区', '吴中区', '相城区', '虎丘区', '吴江区'],
axisLine: {
lineStyle: {
color: '#6ec6ff'
}
},
axisLabel: {
color: '#fff',
fontSize: 16
}
},
yAxis: {
type: 'value',
max: 500,
splitLine: {
lineStyle: {
color: 'rgba(255,255,255,0.1)'
}
},
axisLine: {
lineStyle: {
color: '#6ec6ff'
}
},
axisLabel: {
color: '#fff',
fontSize: 16
}
},
series: [{
type: 'bar',
barWidth: 40,
data: [320, 460, 380, 240, 330],
itemStyle: {
color: (params) => {
// 3D
return {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [{
offset: 0,
color: '#b8e2ff'
}, //
{
offset: 0.5,
color: '#6ec6ff'
}, //
{
offset: 1,
color: '#298dff'
} //
]
}
},
barBorderRadius: [10, 10, 0, 0],
shadowColor: 'rgba(46, 130, 255, 0.4)',
shadowBlur: 15
},
label: {
show: true,
position: 'top',
color: '#fff',
fontSize: 18
}
}]
})
this.resizeChart()
},
beforeDestroy() {
if (this.chart) this.chart.dispose()
},
methods: {
initChart() {
this.chart = echarts.init(this.$refs.chart)
const option = {
backgroundColor: 'transparent',
grid: {
left: 40,
right: 20,
bottom: 40,
top: 40,
},
xAxis: {
type: 'category',
data: ['姑苏区', '吴中区', '相城区', '虎丘区', '吴江区'],
axisLine: {
lineStyle: {
color: '#6ec6ff'
}
},
axisLabel: {
color: '#fff',
fontSize: 16
},
},
yAxis: {
type: 'value',
max: 500,
splitLine: {
lineStyle: {
color: 'rgba(255,255,255,0.1)'
}
},
axisLine: {
lineStyle: {
color: '#6ec6ff'
}
},
axisLabel: {
color: '#fff',
fontSize: 16
},
},
series: [{
type: 'bar',
barWidth: 40,
data: [320, 460, 380, 240, 330],
itemStyle: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [{
offset: 0,
color: '#6ec6ff'
},
{
offset: 1,
color: '#298dff'
}
]
},
shadowColor: 'rgba(46, 130, 255, 0.4)',
shadowBlur: 10
},
label: {
show: true,
position: 'top',
color: '#fff',
fontSize: 18
}
}]
}
this.$nextTick(()=>{
this.chart.setOption(option)
})
},
resizeChart() {
if (this.chart) this.chart.resize()
}
}
}
</script>
<style scoped>
.bar3d-chart {
height: 400px;
background: transparent;
}
</style>

File diff suppressed because one or more lines are too long

@ -0,0 +1,407 @@
<template>
<div style="width:800px;height:500px;position: relative;">
<div style="width:100%;height:100%" class='chart' id='chart'>
</div>
<div class="info" v-if="showData">
<div @click="showData=false" class="close">x
</div>
<div>
<xy-table :list="list" :isPage="false" :height="350" :table-item="table">
<template v-slot:btns>
<div></div>
</template>
</xy-table>
</div>
</div>
</div>
</template>
<script>
// import '../../../../node_modules/echarts/map/js/china.js' //
import * as echarts from 'echarts';
import jtmap from './jtmap.json';
import {
index
} from "@/api/system/baseForm.js"
export default {
props: {
// mapData: {
// type: Array,
// default: []
// },
// streetNameList: {
// type: Array,
// default: []
// }
},
data() {
return {
showData: false,
list: [],
table: [{
label: '序号',
type: 'index',
fixed: 'left',
width: 80,
}, {
label: '仓库名称',
prop: 'cangkumingcheng',
align: 'left',
}, {
label: '仓库类型',
prop: 'storehouses_id_storehouses_id_relation.name',
align: 'center',
width: 120,
},
// {
// label: '',
// prop: 'cangkubianma',
// align: 'left',
// width: 240
// },
{
label: '所在区域',
prop: 'suozaiquyu',
width: 120,
}, {
label: '建设年代',
prop: 'jiansheniandai',
width: 120,
}, {
label: '仓库地址',
prop: 'cangkudizhi',
width: 360,
align: 'left'
}, {
label: '仓库面积',
prop: 'cangkumianji',
width: 120,
}, {
label: '负责人',
prop: 'fuzeren',
width: 120,
}, {
label: '联系电话',
prop: 'lianxidianhua',
width: 120,
}, {
label: '创建日期',
prop: 'created_at',
width: 120,
formatter: (cell, data, value) => {
return value ? value.substring(0, 10) : ''
}
}
],
myChart: null,
hookToolTip: {},
streetNameList: [{
name: '相城区',
id: 20,
coord: [120.638036, 31.470445]
}, {
name: '姑苏区',
id: 21,
coord: [120.611498, 31.336451]
}, {
name: '虎丘区',
id: 23,
coord: [120.331625, 31.32967]
}, {
name: '吴中区',
coord: [120.334974, 31.162319]
}, {
name: '太仓市',
id: 16,
coord: [121.131892, 31.558427]
}, {
name: '昆山市',
id: 17,
coord: [120.984, 31.386621]
}, {
name: '常熟市',
id: 15,
coord: [120.741763, 31.653979]
}, {
name: '张家港市',
id: 14,
coord: [120.540324, 31.977274]
}, {
name: '吴江区',
id: 18,
coord: [120.647418, 31.135963]
}]
// mapData:[]
}
},
mounted() {
this.drawChart()
},
created() {
},
watch: {
hookToolTip: {
handler(newVal, oldVal) {
console.log("newVal",newVal)
this.streetNameList.map(item=>{
if(item.name===newVal.name){
this.getList(item.id)
}
})
}
},
},
methods: {
async getList(id) {
this.list = []
const res = await index({
page: 1,
page_size: 999,
table_name: 'materialstorages',
filter: [{
key: 'quyu_id',
op: 'eq',
value: id
}],
})
this.list = res.data
this.showData = true
},
resetCharts() {
this.myChart.resize()
},
drawChart() {
let that = this
// console.log("this.mapData",this.mapData)
// this.mapData.forEach((m, index) => {
// if (!m.coord) {
// m.coord = ['', '']
// }
// })
// domecharts
console.log("streetNameList", this.streetNameList)
this.myChart = echarts.init(document.getElementById('chart'))
echarts.registerMap('GX', jtmap);
//
this.myChart.setOption({
//
tooltip: {
trigger: 'item', // , 使
position: 'right',
enterable: true,
triggerOn: 'click',
formatter: function(val) {
console.log("val",val)
that.hookToolTip = val;
// if (!val.data) {
// return
// }
// return '<div class="mapsshow' + val.data.id + '" style="cursor:pointer"><p>' + val.data.name +
// '</p><p style="color:red"></p><div>'
}
},
geo: {
map: "GX",
roam: false, //
zoom: 1.23, //
label: {
normal: {
show: false,
fontSize: "0",
color: "rgba(0,0,0,0.7)",
},
},
itemStyle: {
normal: {
borderColor: "rgba(0, 0, 0, 0.2)",
},
emphasis: {
// areaColor: "#F3B329", //
shadowOffsetX: 0,
shadowOffsetY: 0,
shadowBlur: 20,
borderWidth: 0,
shadowColor: "rgba(0, 0, 0, 0.5)",
},
},
// data:this.dataList
regions: [
//
{
name: "相城区",
itemStyle: {
normal: {
areaColor: "#75bedc",
},
emphasis: {
areaColor: "#75bedc",
},
},
},
{
name: "姑苏区",
itemStyle: {
normal: {
areaColor: '#00ffff',
},
emphasis: {
areaColor: '#00ffff',
},
},
},
{
name: "虎丘区",
itemStyle: {
normal: {
areaColor: "#d7335a",
},
emphasis: {
areaColor: "#d7335a",
},
},
},
{
name: "吴中区",
itemStyle: {
normal: {
areaColor: "#fc8251",
},
emphasis: {
areaColor: "#fc8251",
},
},
},
{
name: "太仓市",
itemStyle: {
normal: {
areaColor: '#91cd77',
},
emphasis: {
areaColor: '#91cd77',
},
},
},
{
name: "昆山市",
itemStyle: {
normal: {
areaColor: '#ef6567',
},
emphasis: {
areaColor: '#ef6567',
},
},
},
{
name: "常熟市",
itemStyle: {
normal: {
areaColor: '#f9c956',
},
emphasis: {
areaColor: '#f9c956',
},
},
},
{
name: "张家港市",
itemStyle: {
normal: {
areaColor: '#c968e1',
},
emphasis: {
areaColor: '#c968e1',
},
},
},
{
name: "吴江区",
itemStyle: {
normal: {
areaColor: '#c968e1',
},
emphasis: {
areaColor: '#c968e1',
},
},
}
]
},
series: [{
name: "区域",
type: "map",
mapType: "china",
geoIndex: 0,
markPoint: {
// symbol: 'image://' + require('@/assets/logo-mini.png'), //
symbol: '', //
symbolSize: [10, 10], //
symbolOffset: [0, 0],
label: {
position: 'center',
color: "#333",
textAlign: "center",
padding: [5, 10],
borderWidth: 1, //
borderColor: "#fff", //
backgroundColor: '#fff', //
formatter(val) {
return val.data.name
}
},
// coord
// data:this.streetNameList
data: this.streetNameList
}
}],
})
}
}
}
</script>
<style scoped>
.chart {
/* width: 100%;
height: 100%; */
/* margin: 100px 50px 0; */
/* border: 1px solid #eeeeee; */
/* background: url(../../public/static/bg.png) no-repeat; */
background-size: 100% 100%;
}
.info {
width: 600px;
height: 350px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: rgba(255, 255, 255, 0.5);
border-radius: 30px;
}
.close {
position: absolute;
right: -15px;
top: -15px;
border-radius: 30px;
z-index: 9;
width: 30px;
height: 30px;
text-align: center;
line-height: 30px;
background-color: #333;
color: #fff;
cursor: pointer;
}
</style>

@ -0,0 +1,118 @@
<template>
<div ref="chart" style="width:350px" class="bar3d-chart"></div>
</template>
<script>
import echarts from 'echarts'
export default {
name: 'Pie3DChart',
mounted() {
this.chart = echarts.init(this.$refs.chart)
this.chart.setOption({
color:['#6340f3','#c740f1','#6dcde6'],
title: {
text: '待办任务',
left: 'center',
textStyle: {
color: '#6dcde6'
}
},
tooltip: {
trigger: 'item'
},
// legend: {
// orient: 'vertical',
// left: 'left'
// },
series: [{
name: '',
type: 'pie',
radius: '50%',
data: [{
value: 8,
name: '工单'
},
{
value: 7,
name: '维修'
},
{
value: 8,
name: '盘点'
}
],
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: '#fff'
}
}
}]
})
this.resizeChart()
},
beforeDestroy() {
if (this.chart) this.chart.dispose()
},
methods: {
initChart() {
this.chart = echarts.init(this.$refs.chart)
const option = {
title: {
text: 'Referer of a Website',
subtext: 'Fake Data',
left: 'center'
},
tooltip: {
trigger: 'item'
},
legend: {
orient: 'vertical',
left: 'left'
},
series: [{
name: 'Access From',
type: 'pie',
radius: '50%',
data: [{
value: 8,
name: '工单'
},
{
value: 7,
name: '维修'
},
{
value: 8,
name: '盘点'
}
],
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}]
};
this.$nextTick(() => {
this.chart.setOption(option)
})
},
resizeChart() {
if (this.chart) this.chart.resize()
}
}
}
</script>
<style scoped>
.bar3d-chart {
height: 400px;
background: transparent;
}
</style>

@ -0,0 +1,243 @@
<template>
<div class="jsc" :style="bgStyle">
<div class="jscC">
<div class="jscC-top">
<div v-for="item in topObj">
<div class="label">{{item.label}}</div>
<div class="value">{{item.value}}</div>
</div>
</div>
<div class="jscC-center">
<div class="jscC-center-left">
<Bar3DChart></Bar3DChart>
</div>
<div class="jscC-center-center">
<echartsMap ref="echartsMap"></echartsMap>
</div>
<div class="jscC-center-right">
<Pie3DChart></Pie3DChart>
</div>
</div>
<div class="jscC-bottom">
<div @click="toUrl(item.path)" v-for="item in bottomObj">
<div class="label">{{item.label}}</div>
</div>
</div>
<!-- <img :style="contentStyle" src="../../assets/jsc/content.png"></img> -->
</div>
</div>
</template>
<script>
import Bar3DChart from "../jsc/components/barChart.vue"
import Pie3DChart from "../jsc/components/pieChart.vue"
import echartsMap from "./components/mapChart.vue";
export default {
components: {
Bar3DChart,
Pie3DChart,
echartsMap
},
data() {
return {
screenWidth: 0,
screenHeight: 0,
bgStyle: {
width: 0,
height: 0
},
contentStyle: {
width: 0,
height: 0
},
topObj: [{
label: '物资总量',
value: 123500
}, {
label: '仓库数量',
value: 45
}, {
label: '本月出库',
value: 1390
}, {
label: '本月入库',
value: 2350
}, {
label: '应急调度次数',
value: 25
}, {
label: '设备总数',
value: 350
}, {
label: '盘点',
value: 0
}, {
label: '维护',
value: 0
}],
bottomObj: [{
label: '库存管理',
path: '/views/inventorys'
}, {
label: '入库管理',
path: '/stocks/index_purchase'
}, {
label: '出库管理',
path: '/outbounds/index_receive'
}, {
label: '统计报表',
path: '/reports/stocks'
}, {
label: '应急防御',
path: '/books/index'
}, {
label: '盘点管理',
path: '/inventorys/stocktaking'
}, {
label: '运维管理',
path: '/maintenance/maintenance_records'
}, {
label: '工单管理',
path: '/flood/plan'
}]
}
},
mounted() {
this.$store.dispatch('app/toggleSideBar')
this.setRem()
this.calculateScreenSize()
window.addEventListener('resize', this.calculateScreenSize)
},
beforeDestroy() {
window.removeEventListener('resize', this.calculateScreenSize)
},
methods: {
setRem() {
// 使100px
const baseSize = 100;
const baseVal = baseSize / 1920;
const vW = window.innerWidth; //
const rem = vW * baseVal; // ,font-size
window.$size = rem / 100;
document.documentElement.style.fontSize = rem + "px";
},
calculateScreenSize() {
this.screenWidth = window.innerWidth
this.screenHeight = window.innerHeight
this.bgStyle = {
width: this.screenWidth - 56 + 'px',
height: this.screenHeight + 'px',
position: 'relative',
left: '-20px',
// top:'-60px'
}
this.contentStyle = {
width: this.screenWidth - 70 + 'px',
height: this.screenHeight - 20 + 'px'
}
},
toUrl(path) {
this.$router.push(path)
}
}
}
</script>
<style lang="scss" scoped>
::v-deep .app-main {
padding: 0 !important
}
.jsc {
height: 100%;
background: url(../../assets/jsc/bg.png) no-repeat center top;
background-size: 100% 100%;
display: flex;
align-items: center;
justify-content: center;
padding: 10px;
padding-top: 0;
.jscC {
width: 100%;
height: 100%;
background: url(../../assets/jsc/contentBg.png) no-repeat center top;
background-size: 100% 100%;
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
padding-top: .7rem;
&-top {
width: 17.67rem;
height: 1.52rem;
padding: 0 .4rem;
// height: 100%;
background: url(../../assets/jsc/topbg.png) no-repeat center top;
background-size: 100% 100%;
display: flex;
align-items: center;
justify-content: space-between;
.label {
font-size: .2rem;
text-align: center;
color: #fff;
}
.value {
font-size: .38rem;
text-align: center;
color: #7ff7fe;
font-weight: bolder;
}
}
&-center {
width: 17.67rem;
// height: 1.52rem;
padding: 0 .2rem;
display: flex;
align-items: center;
justify-content: space-between;
// flex-wrap: wrap;
&-left {
// width:5.3rem;
}
&-center {
width: 10.3rem;
}
&-right {}
}
&-bottom {
font-size: .22rem;
color: #fff;
width: 17.67rem;
padding: .2rem;
display: flex;
align-items: center;
justify-content: space-between;
&>div {
width: 1.57rem;
height: 1.57rem;
background: url(../../assets/jsc/icon.png) no-repeat center top;
background-size: 100% 100%;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
}
}
}
}
</style>

@ -174,7 +174,7 @@
value:this.select.keyword
},{
key:'quyu_id',
op:'like',
op:'eq',
value:this.select.area
},{
key:'storehouses_id',

@ -102,35 +102,34 @@
label: '序号',
type: 'index',
fixed: 'left',
width: 80
width: 50
},
{
label: "物资编码",
width: 120,
width: 80,
prop: 'wuzibianma',
align: 'center',
},
{
label: "资产名称",
width: 180,
prop: 'zichanmingcheng',
align: 'left'
},
{
label: "物资类型",
width: 180,
width: 120,
prop: 'wuzileixing',
align: 'center'
},
{
label: "计量单位",
width: 180,
width: 80,
prop: 'jiliangdanwei',
align: 'center'
},
{
label: "库存",
width: 180,
width: 80,
prop: 'inventorys_total',
align: 'center'
}
@ -336,7 +335,7 @@
height: 100%;
overflow-y: auto;
padding: 20px;
background-color: #fff;
background: linear-gradient(to right,#4261ab 20%, #8ebcd7 50%,#9e91bc 90%);
}
.preview-container {
@ -365,7 +364,7 @@
background-position: center;
background-repeat: no-repeat;
border-radius: 4px;
background-color: #f5f7fa;
/* background-color: #f5f7fa; */
}
/* 调整货架点位的定位,因为现在是相对于实际图片区域定位 */
@ -390,7 +389,7 @@
border-radius: 4px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
padding: 10px;
min-width: 300px;
max-width: 550px;
transform: translateX(-50%);
z-index: 1000;
/* 确保浮窗始终显示在最上层 */

Loading…
Cancel
Save