Merge remote-tracking branch 'origin/master'

master
xhj 8 months ago
commit 635827cc27

@ -0,0 +1,51 @@
import request from '@/utils/request'
/**
* 各垮计划完成情况
*/
export const getGkjhwcqk=function(){
return request({
url: '/kban/gxjhwcqk',
method: 'get',
})
}
/**
* 各月份产量()
*/
export const getQyfcl=function(){
return request({
url: '/kban/gyfcl',
method: 'get',
})
}
/**
* 计划完成情况()
*/
export const getJhwcqk=function(){
return request({
url: '/kban/jhwcqk',
method: 'get',
})
}
/**
* 各垮产量
*/
export const getGekuachaliang=function(){
return request({
url: '/kban/gekuachaliang',
method: 'get',
})
}
/**
* 考勤情况
*/
export const getKqData=function(){
return request({
url: '/kban/kq',
method: 'get',
})
}

@ -3025,7 +3025,7 @@ export default {
getCzxx({}).then(res => { getCzxx({}).then(res => {
this.dictData = res.data this.dictData = res.data
}) })
this.queryParam.beginTime = XEUtils.toDateString(XEUtils.getWhatMonth(new Date(), 1, 'first'),'yyyy/MM/dd') this.queryParam.beginTime = XEUtils.toDateString(XEUtils.getWhatMonth(new Date(), 0, 'first'),'yyyy/MM/dd')
}, },
//1 //1
initList() { initList() {

@ -8,13 +8,13 @@
<div class="card-footer-item"> <div class="card-footer-item">
<div class="footer-title">数量</div> <div class="footer-title">数量</div>
<div class="footer-detail"> <div class="footer-detail">
<dv-digital-flop :config="card.total" style="width:70%;height:35px;" /> <dv-digital-flop v-if="show" :config="card.total" style="width:70%;height:35px;" />
</div> </div>
</div> </div>
<div class="card-footer-item"> <div class="card-footer-item">
<div class="footer-title">重量</div> <div class="footer-title">重量</div>
<div class="footer-detail"> <div class="footer-detail">
<dv-digital-flop :config="card.num" style="width:70%;height:35px;" /> <dv-digital-flop v-if="show" :config="card.num" style="width:70%;height:35px;" />
</div> </div>
</div> </div>
</div> </div>
@ -24,92 +24,373 @@
</template> </template>
<script> <script>
import {getGkjhwcqk} from "@/api/kban";
export default { export default {
name:'MainGxChanLiang', name:'MainGxChanLiang',
data(){ data(){
return { return {
cards:[] show:false,
cards:[],
delay:null,
} }
}, },
mounted () {
this.getData()
this.delay=setInterval(this.getData, 30000)
},
methods: { methods: {
createData () { async getData() {
const { randomExtend } = this const res=await getGkjhwcqk()
const {上料, 抛丸, 理料, 划线, 切割} = this.createData(res.data)
const arr=['上料','抛丸','理料','划线','切割'] this.show = false
this.cards = new Array(5).fill(0).map((foo, i) => ({ this.cards = [上料, 抛丸, 理料, 划线, 切割]
title: arr[i], this.show = true
total: { },
number: [randomExtend(100, 400)], clear(){
content: '{nt}', console.log("本月计划完成情况停止加载数据")
textAlign: 'right', clearInterval(this.delay)
style: { },
fill: '#ea6027', createData (list) {
fontWeight: 'bold' const data={
"上料": {
title: '上料',
total: {
number: [0],
content: '{nt}',
textAlign: 'right',
style: {
fill: '#ea6027',
fontWeight: 'bold'
}
},
num: {
number: [0],
content: '{nt}',
textAlign: 'right',
style: {
fill: '#26fcd8',
fontWeight: 'bold'
}
},
ring: {
series: [
{
type: 'gauge',
startAngle: -Math.PI / 2,
endAngle: Math.PI * 1.5,
arcLineWidth: 13,
radius: '80%',
data: [
{ name: '重量占比', value: 0 }
],
axisLabel: {
show: false
},
axisTick: {
show: false
},
pointer: {
show: false
},
backgroundArc: {
style: {
stroke: '#224590'
}
},
details: {
show: true,
formatter: '重量占比{value}%',
style: {
fill: '#1ed3e5',
fontSize: 20
}
}
}
],
color: ['#03d3ec']
} }
}, },
num: { "抛丸": {
number: [randomExtend(300, 600)], title: '抛丸',
content: '{nt}', total: {
textAlign: 'right', number: [0],
style: { content: '{nt}',
fill: '#26fcd8', textAlign: 'right',
fontWeight: 'bold' style: {
fill: '#ea6027',
fontWeight: 'bold'
}
},
num: {
number: [0],
content: '{nt}',
textAlign: 'right',
style: {
fill: '#26fcd8',
fontWeight: 'bold'
}
},
ring: {
series: [
{
type: 'gauge',
startAngle: -Math.PI / 2,
endAngle: Math.PI * 1.5,
arcLineWidth: 13,
radius: '80%',
data: [
{ name: '重量占比', value: 0 }
],
axisLabel: {
show: false
},
axisTick: {
show: false
},
pointer: {
show: false
},
backgroundArc: {
style: {
stroke: '#224590'
}
},
details: {
show: true,
formatter: '重量占比{value}%',
style: {
fill: '#1ed3e5',
fontSize: 20
}
}
}
],
color: ['#03d3ec']
} }
}, },
ring: { "理料": {
series: [ title: '理料',
{ total: {
type: 'gauge', number: [0],
startAngle: -Math.PI / 2, content: '{nt}',
endAngle: Math.PI * 1.5, textAlign: 'right',
arcLineWidth: 13, style: {
radius: '80%', fill: '#ea6027',
data: [ fontWeight: 'bold'
{ name: '重量占比', value: randomExtend(40, 60) } }
], },
axisLabel: { num: {
show: false number: [0],
}, content: '{nt}',
axisTick: { textAlign: 'right',
show: false style: {
}, fill: '#26fcd8',
pointer: { fontWeight: 'bold'
show: false }
}, },
backgroundArc: { ring: {
style: { series: [
stroke: '#224590' {
type: 'gauge',
startAngle: -Math.PI / 2,
endAngle: Math.PI * 1.5,
arcLineWidth: 13,
radius: '80%',
data: [
{ name: '重量占比', value: 0 }
],
axisLabel: {
show: false
},
axisTick: {
show: false
},
pointer: {
show: false
},
backgroundArc: {
style: {
stroke: '#224590'
}
},
details: {
show: true,
formatter: '重量占比{value}%',
style: {
fill: '#1ed3e5',
fontSize: 20
}
} }
}, }
details: { ],
show: true, color: ['#03d3ec']
formatter: '重量占比{value}%', }
style: { },
fill: '#1ed3e5', "划线": {
fontSize: 20 title: '划线',
total: {
number: [0],
content: '{nt}',
textAlign: 'right',
style: {
fill: '#ea6027',
fontWeight: 'bold'
}
},
num: {
number: [0],
content: '{nt}',
textAlign: 'right',
style: {
fill: '#26fcd8',
fontWeight: 'bold'
}
},
ring: {
series: [
{
type: 'gauge',
startAngle: -Math.PI / 2,
endAngle: Math.PI * 1.5,
arcLineWidth: 13,
radius: '80%',
data: [
{ name: '重量占比', value: 0 }
],
axisLabel: {
show: false
},
axisTick: {
show: false
},
pointer: {
show: false
},
backgroundArc: {
style: {
stroke: '#224590'
}
},
details: {
show: true,
formatter: '重量占比{value}%',
style: {
fill: '#1ed3e5',
fontSize: 20
}
} }
} }
],
color: ['#03d3ec']
}
},
"切割": {
title: '切割',
total: {
number: [0],
content: '{nt}',
textAlign: 'right',
style: {
fill: '#ea6027',
fontWeight: 'bold'
}
},
num: {
number: [0],
content: '{nt}',
textAlign: 'right',
style: {
fill: '#26fcd8',
fontWeight: 'bold'
} }
], },
color: ['#03d3ec'] ring: {
series: [
{
type: 'gauge',
startAngle: -Math.PI / 2,
endAngle: Math.PI * 1.5,
arcLineWidth: 13,
radius: '80%',
data: [
{ name: '重量占比', value: 0 }
],
axisLabel: {
show: false
},
axisTick: {
show: false
},
pointer: {
show: false
},
backgroundArc: {
style: {
stroke: '#224590'
}
},
details: {
show: true,
formatter: '重量占比{value}%',
style: {
fill: '#1ed3e5',
fontSize: 20
}
}
}
],
color: ['#03d3ec']
}
} }
}))
},
randomExtend (minNum, maxNum) {
if (arguments.length === 1) {
return parseInt(Math.random() * minNum + 1, 10)
} else {
return parseInt(Math.random() * (maxNum - minNum + 1) + minNum, 10)
} }
}
},
mounted () {
const { createData } = this
createData() let totalZl=0
for (const item of list) {
totalZl+=(item.bcshzl/1000)||0
if (!!item.slfkrq){
data.上料.total.number[0]+=1
data.上料.num.number[0]+=(item.bcshzl/1000)||0
}
if (!!item.pwfkrq){
data.抛丸.total.number[0]+=1
data.抛丸.num.number[0]+=(item.bcshzl/1000)||0
}
if (!!item.llfkrq){
data.理料.total.number[0]+=1
data.理料.num.number[0]+=(item.bcshzl/1000)||0
}
if (!!item.hxfkrq){
data.划线.total.number[0]+=1
data.划线.num.number[0]+=(item.bcshzl/1000)||0
}
if (!!item.qgfkrq){
data.切割.total.number[0]+=1
data.切割.num.number[0]+=(item.bcshzl/1000)||0
}
}
let d1=data.上料.num.number[0]/totalZl*100
d1=d1<1?1:d1
data.上料.ring.series[0].data[0].value=parseFloat(d1.toFixed(2))
setInterval(this.createData, 30000) let d2=data.上料.num.number[0]/totalZl*100
} d2=d2<1?1:d2
data.抛丸.ring.series[0].data[0].value=parseFloat(d2.toFixed(2))
let d3=data.上料.num.number[0]/totalZl*100
d3=d3<1?1:d3
data.理料.ring.series[0].data[0].value=parseFloat(d3.toFixed(2))
let d4=data.上料.num.number[0]/totalZl*100
d4=d4<1?1:d4
data.划线.ring.series[0].data[0].value=parseFloat(d4.toFixed(2))
let d5=data.上料.num.number[0]/totalZl*100
d5=d5<1?1:d5
data.切割.ring.series[0].data[0].value=parseFloat(d5.toFixed(2))
return data
},
},
} }
</script> </script>

@ -1,56 +1,57 @@
<template> <template>
<div class="chanlian"> <div class="chanlian">
<div class="chanlian__title">本月各垮产量()</div> <div class="chanlian__title">本月各垮产量()</div>
<dv-scroll-ranking-board :config="config" /> <dv-scroll-ranking-board v-if="show" :config="config" />
</div> </div>
</template> </template>
<script> <script>
import {getGekuachaliang} from "@/api/kban";
export default { export default {
name: "MainChanLian", name: "MainChanLian",
data () { data () {
return { return {
show:false,
config: { config: {
data: [ data: [
{ {
name: '上料', name: '上料',
value: 120 value: 120
}, },
{
name: '切割',
value: 55
},
{
name: '理料',
value: 78
},
{
name: '划线',
value: 66
},
{
name: '抛丸',
value: 80
},
{
name: '坡口',
value: 45
},
{
name: '曲加工',
value: 29
},
{
name: '打磨',
value: 29
},
{
name: '预配盘',
value: 29
}
], ],
rowNum: 9 rowNum: 9
} },
delay:null
}
},
mounted() {
// this.$socket.open()
// this.wsSubscribe()
},
created(){
this.getData();
this.delay=setInterval(this.getData,30000)
},
sockets:{},
methods:{
getData(){
getGekuachaliang().then(res=>{
this.show=false
const data=[]
let total=0
Object.keys(res.data).forEach(key=>{
const item=res.data[key]
data.push({name:item.BMSM,value:item.t})
total+=1
})
this.config.data=data
this.config.rowNum=total
this.show=true
})
},
clear(){
clearInterval(this.delay)
} }
} }
} }

@ -5,29 +5,57 @@
总人数<span>{{totalPerson}}</span> 总人数<span>{{totalPerson}}</span>
</div> </div>
<div class="chart-container"> <div class="chart-container">
<dv-active-ring-chart :config="config" /> <dv-active-ring-chart v-if="show" :config="config" />
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import {getKqData} from "@/api/kban";
export default { export default {
name:'Cq', name:'Cq',
data () { data () {
return { return {
totalPerson:300, show:false,
totalPerson:0,
config: { config: {
radius: '60%', radius: '60%',
activeRadius: '63%', activeRadius: '63%',
data: [ data: [],
{name:'出勤',value:296},
{name:'请假',value:2},
{name:'缺勤',value:2}
],
digitalFlopStyle: { digitalFlopStyle: {
fontSize: 20 fontSize: 20
} }
} },
delay:null,
}
},
mounted() {
// this.$socket.open()
// this.wsSubscribe()
},
created(){
this.getData();
this.delay=setInterval(this.getData,30000)
},
sockets:{},
methods:{
getData(){
getKqData().then(res=>{
this.show=false
const data=[]
this.totalPerson=0
Object.keys(res.data).forEach(key=>{
const item=res.data[key]
data.push({name:key,value:item})
this.totalPerson+=item
})
this.config.data=data
this.show=true
})
},
clear(){
clearInterval(this.delay)
} }
} }
} }

@ -1,15 +1,18 @@
<template> <template>
<div class="ycl"> <div class="ycl">
<div class="ycl__title">各月份产量()</div> <div class="ycl__title">各月份产量()</div>
<dv-conical-column-chart :config="config" /> <dv-conical-column-chart v-if="show" :config="config" />
</div> </div>
</template> </template>
<script> <script>
import {getKqData, getQyfcl} from "@/api/kban";
export default { export default {
name:'MainGeYueChanLiang', name:'MainGeYueChanLiang',
data(){ data(){
return { return {
show:false,
config:{ config:{
showValue:true, showValue:true,
data: [ data: [
@ -17,40 +20,34 @@ export default {
name: '1月', name: '1月',
value: 71 value: 71
}, },
{
name: '2月',
value: 55
},
{
name: '3月',
value: 120
},
{
name: '4月',
value: 66
},
{
name: '5月',
value: 80
},
{
name: '6月',
value: 95
},
{
name: '7月',
value: 90
},
{
name: '8月',
value: 90
},
{
name: '9月',
value: 32
},
], ],
} },
delay:null,
}
},
mounted() {
// this.$socket.open()
// this.wsSubscribe()
},
created(){
this.getData();
this.delay=setInterval(this.getData,30000)
},
sockets:{},
methods:{
getData(){
getQyfcl().then(res=>{
this.show=false
const data=[]
for (const item of res.data) {
data.push({name:`${item.month}`,value:item.t.toFixed(2)})
}
this.config.data=data
this.show=true
})
},
clear(){
clearInterval(this.delay)
} }
} }
} }

@ -2,25 +2,60 @@
<div class="ycl"> <div class="ycl">
<div class="ycl__title">本月计划完成情况</div> <div class="ycl__title">本月计划完成情况</div>
<div class="water-level-chart-details"> <div class="water-level-chart-details">
累计完成<span>6,800</span> 累计完成<span>{{dun}}</span>
</div> </div>
<div class="chart-container"> <div class="chart-container">
<dv-water-level-pond :config="config" /> <dv-water-level-pond v-if="show" :config="config" />
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import {getJhwcqk} from "@/api/kban";
export default { export default {
name:'MainYueChanLiang', name:'MainYueChanLiang',
data () { data () {
return { return {
show:false,
dun:0,
config: { config: {
data: [45], data: [],
shape: 'round', shape: 'round',
waveHeight: 25, waveHeight: 25,
waveNum: 2 waveNum: 2
} },
delay:null,
}
},
mounted() {
// this.$socket.open()
// this.wsSubscribe()
},
created(){
this.getData();
this.delay=setInterval(this.getData,30000)
},
sockets:{},
methods:{
getData(){
getJhwcqk().then(res=>{
this.show=false
let total=0
for (const item of res.data) {
if (item.zt==='62'){
this.dun=item.t.toFixed(2)
}
total+=item.t||0
}
const point=(this.dun/total*100).toFixed(2)
this.config.data=[point]
this.show=true
})
},
clear(){
console.log("本月计划完成情况停止加载数据")
clearInterval(this.delay)
} }
} }
} }

@ -5,17 +5,17 @@
<Menu /> <Menu />
<div class="main-content"> <div class="main-content">
<div class="block-top-bottom-content"> <div class="block-top-bottom-content">
<Cq /> <Cq ref="cq" />
<MainVideo /> <MainVideo ref="manVideo" />
</div> </div>
<div class="block-left-right-content"> <div class="block-left-right-content">
<MainChanLian /> <MainChanLian ref="mainChanLian" />
<div class="block-top-bottom-content1"> <div class="block-top-bottom-content1">
<div class="block-top-content"> <div class="block-top-content">
<MainYueChanLiang /> <MainYueChanLiang ref="mainYueChanLiang"/>
<MainGeYueChanLiang /> <MainGeYueChanLiang ref="mainGeYueChanLiang"/>
</div> </div>
<MainGxChanLiang /> <MainGxChanLiang ref="mainGxChanLiang"/>
</div> </div>
</div> </div>
</div> </div>
@ -48,7 +48,31 @@ export default {
data () { data () {
return {} return {}
}, },
methods: {} mounted(){
this.init()
},
methods: {
init(){
this.$store.dispatch('page/handler', true)
}
},
beforeDestroy() {
console.log('beforeDestroy: 组件实例销毁之前');
this.$refs.cq.clear()
this.$refs.mainChanLian.clear()
this.$refs.mainYueChanLiang.clear()
this.$refs.mainGeYueChanLiang.clear()
this.$refs.mainGxChanLiang.clear()
},
destroyed() {
console.log('destroyed: 组件实例销毁之后');
}
/*beforeDestroy(){
console.log(this.components)
for (const item in this.components) {
console.log(item)
}
}*/
} }
</script> </script>

@ -1,12 +1,13 @@
<template> <template>
<el-container> <Czfdzgtcx />
<span style="margin-top: 20px;margin-left: 20px">待开发...</span>
</el-container>
</template> </template>
<script> <script>
import Czfdzgtcx from "@/views/tp/czfdzgtcx.vue";
export default { export default {
name: "PssjFX", name: "PssjFX",
components: {Czfdzgtcx},
data() { data() {
}, },
created() { created() {

@ -1,16 +1,19 @@
<template> <template>
<el-container> <div id="kb-container" class="dashboard-editor-container" style="background-color: #f6fbff;">
<span style="margin-top: 20px;margin-left: 20px">待开发...</span> <iframe src="http://127.0.0.1:9527/#/kban" style="width: 100%;height:100vh"></iframe>
</el-container> </div>
</template> </template>
<script> <script>
import DataView from "@/views/kban/index.vue";
export default { export default {
name: "SygdFX", name: "SygdFX",
components: {DataView},
data() { data() {
return {}
}, },
created() { created() {
}, },
methods: { methods: {
@ -18,5 +21,9 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped > <style lang="scss" scoped >
.dashboard-editor-container {
background-color: #e3e3e3;
min-height: 81vh;
padding: 0 0;
}
</style> </style>

@ -611,7 +611,7 @@ export default {
uploadAction: process.env.VUE_APP_BASE_API + '/api/dmCzfddyb/upload', uploadAction: process.env.VUE_APP_BASE_API + '/api/dmCzfddyb/upload',
uploadData: {}, uploadData: {},
queryParam: { queryParam: {
czbh: '', czbh: 'G175K-4',
ph: '', ph: '',
kh: '', kh: '',
dwgNo: '', dwgNo: '',

Loading…
Cancel
Save