Merge branch 'v2' of https://e.coding.net/ctcdevteam/ehs/ehs_web into v2
This commit is contained in:
commit
9ea6c53725
|
@ -2,7 +2,7 @@
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-main>
|
<el-main>
|
||||||
<div class="boxmain">
|
<div class="boxmain">
|
||||||
<div class="wrapper" :id="'scrollWrapper'+refValue" @mouseover="mouseOver" @mouseout="mouseOut">
|
<div class="wrapper" :id="'scrollWrapper' + refValue" @mouseover="mouseOver" @mouseout="mouseOut">
|
||||||
<table class="totall">
|
<table class="totall">
|
||||||
<tr class="title">
|
<tr class="title">
|
||||||
<th v-for="itemx in titleData" :key="itemx">{{ itemx }}</th>
|
<th v-for="itemx in titleData" :key="itemx">{{ itemx }}</th>
|
||||||
|
@ -11,32 +11,29 @@
|
||||||
<div :id="refValue" :ref="`${refValue}`" style="overflow:scroll">
|
<div :id="refValue" :ref="`${refValue}`" style="overflow:scroll">
|
||||||
<div>
|
<div>
|
||||||
<table :class="{ marquee_top: animate }">
|
<table :class="{ marquee_top: animate }">
|
||||||
<tr v-for="(itemy,index) in rowData" class="rollData" ref="con1" :key="itemy">
|
<tr v-for="(itemy, index) in rowData" class="rollData" ref="con1" :key="itemy">
|
||||||
<td>{{ index+1 }}</td>
|
<td>{{ index + 1 }}</td>
|
||||||
<td v-for="itemz in itemy" :key="itemz">
|
<td v-for="itemz in itemy" :key="itemz">
|
||||||
<el-progress v-if="itemz.elType=='progress'" :text-inside="true" :stroke-width="14" :percentage="itemz.value"
|
<el-progress v-if="itemz.elType == 'progress'" :text-inside="true"
|
||||||
:status="getStatus(itemz.value)"/>
|
:stroke-width="14" :percentage="itemz.value" :status="getStatus(itemz.value)" />
|
||||||
<el-tag v-else-if="itemz.elType=='tag'" :type="getTagType(itemz.value)">{{ stateOption[itemz.value] }}</el-tag>
|
<el-tag v-else-if="itemz.elType == 'tag'" :type="getTagType(itemz.value)">{{
|
||||||
|
stateOption[itemz.value] }}</el-tag>
|
||||||
<span v-else>{{ itemz.value }}</span>
|
<span v-else>{{ itemz.value }}</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<table :class="{ marquee_top: animate }" v-show="scrollVivible">
|
<table :class="{ marquee_top: animate }" v-show="scrollVivible">
|
||||||
<tr v-for="(itemy,index) in rowData" class="rollData" ref="con1" :key="itemy">
|
<tr v-for="(itemy, index) in rowData" class="rollData" ref="con1" :key="itemy">
|
||||||
<td>{{ index+1 }}</td>
|
<td>{{ index + 1 }}</td>
|
||||||
<td v-for="itemz in itemy" :key="itemz">
|
<td v-for="itemz in itemy" :key="itemz">
|
||||||
<!-- <el-progress v-if="itemz.elType=='progress'" :text-inside="true" :stroke-width="14" :percentage="itemz.value"
|
<!-- <el-progress v-if="itemz.elType=='progress'" :text-inside="true" :stroke-width="14" :percentage="itemz.value"
|
||||||
:status="getStatus(itemz.value)"/> -->
|
:status="getStatus(itemz.value)"/> -->
|
||||||
<el-progress
|
<el-progress v-if="itemz.elType == 'progress'" :text-inside="true"
|
||||||
v-if="itemz.elType=='progress'"
|
:stroke-width="16" :percentage="itemz.value" :status="getStatus(itemz.value)">
|
||||||
:text-inside="true"
|
<span>{{ itemz.value }}</span>
|
||||||
:stroke-width="16"
|
</el-progress>
|
||||||
:percentage="itemz.value"
|
<el-tag v-else-if="itemz.elType == 'tag'" :type="getTagType(itemz.value)">{{
|
||||||
:status="getStatus(itemz.value)"
|
stateOption[itemz.value] }}</el-tag>
|
||||||
>
|
|
||||||
<span>{{itemz.value}}</span>
|
|
||||||
</el-progress>
|
|
||||||
<el-tag v-else-if="itemz.elType=='tag'" :type="getTagType(itemz.value)">{{ stateOption[itemz.value] }}</el-tag>
|
|
||||||
<span v-else>{{ itemz.value }}</span>
|
<span v-else>{{ itemz.value }}</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -49,182 +46,195 @@
|
||||||
</el-container>
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
rowData: {
|
rowData: {
|
||||||
type:Array,
|
type: Array,
|
||||||
default () {
|
default() {
|
||||||
return []
|
return []
|
||||||
}
|
|
||||||
},
|
|
||||||
titleData:{
|
|
||||||
type:Array,
|
|
||||||
default () {
|
|
||||||
return []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
tableHeight:{
|
|
||||||
type:Number,
|
|
||||||
default () {
|
|
||||||
return 100
|
|
||||||
}
|
|
||||||
},
|
|
||||||
refValue:{
|
|
||||||
type:String,
|
|
||||||
default(){
|
|
||||||
return ''
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
titleData: {
|
||||||
return {
|
type: Array,
|
||||||
speed: 2000,
|
default() {
|
||||||
myScroll: null,
|
return []
|
||||||
iliHeight: 30,
|
|
||||||
time: null,
|
|
||||||
delay: 20,
|
|
||||||
scrollVivible:true,
|
|
||||||
stateOption:{
|
|
||||||
10: "创建中",
|
|
||||||
14: "已分解",
|
|
||||||
20: "已下达",
|
|
||||||
30:'生产中',
|
|
||||||
40:'已完成',
|
|
||||||
'normal':'正常',
|
|
||||||
'late':'迟到',
|
|
||||||
'未到岗':'未到岗',
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
tableHeight: {
|
||||||
let that = this;
|
type: Number,
|
||||||
let Container =that.tableHeight;
|
default() {
|
||||||
let tableHeight = Container-40;
|
return 100
|
||||||
let idName = 'scrollWrapper'+that.refValue;
|
|
||||||
let idName2 = that.refValue;
|
|
||||||
document.getElementById(idName).style.height = Container+'px';
|
|
||||||
document.getElementById(idName2).style.height = tableHeight+'px';
|
|
||||||
// console.log(this.$refs[`${this.refValue}`])
|
|
||||||
let scrollHeight = that.$refs[`${that.refValue}`].scrollHeight/2;
|
|
||||||
if(tableHeight>scrollHeight){
|
|
||||||
that.scrollVivible = false;
|
|
||||||
}else{
|
|
||||||
that.scrollVivible = true;
|
|
||||||
that.myScroll = setInterval(() => {
|
|
||||||
that.scrollUp();
|
|
||||||
}, that.speed);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
refValue: {
|
||||||
getTagType(type){
|
type: String,
|
||||||
if(type==30||type==10||type==14||type==20){
|
default() {
|
||||||
return ""
|
return ''
|
||||||
}else if(type==40){
|
}
|
||||||
return "success"
|
}
|
||||||
}else if(type=='normal'){
|
},
|
||||||
return "success"
|
data() {
|
||||||
}else if(type=='late'){
|
return {
|
||||||
return "warning"
|
speed: 2000,
|
||||||
}else if(type=='未到岗'){
|
myScroll: null,
|
||||||
return "danger"
|
iliHeight: 30,
|
||||||
}
|
time: null,
|
||||||
},
|
delay: 20,
|
||||||
getStatus(status){
|
scrollVivible: true,
|
||||||
if(status==100){
|
stateOption: {
|
||||||
return "success"
|
10: "创建中",
|
||||||
}else if(status>=80){
|
14: "已分解",
|
||||||
return "primary"
|
20: "已下达",
|
||||||
}else if(status>=60){
|
30: '生产中',
|
||||||
return "warning"
|
40: '已完成',
|
||||||
}else{
|
'normal': '正常',
|
||||||
return "exception"
|
'late': '迟到',
|
||||||
}
|
'未到岗': '未到岗',
|
||||||
},
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
let that = this;
|
||||||
|
let Container = that.tableHeight;
|
||||||
|
let tableHeight = Container - 40;
|
||||||
|
let idName = 'scrollWrapper' + that.refValue;
|
||||||
|
let idName2 = that.refValue;
|
||||||
|
document.getElementById(idName).style.height = Container + 'px';
|
||||||
|
document.getElementById(idName2).style.height = tableHeight + 'px';
|
||||||
|
// console.log(this.$refs[`${this.refValue}`])
|
||||||
|
let scrollHeight = that.$refs[`${that.refValue}`].scrollHeight / 2;
|
||||||
|
if (tableHeight > scrollHeight) {
|
||||||
|
that.scrollVivible = false;
|
||||||
|
} else {
|
||||||
|
that.scrollVivible = true;
|
||||||
|
that.myScroll = setInterval(() => {
|
||||||
|
that.scrollUp();
|
||||||
|
}, that.speed);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getTagType(type) {
|
||||||
|
if (type == 30 || type == 10 || type == 14 || type == 20) {
|
||||||
|
return ""
|
||||||
|
} else if (type == 40) {
|
||||||
|
return "success"
|
||||||
|
} else if (type == 'normal') {
|
||||||
|
return "success"
|
||||||
|
} else if (type == 'late') {
|
||||||
|
return "warning"
|
||||||
|
} else if (type == '未到岗') {
|
||||||
|
return "danger"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getStatus(status) {
|
||||||
|
if (status == 100) {
|
||||||
|
return "success"
|
||||||
|
} else if (status >= 80) {
|
||||||
|
return "primary"
|
||||||
|
} else if (status >= 60) {
|
||||||
|
return "warning"
|
||||||
|
} else {
|
||||||
|
return "exception"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
scrollUp(){
|
scrollUp() {
|
||||||
|
if (this.$refs[`${this.refValue}`] && this.$refs[`${this.refValue}`].scrollTop) {
|
||||||
let scrollTop = this.$refs[`${this.refValue}`].scrollTop;
|
let scrollTop = this.$refs[`${this.refValue}`].scrollTop;
|
||||||
let scrollHeight = this.$refs[`${this.refValue}`].scrollHeight;
|
let scrollHeight = this.$refs[`${this.refValue}`].scrollHeight;
|
||||||
if (scrollTop >=scrollHeight/2) {
|
if (scrollTop >= scrollHeight / 2) {
|
||||||
//判断条件是否达到临界
|
//判断条件是否达到临界
|
||||||
this.$refs[`${this.refValue}`].scrollTop = 0;
|
this.$refs[`${this.refValue}`].scrollTop = 0;
|
||||||
} else {
|
} else {
|
||||||
this.$refs[`${this.refValue}`].scrollTop=scrollTop+40;
|
this.$refs[`${this.refValue}`].scrollTop = scrollTop + 40;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
// 鼠标滑过暂停滚动
|
||||||
|
mouseOver() {
|
||||||
|
clearInterval(this.myScroll);
|
||||||
|
},
|
||||||
|
//鼠标移开重新滚动
|
||||||
|
mouseOut() {
|
||||||
|
this.myScroll = setInterval(() => {
|
||||||
|
this.scrollUp();
|
||||||
},
|
},
|
||||||
// 鼠标滑过暂停滚动
|
|
||||||
mouseOver() {
|
|
||||||
clearInterval(this.myScroll);
|
|
||||||
},
|
|
||||||
//鼠标移开重新滚动
|
|
||||||
mouseOut() {
|
|
||||||
this.myScroll = setInterval(() => {
|
|
||||||
this.scrollUp();
|
|
||||||
},
|
|
||||||
this.speed);
|
this.speed);
|
||||||
},
|
|
||||||
},
|
},
|
||||||
beforeUnmount() {
|
},
|
||||||
let that = this;
|
beforeUnmount() {
|
||||||
clearInterval(that.myScroll1);
|
let that = this;
|
||||||
that.myScroll1 = null;
|
clearInterval(that.myScroll1);
|
||||||
},
|
that.myScroll1 = null;
|
||||||
beforeDestoryed() {
|
},
|
||||||
let that = this;
|
beforeDestoryed() {
|
||||||
clearInterval(that.myScroll1);
|
let that = this;
|
||||||
that.myScroll1 = null;
|
clearInterval(that.myScroll1);
|
||||||
},
|
that.myScroll1 = null;
|
||||||
}
|
},
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.boxmain {
|
.boxmain {
|
||||||
height: calc(100% - 40px);
|
height: calc(100% - 40px);
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 800px) {
|
@media screen and (max-width: 800px) {
|
||||||
.boxmain {
|
.boxmain {
|
||||||
height: 200px;
|
height: 200px;
|
||||||
}
|
|
||||||
}
|
|
||||||
table {
|
|
||||||
width: 100%;
|
|
||||||
text-align: center;
|
|
||||||
border-collapse: collapse;
|
|
||||||
border-spacing: 0;
|
|
||||||
table-layout: fixed;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
.title{
|
|
||||||
height: 40px;
|
|
||||||
line-height: 40px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
table th {
|
|
||||||
font-size: 14px;
|
|
||||||
background: rgba(0, 0, 0, .1);
|
|
||||||
}
|
|
||||||
table td {
|
|
||||||
font-size: 14px;
|
|
||||||
height: 40px;
|
|
||||||
text-align: center;
|
|
||||||
color: rgba(255, 255, 255, .8);
|
|
||||||
}
|
|
||||||
table th,table td{
|
|
||||||
padding: .1rem 0;
|
|
||||||
border-bottom: none !important;
|
|
||||||
background:none !important;
|
|
||||||
}
|
|
||||||
.marquee_top{
|
|
||||||
transition: all 0.5s ease-in-out;
|
|
||||||
margin-top: -26px;
|
|
||||||
}
|
|
||||||
.totall{
|
|
||||||
color: #fff;
|
|
||||||
background-color: rgb(10, 63, 68);
|
|
||||||
}
|
|
||||||
.rollData{
|
|
||||||
background-color: rgb(10, 39, 50);
|
|
||||||
}
|
|
||||||
.rollData:nth-of-type(2n+1){
|
|
||||||
background-color: rgb(0, 59, 81);
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
border-collapse: collapse;
|
||||||
|
border-spacing: 0;
|
||||||
|
table-layout: fixed;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
table th {
|
||||||
|
font-size: 14px;
|
||||||
|
background: rgba(0, 0, 0, .1);
|
||||||
|
}
|
||||||
|
|
||||||
|
table td {
|
||||||
|
font-size: 14px;
|
||||||
|
height: 40px;
|
||||||
|
text-align: center;
|
||||||
|
color: rgba(255, 255, 255, .8);
|
||||||
|
}
|
||||||
|
|
||||||
|
table th,
|
||||||
|
table td {
|
||||||
|
padding: .1rem 0;
|
||||||
|
border-bottom: none !important;
|
||||||
|
background: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.marquee_top {
|
||||||
|
transition: all 0.5s ease-in-out;
|
||||||
|
margin-top: -26px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.totall {
|
||||||
|
color: #fff;
|
||||||
|
background-color: rgb(10, 63, 68);
|
||||||
|
}
|
||||||
|
|
||||||
|
.rollData {
|
||||||
|
background-color: rgb(10, 39, 50);
|
||||||
|
}
|
||||||
|
|
||||||
|
.rollData:nth-of-type(2n+1) {
|
||||||
|
background-color: rgb(0, 59, 81);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
|
@ -2,7 +2,7 @@
|
||||||
<el-container class="dashboard">
|
<el-container class="dashboard">
|
||||||
<el-header class="header">
|
<el-header class="header">
|
||||||
<div style="font-weight: bold; font-family:'myfont';font-size:32px">10车间生产数据看板</div>
|
<div style="font-weight: bold; font-family:'myfont';font-size:32px">10车间生产数据看板</div>
|
||||||
<div style="font-size: 14px;margin-top:18px">{{currentDay}} {{ currentTime }}</div>
|
<div style="font-size: 14px;margin-top:18px">{{ currentDay }} {{ currentTime }}</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main>
|
<el-main>
|
||||||
<el-row style="height: 60%" :gutter="10">
|
<el-row style="height: 60%" :gutter="10">
|
||||||
|
@ -15,10 +15,12 @@
|
||||||
</div>
|
</div>
|
||||||
<div style="height: 4px;"></div>
|
<div style="height: 4px;"></div>
|
||||||
<div class="boxmain bigdata border" style="overflow:scroll">
|
<div class="boxmain bigdata border" style="overflow:scroll">
|
||||||
<div v-for="item in todayMtask" :key="item.id" style="height: 40px;">
|
<div v-for="item in todayMtask" :key="item.id"
|
||||||
<span style="font-size:12px">{{item.material_out_.name}}|{{ item.material_out_.specification }}|{{ item.material_out_.model }}</span>
|
style="height: 40px;line-height: 40px;padding: 0 20px;display: flex;justify-content: space-between;">
|
||||||
<span style="color: #fef000;margin-left: 10px;font-weight:bold;font-family:electronicFont">
|
<span style="font-size:12px">{{ item.material_out_name }}</span>
|
||||||
{{item.count}}
|
<span
|
||||||
|
style="color: #fef000;margin-left: 10px;font-weight:bold;font-family:electronicFont">
|
||||||
|
{{ item.count }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -31,8 +33,10 @@
|
||||||
</div>
|
</div>
|
||||||
<div style="height: 4px;"></div>
|
<div style="height: 4px;"></div>
|
||||||
<div class="boxmain flex_center bigdata border">
|
<div class="boxmain flex_center bigdata border">
|
||||||
<span>{{yesterdayObjet.物料名}}</span>
|
<span>{{ yesterdayObjet.物料名 }}</span>
|
||||||
<span style="color: #fef000;margin-left: 10px;font-weight:bold;font-family:electronicFont">{{yesterdayObjet.合格数}}</span>
|
<span
|
||||||
|
style="color: #fef000;margin-left: 10px;font-weight:bold;font-family:electronicFont">{{
|
||||||
|
yesterdayObjet.合格数 }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -44,9 +48,10 @@
|
||||||
<div style="height: 4px;"></div>
|
<div style="height: 4px;"></div>
|
||||||
<div class="boxmain bigdata border" style="overflow:scroll">
|
<div class="boxmain bigdata border" style="overflow:scroll">
|
||||||
<div v-for="item in monthobjList" :key="item.id" style="height: 40px;">
|
<div v-for="item in monthobjList" :key="item.id" style="height: 40px;">
|
||||||
<span style="font-size:12px">{{item.物料名}}</span>
|
<span style="font-size:12px">{{ item.物料名 }}</span>
|
||||||
<span style="color: #fef000;margin-left: 10px;font-weight:bold;font-family:electronicFont">
|
<span
|
||||||
{{item.合格数}}
|
style="color: #fef000;margin-left: 10px;font-weight:bold;font-family:electronicFont">
|
||||||
|
{{ item.合格数 }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -56,17 +61,16 @@
|
||||||
<div style="height:2%"></div>
|
<div style="height:2%"></div>
|
||||||
<el-row style="height:60%">
|
<el-row style="height:60%">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="boxtitle">
|
<div class="boxtitle">
|
||||||
<div class="boxlabel">人员到岗
|
<div class="boxlabel">人员到岗
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="height: 2px;"></div>
|
|
||||||
<div class="boxmain" id="scrollContainer1">
|
|
||||||
<scScrollTavle v-if="table1Visible" :tableHeight="containerHeight1"
|
|
||||||
:rowData="attendanceData" :titleData="liData1" :refValue="refValue1"
|
|
||||||
></scScrollTavle>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div style="height: 2px;"></div>
|
||||||
|
<div class="boxmain" id="scrollContainer1">
|
||||||
|
<scScrollTavle v-if="table1Visible" :tableHeight="containerHeight1"
|
||||||
|
:rowData="attendanceData" :titleData="liData1" :refValue="refValue1"></scScrollTavle>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :md="14" style="height: 100%;">
|
<el-col :xs="24" :md="14" style="height: 100%;">
|
||||||
|
@ -76,8 +80,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div style="height: 2px;"></div>
|
<div style="height: 2px;"></div>
|
||||||
<div class="boxmain" id="scrollContainer2">
|
<div class="boxmain" id="scrollContainer2">
|
||||||
<scScrollTavle v-if="table2Visible" :tableHeight="containerHeight2"
|
<scScrollTavle v-if="table2Visible" :tableHeight="containerHeight2" :rowData="processData"
|
||||||
:rowData="processData" :titleData="liData2" :refValue="refValue2"></scScrollTavle>
|
:titleData="liData2" :refValue="refValue2"></scScrollTavle>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -119,12 +123,12 @@
|
||||||
<script>
|
<script>
|
||||||
import * as echarts from "echarts";
|
import * as echarts from "echarts";
|
||||||
import scScrollTavle from '@/components/scScrollTable.vue';
|
import scScrollTavle from '@/components/scScrollTable.vue';
|
||||||
const xAxisData1 = ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'];
|
const xAxisData1 = ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'];
|
||||||
function deepCopy(obj) {
|
function deepCopy(obj) {
|
||||||
return JSON.parse(JSON.stringify(obj));
|
return JSON.parse(JSON.stringify(obj));
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
components: {scScrollTavle},
|
components: { scScrollTavle },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
basicOption: {
|
basicOption: {
|
||||||
|
@ -149,7 +153,7 @@ export default {
|
||||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||||
{
|
{
|
||||||
offset: 0,
|
offset: 0,
|
||||||
color: 'rgb(250,205,0)'
|
color: 'rgb(250,205,0)'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
offset: 1,
|
offset: 1,
|
||||||
|
@ -225,7 +229,7 @@ export default {
|
||||||
label: {
|
label: {
|
||||||
show: true,
|
show: true,
|
||||||
position: 'insideTop',
|
position: 'insideTop',
|
||||||
color:'#000'
|
color: '#000'
|
||||||
},
|
},
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
borderRadius: [5, 5, 0, 0],
|
borderRadius: [5, 5, 0, 0],
|
||||||
|
@ -244,13 +248,13 @@ export default {
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
chart3Option:{
|
chart3Option: {
|
||||||
backgroundColor: '',
|
backgroundColor: '',
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'item'
|
trigger: 'item'
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
top:'bottom',
|
top: 'bottom',
|
||||||
},
|
},
|
||||||
series: {
|
series: {
|
||||||
name: '完成率',
|
name: '完成率',
|
||||||
|
@ -263,46 +267,46 @@ export default {
|
||||||
data: [],
|
data: [],
|
||||||
emphasis: {
|
emphasis: {
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
shadowBlur: 10,
|
shadowBlur: 10,
|
||||||
shadowOffsetX: 0,
|
shadowOffsetX: 0,
|
||||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
containerHeight1:100,
|
containerHeight1: 100,
|
||||||
containerHeight2:100,
|
containerHeight2: 100,
|
||||||
table1Visible:false,
|
table1Visible: false,
|
||||||
table2Visible:false,
|
table2Visible: false,
|
||||||
refValue1:'moocBox1',
|
refValue1: 'moocBox1',
|
||||||
refValue2:'moocBox2',
|
refValue2: 'moocBox2',
|
||||||
liData1: ['序号','姓名', '岗位', '班次', '状态'],
|
liData1: ['序号', '姓名', '岗位', '班次', '状态'],
|
||||||
attendanceData:[],
|
attendanceData: [],
|
||||||
liData2: ['序号','产品名称', '型号', '计划开始时间', '计划结束时间','完成进度', '产量','状态'],
|
liData2: ['序号', '产品名称', '型号', '计划开始时间', '计划结束时间', '完成进度', '产量', '状态'],
|
||||||
processData: [],
|
processData: [],
|
||||||
todayMtask:[],
|
todayMtask: [],
|
||||||
speed: 2000,
|
speed: 2000,
|
||||||
myScroll: null,
|
myScroll: null,
|
||||||
iliHeight: 30,
|
iliHeight: 30,
|
||||||
time: null,
|
time: null,
|
||||||
delay: 20,
|
delay: 20,
|
||||||
start_date:'',
|
start_date: '',
|
||||||
end_date:'',
|
end_date: '',
|
||||||
yesterday:'',
|
yesterday: '',
|
||||||
dayInterval:null,
|
dayInterval: null,
|
||||||
chartInterval1: null,
|
chartInterval1: null,
|
||||||
chartInterval2: null,
|
chartInterval2: null,
|
||||||
chartInterval3: null,
|
chartInterval3: null,
|
||||||
stateOption:{
|
stateOption: {
|
||||||
30:'生产中',
|
30: '生产中',
|
||||||
40:'已完成'
|
40: '已完成'
|
||||||
},
|
},
|
||||||
currentTime:'',
|
currentTime: '',
|
||||||
currentDay:'',
|
currentDay: '',
|
||||||
today:'',
|
today: '',
|
||||||
todayObjet:{},
|
todayObjet: {},
|
||||||
yesterdayObjet:{},
|
yesterdayObjet: {},
|
||||||
monthobjList:[],
|
monthobjList: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -314,30 +318,30 @@ export default {
|
||||||
this.table2Visible = true;
|
this.table2Visible = true;
|
||||||
|
|
||||||
this.showTime()
|
this.showTime()
|
||||||
this.dayInterval = setInterval(()=>{
|
this.dayInterval = setInterval(() => {
|
||||||
this.showTime()
|
this.showTime()
|
||||||
},1000)
|
}, 1000)
|
||||||
let date = new Date();
|
let date = new Date();
|
||||||
let year = date.getFullYear();
|
let year = date.getFullYear();
|
||||||
let month = date.getMonth()+1;
|
let month = date.getMonth() + 1;
|
||||||
let day = date.getDate();
|
let day = date.getDate();
|
||||||
let days = new Date(year, month, 0).getDate();
|
let days = new Date(year, month, 0).getDate();
|
||||||
this.days = days;
|
this.days = days;
|
||||||
this.currentYear = year;
|
this.currentYear = year;
|
||||||
this.currentMonth = month;
|
this.currentMonth = month;
|
||||||
this.currentDay = day;
|
this.currentDay = day;
|
||||||
this.start_date =year+'-'+month+'-01';
|
this.start_date = year + '-' + month + '-01';
|
||||||
this.end_date = year+'-'+month+'-'+new Date(year, month, 0).getDate();
|
this.end_date = year + '-' + month + '-' + new Date(year, month, 0).getDate();
|
||||||
this.today = year+'-'+month+'-'+day;
|
this.today = year + '-' + month + '-' + day;
|
||||||
let yesterday = new Date(date.getTime()-24*60*60*1000);
|
let yesterday = new Date(date.getTime() - 24 * 60 * 60 * 1000);
|
||||||
this.yesterday = yesterday.getFullYear()+"-" + (yesterday.getMonth()+1) + "-" + yesterday.getDate();
|
this.yesterday = yesterday.getFullYear() + "-" + (yesterday.getMonth() + 1) + "-" + yesterday.getDate();
|
||||||
this.getMtask();
|
this.getMtask();
|
||||||
this.getAttendance();
|
this.getAttendance();
|
||||||
this.getProductLine();
|
this.getProductLine();
|
||||||
this.getTodayMtask();
|
this.getTodayMtask();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showTime(){
|
showTime() {
|
||||||
this.currentTime = this.$TOOL.dateFormat(new Date(), 'hh:mm:ss')
|
this.currentTime = this.$TOOL.dateFormat(new Date(), 'hh:mm:ss')
|
||||||
this.currentDay = this.$TOOL.dateFormat(new Date(), 'yyyy年MM月dd日')
|
this.currentDay = this.$TOOL.dateFormat(new Date(), 'yyyy年MM月dd日')
|
||||||
},
|
},
|
||||||
|
@ -359,17 +363,17 @@ export default {
|
||||||
return myChart
|
return myChart
|
||||||
},
|
},
|
||||||
//到岗记录
|
//到岗记录
|
||||||
getAttendance(){
|
getAttendance() {
|
||||||
let that = this;
|
let that = this;
|
||||||
let obj ={};
|
let obj = {};
|
||||||
obj.work_date = this.currentYear+'-'+this.currentMonth+'-'+this.currentDay;
|
obj.work_date = this.currentYear + '-' + this.currentMonth + '-' + this.currentDay;
|
||||||
// obj.work_date = '2023-11-24';
|
// obj.work_date = '2023-11-24';
|
||||||
obj.page=0;
|
obj.page = 0;
|
||||||
that.$API.hrm.attendance.list.req(obj).then((res) => {
|
that.$API.hrm.attendance.list.req(obj).then((res) => {
|
||||||
console.log('到岗记录:',res);
|
console.log('到岗记录:', res);
|
||||||
let attendanceData = [];
|
let attendanceData = [];
|
||||||
res.forEach(item => {
|
res.forEach(item => {
|
||||||
let arr = [],obj1 = {},obj2 = {},obj3 = {},obj4 = {};
|
let arr = [], obj1 = {}, obj2 = {}, obj3 = {}, obj4 = {};
|
||||||
obj1.elType = 'primary';
|
obj1.elType = 'primary';
|
||||||
obj1.value = item.user_name;
|
obj1.value = item.user_name;
|
||||||
obj2.elType = 'primary';
|
obj2.elType = 'primary';
|
||||||
|
@ -390,18 +394,18 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//任务进度
|
//任务进度
|
||||||
getMtask(){
|
getMtask() {
|
||||||
let that = this;
|
let that = this;
|
||||||
let obj ={};
|
let obj = {};
|
||||||
obj.start_date__gte = this.start_date;
|
obj.start_date__gte = this.start_date;
|
||||||
obj.end_date__lte = this.end_date;
|
obj.end_date__lte = this.end_date;
|
||||||
obj.belong_dept__name='10车间';
|
obj.belong_dept__name = '10车间';
|
||||||
obj.page=0;
|
obj.page = 0;
|
||||||
that.$API.pm.utask.list.req(obj).then((res) => {
|
that.$API.pm.utask.list.req(obj).then((res) => {
|
||||||
console.log('任务进度:',res);
|
console.log('任务进度:', res);
|
||||||
let processData = [];
|
let processData = [];
|
||||||
res.forEach(item => {
|
res.forEach(item => {
|
||||||
let arr = [],obj1 = {},obj2 = {},obj3 = {},obj4 = {},obj5 = {},obj6 = {},obj7 = {};
|
let arr = [], obj1 = {}, obj2 = {}, obj3 = {}, obj4 = {}, obj5 = {}, obj6 = {}, obj7 = {};
|
||||||
obj1.elType = 'primary';
|
obj1.elType = 'primary';
|
||||||
obj1.value = item.material_.name;
|
obj1.value = item.material_.name;
|
||||||
obj2.elType = 'primary';
|
obj2.elType = 'primary';
|
||||||
|
@ -411,7 +415,7 @@ export default {
|
||||||
obj4.elType = 'primary';
|
obj4.elType = 'primary';
|
||||||
obj4.value = item.end_date;
|
obj4.value = item.end_date;
|
||||||
obj5.elType = 'progress';
|
obj5.elType = 'progress';
|
||||||
let process = Math.round((item.count_ok/item.count)*100)
|
let process = Math.round((item.count_ok / item.count) * 100)
|
||||||
obj5.value = process;
|
obj5.value = process;
|
||||||
obj6.elType = 'primary';
|
obj6.elType = 'primary';
|
||||||
obj6.value = item.count_ok;
|
obj6.value = item.count_ok;
|
||||||
|
@ -432,25 +436,25 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//生产线
|
//生产线
|
||||||
getProductLine(){
|
getProductLine() {
|
||||||
let that = this;
|
let that = this;
|
||||||
//全年生产统计 1月1号-----12月1号
|
//全年生产统计 1月1号-----12月1号
|
||||||
let obj1 ={
|
let obj1 = {
|
||||||
query: {start_date:that.currentYear+'-01-01',end_date:that.currentYear+'-12-31',dept_name: "10车间"},
|
query: { start_date: that.currentYear + '-01-01', end_date: that.currentYear + '-12-31', dept_name: "10车间" },
|
||||||
};
|
};
|
||||||
that.$API.bi.dataset.exec.req('lineMonth', obj1).then((res1) => {
|
that.$API.bi.dataset.exec.req('lineMonth', obj1).then((res1) => {
|
||||||
console.log('全年生产统计:',res1);
|
console.log('全年生产统计:', res1);
|
||||||
let list1 = res1.data2.ds0;
|
let list1 = res1.data2.ds0;
|
||||||
let seriesData1 = [],xAxisData1=[];
|
let seriesData1 = [], xAxisData1 = [];
|
||||||
for (let i = 0; i < 12; i++) {
|
for (let i = 0; i < 12; i++) {
|
||||||
let day = i+1;
|
let day = i + 1;
|
||||||
let text = day+'月';
|
let text = day + '月';
|
||||||
xAxisData1[i]=text;
|
xAxisData1[i] = text;
|
||||||
seriesData1[i] = 0;
|
seriesData1[i] = 0;
|
||||||
}
|
}
|
||||||
if(list1.length>0){
|
if (list1.length > 0) {
|
||||||
list1.forEach(item1=>{
|
list1.forEach(item1 => {
|
||||||
let index1 = item1.月-1;
|
let index1 = item1.月 - 1;
|
||||||
seriesData1[index1] = item1.合格数;
|
seriesData1[index1] = item1.合格数;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -471,34 +475,34 @@ export default {
|
||||||
}
|
}
|
||||||
}, 3000);
|
}, 3000);
|
||||||
});
|
});
|
||||||
let obj ={
|
let obj = {
|
||||||
query: {start_date:that.start_date,end_date:that.end_date,dept_name: "10车间"},
|
query: { start_date: that.start_date, end_date: that.end_date, dept_name: "10车间" },
|
||||||
};
|
};
|
||||||
that.$API.bi.dataset.exec.req('lineMonth', obj).then((res) => {
|
that.$API.bi.dataset.exec.req('lineMonth', obj).then((res) => {
|
||||||
console.log('本月生产统计:',res);
|
console.log('本月生产统计:', res);
|
||||||
that.monthobjList = res.data2.ds0;
|
that.monthobjList = res.data2.ds0;
|
||||||
});
|
});
|
||||||
//本月合格率统计///11月1号-----11月30号
|
//本月合格率统计///11月1号-----11月30号
|
||||||
let obj2 ={
|
let obj2 = {
|
||||||
query: {start_date:that.start_date,end_date:that.end_date,dept_name: "10车间"},
|
query: { start_date: that.start_date, end_date: that.end_date, dept_name: "10车间" },
|
||||||
};
|
};
|
||||||
that.$API.bi.dataset.exec.req('lineDay', obj2).then((res2) => {
|
that.$API.bi.dataset.exec.req('lineDay', obj2).then((res2) => {
|
||||||
console.log('本月合格率统计:',res2);
|
console.log('本月合格率统计:', res2);
|
||||||
let list2 = res2.data2.ds0;
|
let list2 = res2.data2.ds0;
|
||||||
let seriesData2 = [],xAxisData2=[];
|
let seriesData2 = [], xAxisData2 = [];
|
||||||
for (let i = 0; i < that.days; i++) {
|
for (let i = 0; i < that.days; i++) {
|
||||||
let day = i+1;
|
let day = i + 1;
|
||||||
let text = day+'日';
|
let text = day + '日';
|
||||||
xAxisData2[i]=text;
|
xAxisData2[i] = text;
|
||||||
seriesData2[i] = 0;
|
seriesData2[i] = 0;
|
||||||
}
|
}
|
||||||
if(list2.length>0){
|
if (list2.length > 0) {
|
||||||
list2.forEach(item2=>{
|
list2.forEach(item2 => {
|
||||||
let index2 = item2.日-1;
|
let index2 = item2.日 - 1;
|
||||||
seriesData2[index2] =Math.round(item2.合格率) ;
|
seriesData2[index2] = Math.round(item2.合格率);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
console.log('xAxisData2',xAxisData2)
|
console.log('xAxisData2', xAxisData2)
|
||||||
let chart2Option = deepCopy(this.basicOption);
|
let chart2Option = deepCopy(this.basicOption);
|
||||||
chart2Option.xAxis.data = xAxisData2;
|
chart2Option.xAxis.data = xAxisData2;
|
||||||
// chart2Option.yAxis.name='合格率';
|
// chart2Option.yAxis.name='合格率';
|
||||||
|
@ -525,7 +529,7 @@ export default {
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
};
|
};
|
||||||
let series2=[{
|
let series2 = [{
|
||||||
name: '合格率',
|
name: '合格率',
|
||||||
type: 'line',
|
type: 'line',
|
||||||
smooth: true,
|
smooth: true,
|
||||||
|
@ -552,24 +556,24 @@ export default {
|
||||||
label: {
|
label: {
|
||||||
show: true,
|
show: true,
|
||||||
position: 'top',
|
position: 'top',
|
||||||
color:'#fff'
|
color: '#fff'
|
||||||
},
|
},
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
borderRadius: [2, 2, 0, 0],
|
borderRadius: [2, 2, 0, 0],
|
||||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||||
{
|
{
|
||||||
offset: 0,
|
offset: 0,
|
||||||
color: 'rgb(250,205,0)'
|
color: 'rgb(250,205,0)'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
offset: 1,
|
offset: 1,
|
||||||
color: 'rgb(254,129,0)'
|
color: 'rgb(254,129,0)'
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
},
|
},
|
||||||
data: seriesData2
|
data: seriesData2
|
||||||
}];
|
}];
|
||||||
chart2Option.series=series2;
|
chart2Option.series = series2;
|
||||||
let chart2 = this.setChart("chart2", chart2Option);
|
let chart2 = this.setChart("chart2", chart2Option);
|
||||||
let index2 = 0
|
let index2 = 0
|
||||||
this.chartInterval2 = setInterval(function () {
|
this.chartInterval2 = setInterval(function () {
|
||||||
|
@ -585,30 +589,30 @@ export default {
|
||||||
});
|
});
|
||||||
|
|
||||||
//车间生产昨日统计 12月1号
|
//车间生产昨日统计 12月1号
|
||||||
let obj3 ={
|
let obj3 = {
|
||||||
query: {start_date:that.yesterday,end_date:that.yesterday,dept_name: "10车间"},
|
query: { start_date: that.yesterday, end_date: that.yesterday, dept_name: "10车间" },
|
||||||
};
|
};
|
||||||
that.$API.bi.dataset.exec.req('lineDay', obj3).then((res3) => {
|
that.$API.bi.dataset.exec.req('lineDay', obj3).then((res3) => {
|
||||||
console.log('车间生产昨日统计:',res3);
|
console.log('车间生产昨日统计:', res3);
|
||||||
let seriesData3 = [
|
let seriesData3 = [
|
||||||
{ value: 0, name: '椭圆弯曲' },
|
{ value: 0, name: '椭圆弯曲' },
|
||||||
{ value: 0, name: '大小头' },
|
{ value: 0, name: '大小头' },
|
||||||
{ value: 0, name: '偏壁' },
|
{ value: 0, name: '偏壁' },
|
||||||
{ value: 0, name: '结石' },
|
{ value: 0, name: '结石' },
|
||||||
{ value: 0, name: '气线' },
|
{ value: 0, name: '气线' },
|
||||||
{ value: 0, name: '合格' },
|
{ value: 0, name: '合格' },
|
||||||
]
|
]
|
||||||
if(res3.data2.ds0.length>0){
|
if (res3.data2.ds0.length > 0) {
|
||||||
let item3 = res3.data2.ds0[0];
|
let item3 = res3.data2.ds0[0];
|
||||||
that.yesterdayObjet = item3;
|
that.yesterdayObjet = item3;
|
||||||
seriesData3[0].value=item3.弯曲;
|
seriesData3[0].value = item3.弯曲;
|
||||||
seriesData3[1].value=item3.大小头;
|
seriesData3[1].value = item3.大小头;
|
||||||
seriesData3[2].value=item3.偏壁;
|
seriesData3[2].value = item3.偏壁;
|
||||||
seriesData3[3].value=item3.结石;
|
seriesData3[3].value = item3.结石;
|
||||||
seriesData3[4].value=item3.气线;
|
seriesData3[4].value = item3.气线;
|
||||||
seriesData3[5].value=item3.合格数;
|
seriesData3[5].value = item3.合格数;
|
||||||
}
|
}
|
||||||
that.chart3Option.series.data = seriesData3;
|
that.chart3Option.series.data = seriesData3;
|
||||||
let chart3 = this.setChart("chart3", that.chart3Option);
|
let chart3 = this.setChart("chart3", that.chart3Option);
|
||||||
let index3 = 0
|
let index3 = 0
|
||||||
this.chartInterval3 = setInterval(function () {
|
this.chartInterval3 = setInterval(function () {
|
||||||
|
@ -626,16 +630,16 @@ export default {
|
||||||
|
|
||||||
},
|
},
|
||||||
//今日任务
|
//今日任务
|
||||||
getTodayMtask(){
|
getTodayMtask() {
|
||||||
let that = this;
|
let that = this;
|
||||||
let obj ={};
|
let obj = {};
|
||||||
obj.start_date = this.today;
|
obj.start_date = this.today;
|
||||||
obj.end_date = this.today;
|
obj.end_date = this.today;
|
||||||
obj.belong_dept__name='10车间';
|
obj.mgroup__belong_dept__name = '10车间';
|
||||||
obj.page=0;
|
obj.page = 0;
|
||||||
that.$API.pm.mtask.list.req(obj).then((res) => {
|
that.$API.pm.mtask.list.req(obj).then((res) => {
|
||||||
that.todayMtask=res;
|
that.todayMtask = res;
|
||||||
console.log('今日任务:',res);
|
console.log('今日任务:', res);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//累计合计
|
//累计合计
|
||||||
|
@ -643,88 +647,102 @@ export default {
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'myfont'; /* 字体名称 */
|
font-family: 'myfont';
|
||||||
src: url('../../utils/youShe.ttf'); /* 字体文件相对路径 */
|
/* 字体名称 */
|
||||||
}
|
src: url('../../utils/youShe.ttf');
|
||||||
.dashboard {
|
/* 字体文件相对路径 */
|
||||||
background-image: url("/public/img/photon_bg.png");
|
}
|
||||||
color: #fff;
|
|
||||||
font-family: "Microsoft Yahei" !important;
|
|
||||||
background-size: cover;
|
|
||||||
}
|
|
||||||
.header {
|
|
||||||
background: url("/public/img/photon_header.png");
|
|
||||||
border-bottom: none;
|
|
||||||
background-size: 100% 100%;
|
|
||||||
font-size: 26px;
|
|
||||||
display: block;
|
|
||||||
height: 80px;
|
|
||||||
color: rgb(149, 255, 255);
|
|
||||||
font-family: 'Microsoft Yahei';
|
|
||||||
text-align: center;
|
|
||||||
padding: 12px 0px;
|
|
||||||
}
|
|
||||||
.box {
|
|
||||||
background: rgba(10, 63, 68, 0.5);
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
.boxtitle {
|
|
||||||
color: #fff;
|
|
||||||
font-size: 16px;
|
|
||||||
display: flex;
|
|
||||||
height: 36px;
|
|
||||||
background: linear-gradient(40deg, rgba(11, 101, 140, 0.451), rgba(0, 34, 48, 0.335), rgba(11, 101, 140, 0.451));
|
|
||||||
}
|
|
||||||
.bgimg {
|
|
||||||
background-image: url('https://cdn-upload.datav.aliyun.com/upload/download/1678762309227-E6RP8z2R.png');
|
|
||||||
background-size: 140% 100%;
|
|
||||||
}
|
|
||||||
.boxlabel {
|
|
||||||
margin-left: 6px;
|
|
||||||
font-size: 18px;
|
|
||||||
margin-top: 6px
|
|
||||||
}
|
|
||||||
|
|
||||||
|
.dashboard {
|
||||||
|
background-image: url("/public/img/photon_bg.png");
|
||||||
|
color: #fff;
|
||||||
|
font-family: "Microsoft Yahei" !important;
|
||||||
|
background-size: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
background: url("/public/img/photon_header.png");
|
||||||
|
border-bottom: none;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
font-size: 26px;
|
||||||
|
display: block;
|
||||||
|
height: 80px;
|
||||||
|
color: rgb(149, 255, 255);
|
||||||
|
font-family: 'Microsoft Yahei';
|
||||||
|
text-align: center;
|
||||||
|
padding: 12px 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box {
|
||||||
|
background: rgba(10, 63, 68, 0.5);
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.boxtitle {
|
||||||
|
color: #fff;
|
||||||
|
font-size: 16px;
|
||||||
|
display: flex;
|
||||||
|
height: 36px;
|
||||||
|
background: linear-gradient(40deg, rgba(11, 101, 140, 0.451), rgba(0, 34, 48, 0.335), rgba(11, 101, 140, 0.451));
|
||||||
|
}
|
||||||
|
|
||||||
|
.bgimg {
|
||||||
|
background-image: url('https://cdn-upload.datav.aliyun.com/upload/download/1678762309227-E6RP8z2R.png');
|
||||||
|
background-size: 140% 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.boxlabel {
|
||||||
|
margin-left: 6px;
|
||||||
|
font-size: 18px;
|
||||||
|
margin-top: 6px
|
||||||
|
}
|
||||||
|
|
||||||
|
.boxmain {
|
||||||
|
height: calc(100% - 40px);
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 800px) {
|
||||||
.boxmain {
|
.boxmain {
|
||||||
height: calc(100% - 40px);
|
height: 200px;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 800px) {
|
.flex_center {
|
||||||
.boxmain {
|
display: flex;
|
||||||
height: 200px;
|
align-items: center;
|
||||||
}
|
justify-content: center
|
||||||
}
|
}
|
||||||
.flex_center {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center
|
|
||||||
}
|
|
||||||
.border {
|
|
||||||
border: 1px dashed #49bcf7;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bigdata {
|
.border {
|
||||||
font-size: 24px;
|
border: 1px dashed #49bcf7;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title{
|
.bigdata {
|
||||||
height: 40px;
|
font-size: 24px;
|
||||||
line-height: 40px;
|
}
|
||||||
text-align: center;
|
|
||||||
}
|
.title {
|
||||||
.marquee_top{
|
height: 40px;
|
||||||
transition: all 0.5s ease-in-out;
|
line-height: 40px;
|
||||||
margin-top: -26px;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.totall{
|
|
||||||
color: #fff;
|
.marquee_top {
|
||||||
background-color: rgb(10, 63, 68);
|
transition: all 0.5s ease-in-out;
|
||||||
}
|
margin-top: -26px;
|
||||||
.rollData{
|
}
|
||||||
background-color: rgb(10, 39, 50);
|
|
||||||
}
|
.totall {
|
||||||
.rollData:nth-of-type(2n+1){
|
color: #fff;
|
||||||
background-color: rgb(0, 59, 81);
|
background-color: rgb(10, 63, 68);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.rollData {
|
||||||
|
background-color: rgb(10, 39, 50);
|
||||||
|
}
|
||||||
|
|
||||||
|
.rollData:nth-of-type(2n+1) {
|
||||||
|
background-color: rgb(0, 59, 81);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
|
@ -2,7 +2,7 @@
|
||||||
<el-container class="dashboard">
|
<el-container class="dashboard">
|
||||||
<el-header class="header">
|
<el-header class="header">
|
||||||
<div style="font-weight: bold; font-family:'myfont';font-size:32px">6车间生产数据大看板</div>
|
<div style="font-weight: bold; font-family:'myfont';font-size:32px">6车间生产数据大看板</div>
|
||||||
<div style="font-size: 14px;margin-top:18px">{{currentDay}} {{ currentTime }}</div>
|
<div style="font-size: 14px;margin-top:18px">{{ currentDay }} {{ currentTime }}</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main>
|
<el-main>
|
||||||
<el-row style="height: 60%" :gutter="10">
|
<el-row style="height: 60%" :gutter="10">
|
||||||
|
@ -14,11 +14,17 @@
|
||||||
</div>
|
</div>
|
||||||
<div style="height: 4px;"></div>
|
<div style="height: 4px;"></div>
|
||||||
<div class="boxmain bigdata border" style="overflow:scroll">
|
<div class="boxmain bigdata border" style="overflow:scroll">
|
||||||
<div v-for="item in todayUtask" :key="item.id" style="width:50%;display:inline-block; height: 40px;">
|
<div v-for="item in todayMtask" :key="item.id"
|
||||||
<span style="font-size:12px">{{item.number}}</span>
|
style="width:50%;display:inline-block;height: 40px;line-height:40px;padding:0 20px;">
|
||||||
<span style="color: #fef000;margin-left: 10px;font-weight:bold;font-family:electronicFont">
|
<div
|
||||||
{{item.count}}
|
style="display:flex;justify-content:space-between;border-bottom:1px dashed #eeeeee">
|
||||||
</span>
|
<span style="font-size:12px">{{ item.material_out_name }}</span>
|
||||||
|
<span
|
||||||
|
style="color: #fef000;margin-left: 10px;font-weight:bold;font-family:electronicFont">
|
||||||
|
{{ item.count }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -33,8 +39,7 @@
|
||||||
<div style="height: 4px;"></div>
|
<div style="height: 4px;"></div>
|
||||||
<div class="boxmain" id="scrollContainer1">
|
<div class="boxmain" id="scrollContainer1">
|
||||||
<scScrollTavle v-if="table1Visible" :tableHeight="containerHeight1"
|
<scScrollTavle v-if="table1Visible" :tableHeight="containerHeight1"
|
||||||
:rowData="saleOutData" :titleData="liData1" :refValue="refValue1"
|
:rowData="saleOutData" :titleData="liData1" :refValue="refValue1"></scScrollTavle>
|
||||||
></scScrollTavle>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -47,9 +52,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div style="height: 4px;"></div>
|
<div style="height: 4px;"></div>
|
||||||
<div class="boxmain" id="scrollContainer2">
|
<div class="boxmain" id="scrollContainer2">
|
||||||
<scScrollTavle v-if="table2Visible" :tableHeight="containerHeight2"
|
<scScrollTavle v-if="table2Visible" :tableHeight="containerHeight2" :rowData="processData"
|
||||||
:rowData="processData" :titleData="liData2" :refValue="refValue2"
|
:titleData="liData2" :refValue="refValue2"></scScrollTavle>
|
||||||
></scScrollTavle>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -85,7 +89,7 @@ function deepCopy(obj) {
|
||||||
return JSON.parse(JSON.stringify(obj));
|
return JSON.parse(JSON.stringify(obj));
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
components: {scScrollTavle},
|
components: { scScrollTavle },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
basicOption: {
|
basicOption: {
|
||||||
|
@ -153,7 +157,7 @@ export default {
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
boundaryGap: true,
|
boundaryGap: true,
|
||||||
data: ['1日','2日', '3日', '4日', '5日', '6日', '7日', '8日','9日','10日', '11日', '12日', '13日', '14日', '15日', '16日', '17日', '18日','19日','20日', '21日', '22日', '23日', '24日', '25日', '26日', '27日', '28日', '29日', '30日'],
|
data: ['1日', '2日', '3日', '4日', '5日', '6日', '7日', '8日', '9日', '10日', '11日', '12日', '13日', '14日', '15日', '16日', '17日', '18日', '19日', '20日', '21日', '22日', '23日', '24日', '25日', '26日', '27日', '28日', '29日', '30日'],
|
||||||
nameTextStyle: {
|
nameTextStyle: {
|
||||||
color: '#ffffff'
|
color: '#ffffff'
|
||||||
},
|
},
|
||||||
|
@ -222,7 +226,7 @@ export default {
|
||||||
label: {
|
label: {
|
||||||
show: true,
|
show: true,
|
||||||
position: 'insideTop',
|
position: 'insideTop',
|
||||||
color:'#666'
|
color: '#666'
|
||||||
},
|
},
|
||||||
data: []
|
data: []
|
||||||
},
|
},
|
||||||
|
@ -267,35 +271,40 @@ export default {
|
||||||
label: {
|
label: {
|
||||||
show: true,
|
show: true,
|
||||||
position: 'insideTop',
|
position: 'insideTop',
|
||||||
color:'#666',
|
color: '#666',
|
||||||
font:'10'
|
font: '10'
|
||||||
},
|
},
|
||||||
data:[]
|
data: []
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
containerHeight1:100,
|
containerHeight1: 100,
|
||||||
containerHeight2:100,
|
containerHeight2: 100,
|
||||||
table1Visible:false,
|
table1Visible: false,
|
||||||
table2Visible:false,
|
table2Visible: false,
|
||||||
refValue1:'moocBox1',
|
refValue1: 'moocBox1',
|
||||||
refValue2:'moocBox2',
|
refValue2: 'moocBox2',
|
||||||
liData1: ['序号','日期','名称', '型号', '规格', '发货数量'],
|
liData1: ['序号', '日期', '名称', '型号', '规格', '发货数量'],
|
||||||
liData2: ['序号','工序','产品名称', '型号', '计划数量', '合格数量', '完成进度', '合格率'],
|
liData2: ['序号', '工序', '产品名称', '型号', '计划数量', '合格数量', '完成进度', '合格率'],
|
||||||
todayUtask:[],
|
todayMtask: [
|
||||||
saleOutData:[],
|
{ material_out_name: '光纤预制棒|33*470|ZJ2|棒料成型', count: 300 },
|
||||||
processData:[],
|
{ material_out_name: '光纤预制棒|33*470|ZJ2|棒料成型', count: 300 },
|
||||||
|
{ material_out_name: '光纤预制棒|33*470|ZJ2|棒料成型', count: 300 },
|
||||||
|
{ material_out_name: '光纤预制棒|33*470|ZJ2|棒料成型', count: 300 },
|
||||||
|
],
|
||||||
|
saleOutData: [],
|
||||||
|
processData: [],
|
||||||
time: null,
|
time: null,
|
||||||
start_date:'',
|
start_date: '',
|
||||||
end_date:'',
|
end_date: '',
|
||||||
scrollVivible:true,
|
scrollVivible: true,
|
||||||
dayInterval:null,
|
dayInterval: null,
|
||||||
chartInterval1:null,
|
chartInterval1: null,
|
||||||
chartInterval2:null,
|
chartInterval2: null,
|
||||||
currentTime:'',
|
currentTime: '',
|
||||||
currentDay:'',
|
currentDay: '',
|
||||||
weekFirst:'',
|
weekFirst: '',
|
||||||
weekLast:'',
|
weekLast: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -309,38 +318,46 @@ export default {
|
||||||
const ondDayTime = 86400000;
|
const ondDayTime = 86400000;
|
||||||
let date = new Date();
|
let date = new Date();
|
||||||
let year = date.getFullYear();
|
let year = date.getFullYear();
|
||||||
let month = date.getMonth()+1;
|
let month = date.getMonth() + 1;
|
||||||
let day = date.getDate();
|
let day = date.getDate();
|
||||||
let days = new Date(year, month, 0).getDate();
|
let days = new Date(year, month, 0).getDate();
|
||||||
this.days = days;
|
this.days = days;
|
||||||
let start_date = year+'-'+month+'-01';
|
let start_date = year + '-' + month + '-01';
|
||||||
let lastDay = new Date(year, month, 0).getDate();
|
let lastDay = new Date(year, month, 0).getDate();
|
||||||
let end_date = year+'-'+month+'-'+lastDay;
|
let end_date = year + '-' + month + '-' + lastDay;
|
||||||
this.start_date = start_date;
|
this.start_date = start_date;
|
||||||
this.end_date = end_date;
|
this.end_date = end_date;
|
||||||
this.today = year+'-'+month+'-'+day;
|
this.today = year + '-' + month + '-' + day;
|
||||||
// let yesterday = new Date(date.getTime()-24*60*60*1000);
|
let yesterday = new Date(date.getTime() - 24 * 60 * 60 * 1000);
|
||||||
// this.yesterday = yesterday.getFullYear()+"-" + (yesterday.getMonth()+1) + "-" + yesterday.getDate();
|
this.yesterday = yesterday.getFullYear() + "-" + (yesterday.getMonth() + 1) + "-" + yesterday.getDate();
|
||||||
let week = date.getDay();//当前时间的week数
|
let week = yesterday.getDay();//当前时间的week数
|
||||||
|
console.log(week);
|
||||||
let weekFirst = week - 1;//第一天对应的天数
|
let weekFirst = week - 1;//第一天对应的天数
|
||||||
let weekLast = 7 - week;//最后一天对应的天数
|
let weekLast = 7 - week;//最后一天对应的天数
|
||||||
|
if (week == 0) {
|
||||||
|
weekFirst = 6;
|
||||||
|
weekLast = 0;//周日特殊处理
|
||||||
|
} else {
|
||||||
|
weekFirst = week - 1;
|
||||||
|
weekLast = 7 - week;
|
||||||
|
}
|
||||||
let first = new Date(new Date(date.getTime() - (weekFirst * ondDayTime)));//本周周一
|
let first = new Date(new Date(date.getTime() - (weekFirst * ondDayTime)));//本周周一
|
||||||
let last = new Date(new Date(date.getTime() + (weekLast * ondDayTime)));//本周周日
|
let last = new Date(new Date(date.getTime() + (weekLast * ondDayTime)));//本周周日
|
||||||
this.weekFirst = first.getFullYear() + '-' + (first.getMonth() + 1) + '-' + first.getDate();
|
this.weekFirst = first.getFullYear() + '-' + (first.getMonth() + 1) + '-' + first.getDate();
|
||||||
this.weekLast = last.getFullYear() + '-' + (last.getMonth() + 1) + '-' + last.getDate();
|
this.weekLast = last.getFullYear() + '-' + (last.getMonth() + 1) + '-' + last.getDate();
|
||||||
this.getsaleOut();
|
this.getsaleOut();
|
||||||
this.getMioItem();//发货情况
|
this.getMioItem();//发货情况
|
||||||
this.getTodayUtask();//今日任务
|
// this.getTodayMtask();//今日任务
|
||||||
//昨日工序进度
|
//昨日工序进度
|
||||||
this.getMtask();
|
this.getMtask();
|
||||||
//时间
|
//时间
|
||||||
this.showTime()
|
this.showTime()
|
||||||
this.dayInterval = setInterval(()=>{
|
this.dayInterval = setInterval(() => {
|
||||||
this.showTime()
|
this.showTime()
|
||||||
},1000)
|
}, 1000)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showTime(){
|
showTime() {
|
||||||
this.currentTime = this.$TOOL.dateFormat(new Date(), 'hh:mm:ss')
|
this.currentTime = this.$TOOL.dateFormat(new Date(), 'hh:mm:ss')
|
||||||
this.currentDay = this.$TOOL.dateFormat(new Date(), 'yyyy年MM月dd日')
|
this.currentDay = this.$TOOL.dateFormat(new Date(), 'yyyy年MM月dd日')
|
||||||
},
|
},
|
||||||
|
@ -360,31 +377,37 @@ export default {
|
||||||
}, 500)
|
}, 500)
|
||||||
},
|
},
|
||||||
//今日任务
|
//今日任务
|
||||||
getTodayUtask(){
|
getTodayMtask() {
|
||||||
let that = this;
|
let that = this;
|
||||||
let obj ={};
|
let obj = {};
|
||||||
obj.start_date = this.today;
|
obj.start_date = this.today;
|
||||||
obj.end_date = this.today;
|
obj.end_date = this.today;
|
||||||
obj.belong_dept__name='6车间';
|
obj.is_count_utask = true;
|
||||||
obj.page=0;
|
obj.mgroup__belong_dept__name = '6车间';
|
||||||
that.$API.pm.utask.list.req(obj).then((res) => {
|
obj.page = 0;
|
||||||
that.todayUtask=res;
|
that.$API.pm.mtask.list.req(obj).then((res) => {
|
||||||
console.log('今日任务:',res);
|
that.todayMtask = res;
|
||||||
|
console.log('今日任务:', res);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// that.$API.pm.utask.list.req(obj).then((res) => {
|
||||||
|
// that.todayMtask = res;
|
||||||
|
// console.log('今日任务:', res);
|
||||||
|
// });
|
||||||
},
|
},
|
||||||
//发货情况
|
//发货情况
|
||||||
getMioItem(){
|
getMioItem() {
|
||||||
let that = this;
|
let that = this;
|
||||||
let obj ={};
|
let obj = {};
|
||||||
obj.mio__type = 'sale_out';
|
obj.mio__type = 'sale_out';
|
||||||
obj.mio__inout_date__gte = that.start_date;
|
obj.mio__inout_date__gte = that.start_date;
|
||||||
obj.mio__inout_date__lte = that.end_date;
|
obj.mio__inout_date__lte = that.end_date;
|
||||||
obj.page=0;
|
obj.page = 0;
|
||||||
that.$API.inm.mioitem.list.req(obj).then((res) => {
|
that.$API.inm.mioitem.list.req(obj).then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
let saleOutData = [];
|
let saleOutData = [];
|
||||||
res.forEach(item => {
|
res.forEach(item => {
|
||||||
let arr = [],obj1 = {},obj2 = {},obj3 = {},obj4 = {},obj5 = {};
|
let arr = [], obj1 = {}, obj2 = {}, obj3 = {}, obj4 = {}, obj5 = {};
|
||||||
obj1.elType = 'primary';
|
obj1.elType = 'primary';
|
||||||
obj1.value = item.inout_date;
|
obj1.value = item.inout_date;
|
||||||
obj2.elType = 'primary';
|
obj2.elType = 'primary';
|
||||||
|
@ -406,39 +429,33 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//本周工序进展
|
//本周工序进展
|
||||||
getMtask(){
|
getMtask() {
|
||||||
let that = this;
|
let that = this;
|
||||||
let obj ={};
|
let obj = {
|
||||||
obj.start_date = this.weekFirst;
|
query: { start_date: this.start_date, end_date: this.end_date, dept_name: "6车间" },
|
||||||
obj.end_date = this.weekLast;
|
};
|
||||||
obj.mgroup__belong_dept__name='6车间';
|
//生产车间按日统计
|
||||||
obj.page=0;
|
that.$API.bi.dataset.exec.req('mgroupWeek', obj).then((res) => {
|
||||||
that.$API.pm.mtask.list.req(obj).then((res) => {
|
let data = res.data2.ds0;
|
||||||
console.log(res);
|
if (data.length > 0) {
|
||||||
if(res.length>0){
|
|
||||||
let processData = [];
|
let processData = [];
|
||||||
res.forEach(item => {
|
data.forEach(item => {
|
||||||
let arr = [],obj1 = {},obj2 = {},obj3 = {},obj4 = {},obj5 = {},obj6 = {},obj7 = {},obj8 = {};
|
let arr = [], obj1 = {}, obj2 = {}, obj3 = {}, obj4 = {}, obj5 = {}, obj6 = {}, obj7 = {}, obj8 = {};
|
||||||
obj1.elType = 'primary';
|
obj1.elType = 'primary';
|
||||||
obj1.value = item.mgroup_name;//工序
|
obj1.value = item.工段;//工序
|
||||||
obj2.elType = 'primary';
|
obj2.elType = 'primary';
|
||||||
obj2.value = item.material_out_.name;
|
obj2.value = item.物料名称;
|
||||||
obj3.elType = 'primary';
|
obj3.elType = 'primary';
|
||||||
obj3.value = item.material_out_.specification;
|
obj3.value = item.型号;
|
||||||
obj4.elType = 'primary';
|
obj4.elType = 'primary';
|
||||||
obj4.value = item.count;
|
obj4.value = item.计划数;
|
||||||
obj5.elType = 'primary';
|
obj5.elType = 'primary';
|
||||||
obj5.value = item.count_ok;
|
obj5.value = item.合格数;
|
||||||
obj6.elType = 'progress';
|
obj6.elType = 'progress';
|
||||||
let jindu = Math.round((item.count_ok/item.count)*100);
|
let jindu = Math.round((item.完成进度) * 100);
|
||||||
obj6.value = jindu;
|
obj6.value = jindu;
|
||||||
obj7.elType = 'primary';
|
obj7.elType = 'primary';
|
||||||
let rate = 0;
|
let rate = Math.round((item.合格率) * 100);
|
||||||
if(item.count_real!=0){
|
|
||||||
rate = Math.round((item.count_ok/item.count_real)*100);
|
|
||||||
}else{
|
|
||||||
rate = 0;
|
|
||||||
}
|
|
||||||
obj7.value = rate;
|
obj7.value = rate;
|
||||||
arr.push(obj1);
|
arr.push(obj1);
|
||||||
arr.push(obj2);
|
arr.push(obj2);
|
||||||
|
@ -448,105 +465,140 @@ export default {
|
||||||
arr.push(obj6);
|
arr.push(obj6);
|
||||||
arr.push(obj7);
|
arr.push(obj7);
|
||||||
processData.push(arr);
|
processData.push(arr);
|
||||||
|
|
||||||
});
|
});
|
||||||
console.log('processData',processData)
|
console.log('processData', processData)
|
||||||
this.processData = processData;
|
this.processData = processData;
|
||||||
}
|
}
|
||||||
debugger;
|
|
||||||
});
|
})
|
||||||
|
|
||||||
|
// let obj = {};
|
||||||
|
// obj.start_date = this.weekFirst;
|
||||||
|
// obj.end_date = this.weekLast;
|
||||||
|
// obj.mgroup__belong_dept__name = '6车间';
|
||||||
|
// obj.page = 0;
|
||||||
|
// that.$API.pm.mtask.list.req(obj).then((res) => {
|
||||||
|
// console.log(res);
|
||||||
|
// if (res.length > 0) {
|
||||||
|
// let processData = [];
|
||||||
|
// res.forEach(item => {
|
||||||
|
// let arr = [], obj1 = {}, obj2 = {}, obj3 = {}, obj4 = {}, obj5 = {}, obj6 = {}, obj7 = {}, obj8 = {};
|
||||||
|
// obj1.elType = 'primary';
|
||||||
|
// obj1.value = item.mgroup_name;//工序
|
||||||
|
// obj2.elType = 'primary';
|
||||||
|
// obj2.value = item.material_out_.name;
|
||||||
|
// obj3.elType = 'primary';
|
||||||
|
// obj3.value = item.material_out_.specification;
|
||||||
|
// obj4.elType = 'primary';
|
||||||
|
// obj4.value = item.count;
|
||||||
|
// obj5.elType = 'primary';
|
||||||
|
// obj5.value = item.count_ok;
|
||||||
|
// obj6.elType = 'progress';
|
||||||
|
// let jindu = Math.round((item.count_ok / item.count) * 100);
|
||||||
|
// obj6.value = jindu;
|
||||||
|
// obj7.elType = 'primary';
|
||||||
|
// let rate = 0;
|
||||||
|
// if (item.count_real != 0) {
|
||||||
|
// rate = Math.round((item.count_ok / item.count_real) * 100);
|
||||||
|
// } else {
|
||||||
|
// rate = 0;
|
||||||
|
// }
|
||||||
|
// obj7.value = rate;
|
||||||
|
// arr.push(obj1);
|
||||||
|
// arr.push(obj2);
|
||||||
|
// arr.push(obj3);
|
||||||
|
// arr.push(obj4);
|
||||||
|
// arr.push(obj5);
|
||||||
|
// arr.push(obj6);
|
||||||
|
// arr.push(obj7);
|
||||||
|
// processData.push(arr);
|
||||||
|
|
||||||
|
// });
|
||||||
|
// console.log('processData', processData)
|
||||||
|
// this.processData = processData;
|
||||||
|
// }
|
||||||
|
// debugger;
|
||||||
|
// });
|
||||||
},
|
},
|
||||||
//本月生产统计&本月交付统计
|
//本月生产统计&本月交付统计
|
||||||
getsaleOut(){
|
getsaleOut() {
|
||||||
let that = this;
|
let that = this;
|
||||||
let obj ={
|
let obj = {
|
||||||
query: {start_date:this.start_date,end_date:this.end_date,dept_name: "6车间"},
|
query: { start_date: this.start_date, end_date: this.end_date, dept_name: "6车间" },
|
||||||
};
|
};
|
||||||
let obj2 ={
|
let obj2 = {
|
||||||
query: {start_date:this.start_date,end_date:this.end_date,mio_type: 'sale_out',material_id:''},
|
query: { start_date: this.start_date, end_date: this.end_date, mio_type: 'sale_out', material_id: '' },
|
||||||
};
|
};
|
||||||
//生产车间按日统计
|
//生产车间按日统计
|
||||||
that.$API.bi.dataset.exec.req('productStatistic', obj).then((res1) => {
|
that.$API.bi.dataset.exec.req('productStatistic', obj).then((res1) => {
|
||||||
console.log('生产车间按日统计:',res1);
|
console.log('生产车间按日统计:', res1);
|
||||||
let list1 = res1.data2.ds0;
|
let list1 = res1.data2.ds0;
|
||||||
let seriesData11 = [],seriesData12 = [],xAxisData1=[],bangArr=[],guanArr=[];
|
let seriesData11 = [], seriesData12 = [], xAxisData1 = [], bangArr = [], guanArr = [];
|
||||||
for (let i = 0; i < that.days; i++) {
|
for (let i = 0; i < that.days; i++) {
|
||||||
let day = i+1;
|
let day = i + 1;
|
||||||
let text = day+'日';
|
let text = day + '日';
|
||||||
xAxisData1[i]=text;
|
xAxisData1[i] = text;
|
||||||
seriesData11.push(0);
|
seriesData11.push(0);
|
||||||
seriesData12.push(0);
|
seriesData12.push(0);
|
||||||
}
|
}
|
||||||
if(list1.length>0){
|
if (list1.length > 0) {
|
||||||
list1.forEach(item1=>{
|
list1.forEach(item1 => {
|
||||||
if(item1.name=='光纤预制管'){
|
if (item1.name == '光纤预制管') {
|
||||||
guanArr.push(item1)
|
guanArr.push(item1)
|
||||||
}else{
|
} else {
|
||||||
bangArr.push(item1)
|
bangArr.push(item1)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if(bangArr.length>0){
|
if (bangArr.length > 0) {
|
||||||
bangArr.forEach(item11=>{
|
bangArr.forEach(item11 => {
|
||||||
let index11 = item11.日-1;
|
let index11 = item11.日 - 1;
|
||||||
seriesData11[index11] = item11.生产数;
|
seriesData11[index11] = item11.生产数;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if(guanArr.length>0){
|
if (guanArr.length > 0) {
|
||||||
guanArr.forEach(item12=>{
|
guanArr.forEach(item12 => {
|
||||||
let index12 = item12.日-1;
|
let index12 = item12.日 - 1;
|
||||||
seriesData12[index12] = item12.生产数;
|
seriesData12[index12] = item12.生产数;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
let chart1Option = deepCopy(this.basicOption)
|
let chart1Option = deepCopy(this.basicOption)
|
||||||
chart1Option.xAxis.data = xAxisData1;
|
chart1Option.xAxis.data = xAxisData1;
|
||||||
chart1Option.series[0].data=seriesData11;
|
chart1Option.series[0].data = seriesData11;
|
||||||
chart1Option.series[1].data=seriesData12;
|
chart1Option.series[1].data = seriesData12;
|
||||||
let chart1 = this.setChart("chart1", chart1Option);
|
this.setChart("chart1", chart1Option);
|
||||||
// let index1 = 0
|
|
||||||
// this.chartInterval1 = setInterval(function () {
|
|
||||||
// if (index1 < chart1Option.series[0].data.length) {
|
|
||||||
// chart1.dispatchAction({ type: 'downplay', seriesIndex: 0 });
|
|
||||||
// chart1.dispatchAction({ type: 'highlight', seriesIndex: 0, dataIndex: index2 });
|
|
||||||
// chart1.dispatchAction({ type: 'showTip', seriesIndex: 0, dataIndex: index2 });
|
|
||||||
// index1++;
|
|
||||||
// } else {
|
|
||||||
// index1 = 0;
|
|
||||||
// }
|
|
||||||
// }, 3000);
|
|
||||||
// debugger;
|
|
||||||
});
|
});
|
||||||
//本月交付统计
|
//本月交付统计
|
||||||
that.$API.bi.dataset.exec.req('saleOutDay', obj2).then((saleOutRes) => {
|
that.$API.bi.dataset.exec.req('saleOutDay', obj2).then((saleOutRes) => {
|
||||||
console.log('本月交付统计:',saleOutRes);
|
console.log('本月交付统计:', saleOutRes);
|
||||||
let seriesData21 = [],seriesData22 = [],xAxisData2=[],bangArr2=[],guanArr2=[];
|
let seriesData21 = [], seriesData22 = [], xAxisData2 = [], bangArr2 = [], guanArr2 = [];
|
||||||
let list2 = saleOutRes.data2.ds0;
|
let list2 = saleOutRes.data2.ds0;
|
||||||
for (let i = 0; i < that.days; i++) {
|
for (let i = 0; i < that.days; i++) {
|
||||||
let day = i+1;
|
let day = i + 1;
|
||||||
let text = day+'日';
|
let text = day + '日';
|
||||||
xAxisData2[i]=text;
|
xAxisData2[i] = text;
|
||||||
seriesData21.push(0);
|
seriesData21.push(0);
|
||||||
seriesData22.push(0);
|
seriesData22.push(0);
|
||||||
}
|
}
|
||||||
if(list2.length>0){
|
if (list2.length > 0) {
|
||||||
list2.forEach(item2=>{
|
list2.forEach(item2 => {
|
||||||
if(item2.name=='光纤预制管'){
|
if (item2.name == '光纤预制管') {
|
||||||
guanArr2.push(item2)
|
guanArr2.push(item2)
|
||||||
}else{
|
} else {
|
||||||
bangArr2.push(item2)
|
bangArr2.push(item2)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if(bangArr2.length>0){
|
if (bangArr2.length > 0) {
|
||||||
bangArr2.forEach(item21=>{
|
bangArr2.forEach(item21 => {
|
||||||
let index21 = item21.日-1;
|
let index21 = item21.日 - 1;
|
||||||
seriesData21[index21] = item21.生产数;
|
seriesData21[index21] = item21.生产数;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if(guanArr2.length>0){
|
if (guanArr2.length > 0) {
|
||||||
guanArr2.forEach(item22=>{
|
guanArr2.forEach(item22 => {
|
||||||
let index22 = item22.日-1;
|
let index22 = item22.日 - 1;
|
||||||
seriesData22[index22] = item22.生产数;
|
seriesData22[index22] = item22.生产数;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -555,24 +607,12 @@ export default {
|
||||||
chart2Option.series[1].type = 'line';
|
chart2Option.series[1].type = 'line';
|
||||||
chart2Option.xAxis.data = xAxisData2;
|
chart2Option.xAxis.data = xAxisData2;
|
||||||
|
|
||||||
chart2Option.series[0].data=seriesData21;
|
chart2Option.series[0].data = seriesData21;
|
||||||
chart2Option.series[0].label.position='top';
|
chart2Option.series[0].label.position = 'top';
|
||||||
chart2Option.series[1].data=seriesData22;
|
chart2Option.series[1].data = seriesData22;
|
||||||
chart2Option.series[1].label.position='top';
|
chart2Option.series[1].label.position = 'top';
|
||||||
|
|
||||||
let chart2 = this.setChart("chart2", chart2Option);
|
this.setChart("chart2", chart2Option);
|
||||||
// let index2 = 0
|
|
||||||
// this.chartInterval2 = setInterval(function () {
|
|
||||||
// if (index2 < chart2Option.series[0].data.length) {
|
|
||||||
// chart2.dispatchAction({ type: 'downplay', seriesIndex: 0 });
|
|
||||||
// chart2.dispatchAction({ type: 'highlight', seriesIndex: 0, dataIndex: index2 });
|
|
||||||
// chart2.dispatchAction({ type: 'showTip', seriesIndex: 0, dataIndex: index2 });
|
|
||||||
// index2++;
|
|
||||||
// } else {
|
|
||||||
// index2 = 0;
|
|
||||||
// }
|
|
||||||
// }, 3000);
|
|
||||||
// debugger;
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -581,93 +621,112 @@ export default {
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'myfont'; /* 字体名称 */
|
font-family: 'myfont';
|
||||||
src: url('../../utils/youShe.ttf'); /* 字体文件相对路径 */
|
/* 字体名称 */
|
||||||
}
|
src: url('../../utils/youShe.ttf');
|
||||||
.dashboard {
|
/* 字体文件相对路径 */
|
||||||
background-image: url("/public/img/photon_bg.png");
|
}
|
||||||
color: #fff;
|
|
||||||
background-size:cover;
|
.dashboard {
|
||||||
font-family: "Microsoft Yahei" !important;
|
background-image: url("/public/img/photon_bg.png");
|
||||||
}
|
color: #fff;
|
||||||
.header {
|
background-size: cover;
|
||||||
background: url("/public/img/photon_header.png");
|
font-family: "Microsoft Yahei" !important;
|
||||||
border-bottom: none;
|
}
|
||||||
background-size: 100% 100%;
|
|
||||||
font-size: 26px;
|
.header {
|
||||||
display: block;
|
background: url("/public/img/photon_header.png");
|
||||||
height: 80px;
|
border-bottom: none;
|
||||||
color: rgb(149, 255, 255);
|
background-size: 100% 100%;
|
||||||
font-family: 'Microsoft Yahei';
|
font-size: 26px;
|
||||||
text-align: center;
|
display: block;
|
||||||
padding: 12px 0px;
|
height: 80px;
|
||||||
}
|
color: rgb(149, 255, 255);
|
||||||
.box {
|
font-family: 'Microsoft Yahei';
|
||||||
background: rgba(10, 63, 68, 0.5);
|
text-align: center;
|
||||||
height: 100%;
|
padding: 12px 0px;
|
||||||
}
|
}
|
||||||
.boxtitle {
|
|
||||||
color: #fff;
|
.box {
|
||||||
font-size: 16px;
|
background: rgba(10, 63, 68, 0.5);
|
||||||
display: flex;
|
height: 100%;
|
||||||
height: 36px;
|
}
|
||||||
background: linear-gradient(40deg, rgba(11, 101, 140, 0.451), rgba(0, 34, 48, 0.335), rgba(11, 101, 140, 0.451));
|
|
||||||
}
|
.boxtitle {
|
||||||
.bgimg {
|
color: #fff;
|
||||||
background-image: url('https://cdn-upload.datav.aliyun.com/upload/download/1678762309227-E6RP8z2R.png');
|
font-size: 16px;
|
||||||
background-size: 140% 100%;
|
display: flex;
|
||||||
}
|
height: 36px;
|
||||||
.boxlabel {
|
background: linear-gradient(40deg, rgba(11, 101, 140, 0.451), rgba(0, 34, 48, 0.335), rgba(11, 101, 140, 0.451));
|
||||||
margin-left: 6px;
|
}
|
||||||
font-size: 18px;
|
|
||||||
margin-top: 6px
|
.bgimg {
|
||||||
}
|
background-image: url('https://cdn-upload.datav.aliyun.com/upload/download/1678762309227-E6RP8z2R.png');
|
||||||
|
background-size: 140% 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.boxlabel {
|
||||||
|
margin-left: 6px;
|
||||||
|
font-size: 18px;
|
||||||
|
margin-top: 6px
|
||||||
|
}
|
||||||
|
|
||||||
|
.boxmain {
|
||||||
|
height: calc(100% - 40px);
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 800px) {
|
||||||
.boxmain {
|
.boxmain {
|
||||||
height: calc(100% - 40px);
|
height: 200px;
|
||||||
}
|
}
|
||||||
@media screen and (max-width: 800px) {
|
}
|
||||||
.boxmain {
|
|
||||||
height: 200px;
|
.flex_center {
|
||||||
}
|
display: flex;
|
||||||
}
|
align-items: center;
|
||||||
.flex_center {
|
justify-content: center
|
||||||
display: flex;
|
}
|
||||||
align-items: center;
|
|
||||||
justify-content: center
|
.border {
|
||||||
}
|
border: 1px dashed #49bcf7;
|
||||||
.border{
|
}
|
||||||
border: 1px dashed #49bcf7;
|
|
||||||
}
|
.bigdata {
|
||||||
.bigdata {
|
font-size: 24px;
|
||||||
font-size: 24px;
|
}
|
||||||
}
|
|
||||||
.wrapper{
|
.wrapper {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
height: 220px;
|
height: 220px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title{
|
.title {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
table th{
|
|
||||||
font-size: 14px;
|
table th {
|
||||||
background: rgba(0, 0, 0, .1);
|
font-size: 14px;
|
||||||
}
|
background: rgba(0, 0, 0, .1);
|
||||||
.marquee_top{
|
}
|
||||||
transition: all 0.5s ease-in-out;
|
|
||||||
margin-top: -26px;
|
.marquee_top {
|
||||||
}
|
transition: all 0.5s ease-in-out;
|
||||||
.totall{
|
margin-top: -26px;
|
||||||
color: #fff;
|
}
|
||||||
background-color: rgb(10, 63, 68);
|
|
||||||
}
|
.totall {
|
||||||
.rollData{
|
color: #fff;
|
||||||
background-color: rgb(10, 39, 50);
|
background-color: rgb(10, 63, 68);
|
||||||
}
|
}
|
||||||
.rollData:nth-of-type(2n+1){
|
|
||||||
background-color: rgb(0, 59, 81);
|
.rollData {
|
||||||
}
|
background-color: rgb(10, 39, 50);
|
||||||
|
}
|
||||||
|
|
||||||
|
.rollData:nth-of-type(2n+1) {
|
||||||
|
background-color: rgb(0, 59, 81);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
|
@ -2,24 +2,28 @@
|
||||||
<el-container class="dashboard">
|
<el-container class="dashboard">
|
||||||
<el-header class="header">
|
<el-header class="header">
|
||||||
<div style="font-weight: bold; font-family:'myfont';font-size:32px">7车间生产数据大看板</div>
|
<div style="font-weight: bold; font-family:'myfont';font-size:32px">7车间生产数据大看板</div>
|
||||||
<div style="font-size: 14px;margin-top:18px">{{currentDay}}{{ currentTime }}</div>
|
<div style="font-size: 14px;margin-top:18px">{{ currentDay }}{{ currentTime }}</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main>
|
<el-main>
|
||||||
<el-row style="height: 60%" :gutter="10">
|
<el-row style="height: 60%" :gutter="10">
|
||||||
<el-col :xs="24" :md="10" style="height: 100%;">
|
<el-col :xs="24" :md="10" style="height: 100%;">
|
||||||
<div class="box" style="height: 29%">
|
<div class="box" style="height: 29%">
|
||||||
<div class="boxtitle">
|
<div class="boxtitle">
|
||||||
<div class="boxlabel">今日任务</div>
|
<div class="boxlabel">今日任务</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="height: 4px;"></div>
|
<div style="height: 4px;"></div>
|
||||||
<div class="boxmain bigdata border" style="overflow:scroll">
|
<div class="boxmain bigdata border" style="overflow:scroll;padding:5px;">
|
||||||
<div v-for="item in todayMtask" :key="item.id" style="width:50%;display:inline-block; height: 40px;">
|
<div v-for="item in todayMtask" :key="item.id"
|
||||||
<span style="font-size:12px">{{item.material_out_name}}</span>
|
style="width:50%;display:inline-block;height: 40px;line-height:40px;padding:0 20px;">
|
||||||
<span style="color: #fef000;margin-left: 10px;font-weight:bold;font-family:electronicFont">
|
<div style="display:flex;justify-content:space-between;border-bottom:1px dashed #eeeeee">
|
||||||
{{item.count}}
|
<span style="font-size:12px">{{ item.material_out_name }}</span>
|
||||||
</span>
|
<span
|
||||||
</div>
|
style="color: #fef000;margin-left: 10px;font-weight:bold;font-family:electronicFont">
|
||||||
|
{{ item.count }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="height: 1%;"></div>
|
<div style="height: 1%;"></div>
|
||||||
|
@ -45,8 +49,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div style="height: 4px;"></div>
|
<div style="height: 4px;"></div>
|
||||||
<div class="boxmain" id="scrollContainer2">
|
<div class="boxmain" id="scrollContainer2">
|
||||||
<scScrollTavle v-if="table2Visible" :tableHeight="containerHeight2"
|
<scScrollTavle v-if="table2Visible" :tableHeight="containerHeight2" :rowData="lineData"
|
||||||
:rowData="lineData" :titleData="liData2" :refValue="refValue2"></scScrollTavle>
|
:titleData="liData2" :refValue="refValue2"></scScrollTavle>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -92,7 +96,7 @@ function deepCopy(obj) {
|
||||||
return JSON.parse(JSON.stringify(obj));
|
return JSON.parse(JSON.stringify(obj));
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
components: {scScrollTavle},
|
components: { scScrollTavle },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
basicOption: {
|
basicOption: {
|
||||||
|
@ -118,7 +122,7 @@ export default {
|
||||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||||
{
|
{
|
||||||
offset: 0,
|
offset: 0,
|
||||||
color: 'rgb(250,205,0)'
|
color: 'rgb(250,205,0)'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
offset: 1,
|
offset: 1,
|
||||||
|
@ -139,7 +143,7 @@ export default {
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
boundaryGap: true,
|
boundaryGap: true,
|
||||||
data: ['1号炉','2号炉', '3号炉', '4号炉', '5号炉', '6号炉', '7号炉', '8号炉'],
|
data: ['1号炉', '2号炉', '3号炉', '4号炉', '5号炉', '6号炉', '7号炉', '8号炉'],
|
||||||
nameTextStyle: {
|
nameTextStyle: {
|
||||||
color: '#ffffff'
|
color: '#ffffff'
|
||||||
},
|
},
|
||||||
|
@ -169,7 +173,7 @@ export default {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
width: 1, color: 'rgb(1,235,239)'
|
width: 1, color: 'rgb(1,235,239)'
|
||||||
},
|
},
|
||||||
barWidth:30,
|
barWidth: 30,
|
||||||
showSymbol: false,
|
showSymbol: false,
|
||||||
areaStyle: {
|
areaStyle: {
|
||||||
opacity: 0.8,
|
opacity: 0.8,
|
||||||
|
@ -190,7 +194,7 @@ export default {
|
||||||
label: {
|
label: {
|
||||||
show: true,
|
show: true,
|
||||||
position: 'top',
|
position: 'top',
|
||||||
color:'#fff'
|
color: '#fff'
|
||||||
},
|
},
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
borderRadius: [2, 2, 0, 0],
|
borderRadius: [2, 2, 0, 0],
|
||||||
|
@ -205,16 +209,16 @@ export default {
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
},
|
},
|
||||||
data: [140, 232, 101, 264, 90, 340, 250,140, 232, 101, 264, 90, 340, 250,140, 232, 101, 264, 90, 340, 250,140, 232, 101, 264, 90, 340, 250, 340, 250]
|
data: [140, 232, 101, 264, 90, 340, 250, 140, 232, 101, 264, 90, 340, 250, 140, 232, 101, 264, 90, 340, 250, 140, 232, 101, 264, 90, 340, 250, 340, 250]
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
chart3Option:{
|
chart3Option: {
|
||||||
backgroundColor: '',
|
backgroundColor: '',
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'item'
|
trigger: 'item'
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
top:'bottom',
|
top: 'bottom',
|
||||||
},
|
},
|
||||||
series: {
|
series: {
|
||||||
name: '完成率',
|
name: '完成率',
|
||||||
|
@ -234,34 +238,34 @@ export default {
|
||||||
],
|
],
|
||||||
emphasis: {
|
emphasis: {
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
shadowBlur: 10,
|
shadowBlur: 10,
|
||||||
shadowOffsetX: 0,
|
shadowOffsetX: 0,
|
||||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
containerHeight1:100,
|
containerHeight1: 100,
|
||||||
containerHeight2:100,
|
containerHeight2: 100,
|
||||||
table1Visible:false,
|
table1Visible: false,
|
||||||
table2Visible:false,
|
table2Visible: false,
|
||||||
refValue1:'moocBox1',
|
refValue1: 'moocBox1',
|
||||||
refValue2:'moocBox2',
|
refValue2: 'moocBox2',
|
||||||
liData1: ['序号', '型号', '完成进度', '产量', '状态'],
|
liData1: ['序号', '型号', '完成进度', '产量', '状态'],
|
||||||
processData:[],
|
processData: [],
|
||||||
liData2: ['序号', '炉号','产品名称', '型号', '规格', '最近产量','锅数','设备状态'],
|
liData2: ['序号', '炉号', '产品名称', '型号', '规格', '最近产量', '锅数', '设备状态'],
|
||||||
lineData:[],
|
lineData: [],
|
||||||
todayMtask:[],
|
todayMtask: [],
|
||||||
time: null,
|
time: null,
|
||||||
delay: 20,
|
delay: 20,
|
||||||
dayInterval:null,
|
dayInterval: null,
|
||||||
days:30,
|
days: 30,
|
||||||
today:'',
|
today: '',
|
||||||
start_date:'',
|
start_date: '',
|
||||||
end_date:'',
|
end_date: '',
|
||||||
currentTime:'',
|
currentTime: '',
|
||||||
currentDay:'',
|
currentDay: '',
|
||||||
yesterday:'',
|
yesterday: '',
|
||||||
chartInterval1: null,
|
chartInterval1: null,
|
||||||
chartInterval2: null,
|
chartInterval2: null,
|
||||||
chartInterval3: null,
|
chartInterval3: null,
|
||||||
|
@ -276,30 +280,30 @@ export default {
|
||||||
this.table2Visible = true;
|
this.table2Visible = true;
|
||||||
let date = new Date();
|
let date = new Date();
|
||||||
let year = date.getFullYear();
|
let year = date.getFullYear();
|
||||||
let month = date.getMonth()+1;
|
let month = date.getMonth() + 1;
|
||||||
let day = date.getDate();
|
let day = date.getDate();
|
||||||
let days = new Date(year, month, 0).getDate();
|
let days = new Date(year, month, 0).getDate();
|
||||||
this.days = days;
|
this.days = days;
|
||||||
let start_date = year+'-'+month+'-01';
|
let start_date = year + '-' + month + '-01';
|
||||||
let lastDay = new Date(year, month, 0).getDate();
|
let lastDay = new Date(year, month, 0).getDate();
|
||||||
let end_date = year+'-'+month+'-'+lastDay;
|
let end_date = year + '-' + month + '-' + lastDay;
|
||||||
this.start_date = start_date;
|
this.start_date = start_date;
|
||||||
this.end_date = end_date;
|
this.end_date = end_date;
|
||||||
this.today = year+'-'+month+'-'+day;
|
this.today = year + '-' + month + '-' + day;
|
||||||
let yesterday = new Date(date.getTime()-24*60*60*1000);
|
let yesterday = new Date(date.getTime() - 24 * 60 * 60 * 1000);
|
||||||
this.yesterday = yesterday.getFullYear()+"-" + (yesterday.getMonth()+1) + "-" + yesterday.getDate();
|
this.yesterday = yesterday.getFullYear() + "-" + (yesterday.getMonth() + 1) + "-" + yesterday.getDate();
|
||||||
this.getProductLine();
|
this.getProductLine();
|
||||||
this.getUtask();
|
this.getUtask();
|
||||||
this.getTodayMtask();
|
this.getTodayMtask();
|
||||||
this.getLineData();
|
this.getLineData();
|
||||||
//时间
|
//时间
|
||||||
this.showTime()
|
this.showTime()
|
||||||
this.dayInterval = setInterval(()=>{
|
this.dayInterval = setInterval(() => {
|
||||||
this.showTime()
|
this.showTime()
|
||||||
},1000)
|
}, 1000)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showTime(){
|
showTime() {
|
||||||
this.currentTime = this.$TOOL.dateFormat(new Date(), 'hh:mm:ss')
|
this.currentTime = this.$TOOL.dateFormat(new Date(), 'hh:mm:ss')
|
||||||
this.currentDay = this.$TOOL.dateFormat(new Date(), 'yyyy年MM月dd日')
|
this.currentDay = this.$TOOL.dateFormat(new Date(), 'yyyy年MM月dd日')
|
||||||
},
|
},
|
||||||
|
@ -319,22 +323,22 @@ export default {
|
||||||
}, 500)
|
}, 500)
|
||||||
},
|
},
|
||||||
//任务进度
|
//任务进度
|
||||||
getUtask(){
|
getUtask() {
|
||||||
let that = this;
|
let that = this;
|
||||||
let obj ={};
|
let obj = {};
|
||||||
obj.start_date__gte = this.start_date;
|
obj.start_date__gte = this.start_date;
|
||||||
obj.end_date__lte = this.end_date;
|
obj.end_date__lte = this.end_date;
|
||||||
obj.belong_dept__name='7车间';
|
obj.belong_dept__name = '7车间';
|
||||||
obj.page=0;
|
obj.page = 0;
|
||||||
that.$API.pm.utask.list.req(obj).then((res) => {
|
that.$API.pm.utask.list.req(obj).then((res) => {
|
||||||
console.log('任务进度:',res);
|
console.log('任务进度:', res);
|
||||||
let processData = [];
|
let processData = [];
|
||||||
res.forEach(item => {
|
res.forEach(item => {
|
||||||
let arr = [],obj1 = {},obj2 = {},obj3 = {},obj4 = {};
|
let arr = [], obj1 = {}, obj2 = {}, obj3 = {}, obj4 = {};
|
||||||
obj1.elType = 'primary';
|
obj1.elType = 'primary';
|
||||||
obj1.value = item.material_.specification;
|
obj1.value = item.material_.specification;
|
||||||
obj2.elType = 'progress';
|
obj2.elType = 'progress';
|
||||||
let process = Math.round((item.count_ok/item.count)*100)
|
let process = Math.round((item.count_ok / item.count) * 100)
|
||||||
obj2.value = process;
|
obj2.value = process;
|
||||||
obj3.elType = 'primary';
|
obj3.elType = 'primary';
|
||||||
obj3.value = item.count_ok;
|
obj3.value = item.count_ok;
|
||||||
|
@ -350,17 +354,17 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//7车间生产按炉进度
|
//7车间生产按炉进度
|
||||||
getLineData(){
|
getLineData() {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.bi.dataset.exec.req('linedept7', {}).then((res) => {
|
that.$API.bi.dataset.exec.req('linedept7', {}).then((res) => {
|
||||||
console.log('7车间生产线:',res);
|
console.log('7车间生产线:', res);
|
||||||
let list = res.data2.ds0;
|
let list = res.data2.ds0;
|
||||||
if(list.length>0){
|
if (list.length > 0) {
|
||||||
let lineData = [];
|
let lineData = [];
|
||||||
list.forEach(item => {
|
list.forEach(item => {
|
||||||
let arr = [],obj1 = {},obj2 = {},obj3 = {},obj4 = {},obj5 = {},obj6 = {},obj7 = {};
|
let arr = [], obj1 = {}, obj2 = {}, obj3 = {}, obj4 = {}, obj5 = {}, obj6 = {}, obj7 = {};
|
||||||
obj1.elType = 'primary';
|
obj1.elType = 'primary';
|
||||||
obj1.value = item.equip_name;//炉号
|
obj1.value = item.equip_name + '|' + item.equip_number;//炉号
|
||||||
obj2.elType = 'primary';
|
obj2.elType = 'primary';
|
||||||
obj2.value = item.material_name;
|
obj2.value = item.material_name;
|
||||||
obj3.elType = 'primary';
|
obj3.elType = 'primary';
|
||||||
|
@ -388,62 +392,50 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//生产线
|
//生产线
|
||||||
getProductLine(){
|
getProductLine() {
|
||||||
let that = this;
|
let that = this;
|
||||||
//本月生产统计
|
//本月生产统计
|
||||||
let obj1 ={
|
let obj1 = {
|
||||||
query: {start_date:that.start_date,end_date:that.end_date},
|
query: { start_date: that.start_date, end_date: that.end_date },
|
||||||
};
|
};
|
||||||
that.$API.bi.dataset.exec.req('stoveStatics', obj1).then((res1) => {
|
that.$API.bi.dataset.exec.req('stoveStatics', obj1).then((res1) => {
|
||||||
console.log('本月生产统计:',res1);
|
console.log('本月生产统计:', res1);
|
||||||
let list1 = res1.data2.ds0;
|
let list1 = res1.data2.ds0;
|
||||||
let seriesData1 = [],xAxisData1=[];
|
let seriesData1 = [], xAxisData1 = [];
|
||||||
if(list1.length>0){
|
if (list1.length > 0) {
|
||||||
list1.forEach(item1=>{
|
list1.forEach(item1 => {
|
||||||
xAxisData1.push(item1.equip_name);
|
xAxisData1.push(item1.equip_number);
|
||||||
seriesData1.push(item1.count_real);
|
seriesData1.push(item1.count_real);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
let chart1Option = deepCopy(this.basicOption)
|
let chart1Option = deepCopy(this.basicOption)
|
||||||
chart1Option.xAxis.data = xAxisData1;
|
chart1Option.xAxis.data = xAxisData1;
|
||||||
chart1Option.series[0].data = seriesData1;
|
chart1Option.series[0].data = seriesData1;
|
||||||
// chart1Option.yAxis.name='生产数';
|
|
||||||
let chart1 = that.setChart("chart1", chart1Option);
|
let chart1 = that.setChart("chart1", chart1Option);
|
||||||
// let index1 = 0
|
|
||||||
// this.chartInterval1 = setInterval(function () {
|
|
||||||
// if (index1 < seriesData1.length) {
|
|
||||||
// chart1.dispatchAction({ type: 'downplay', seriesIndex: 0 });
|
|
||||||
// chart1.dispatchAction({ type: 'highlight', seriesIndex: 0, dataIndex: index1 });
|
|
||||||
// chart1.dispatchAction({ type: 'showTip', seriesIndex: 0, dataIndex: index1 });
|
|
||||||
// index1++;
|
|
||||||
// } else {
|
|
||||||
// index1 = 0;
|
|
||||||
// }
|
|
||||||
// }, 3000);
|
|
||||||
});
|
});
|
||||||
//本月合格率统计
|
//本月合格率统计
|
||||||
let obj2 ={
|
let obj2 = {
|
||||||
query: {start_date:that.start_date,end_date:that.end_date,dept_name: "7车间"},
|
query: { start_date: that.start_date, end_date: that.end_date, dept_name: "7车间" },
|
||||||
};
|
};
|
||||||
that.$API.bi.dataset.exec.req('lineDay', obj2).then((res2) => {
|
that.$API.bi.dataset.exec.req('lineDay', obj2).then((res2) => {
|
||||||
console.log('本月合格率统计:',res2);
|
console.log('本月合格率统计:', res2);
|
||||||
let list2 = res2.data2.ds0;
|
let list2 = res2.data2.ds0;
|
||||||
let seriesData2 = [],xAxisData2=[];
|
let seriesData2 = [], xAxisData2 = [];
|
||||||
for (let i = 0; i < that.days; i++) {
|
for (let i = 0; i < that.days; i++) {
|
||||||
let day = i+1;
|
let day = i + 1;
|
||||||
let text = day+'日';
|
let text = day + '日';
|
||||||
xAxisData2[i]=text;
|
xAxisData2[i] = text;
|
||||||
seriesData2[i]=0;
|
seriesData2[i] = 0;
|
||||||
}
|
}
|
||||||
if(list2.length>0){
|
if (list2.length > 0) {
|
||||||
list2.forEach(item2=>{
|
list2.forEach(item2 => {
|
||||||
let index2 = item2.日-1;
|
let index2 = item2.日 - 1;
|
||||||
seriesData2[index2] =Math.round(item2.合格率);
|
seriesData2[index2] = Math.round(item2.合格率);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
let chart2Option = deepCopy(this.basicOption);
|
let chart2Option = deepCopy(this.basicOption);
|
||||||
chart2Option.xAxis.data = xAxisData2;
|
chart2Option.xAxis.data = xAxisData2;
|
||||||
chart2Option.yAxis.name='合格率';
|
chart2Option.yAxis.name = '合格率';
|
||||||
chart2Option.legend = {
|
chart2Option.legend = {
|
||||||
icon: "stack",
|
icon: "stack",
|
||||||
right: 0,
|
right: 0,
|
||||||
|
@ -467,7 +459,7 @@ export default {
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
};
|
};
|
||||||
let series2=[{
|
let series2 = [{
|
||||||
name: '合格率',
|
name: '合格率',
|
||||||
type: 'line',
|
type: 'line',
|
||||||
smooth: true,
|
smooth: true,
|
||||||
|
@ -494,88 +486,66 @@ export default {
|
||||||
label: {
|
label: {
|
||||||
show: true,
|
show: true,
|
||||||
position: 'top',
|
position: 'top',
|
||||||
color:'#fff'
|
color: '#fff'
|
||||||
},
|
},
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
borderRadius: [2, 2, 0, 0],
|
borderRadius: [2, 2, 0, 0],
|
||||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||||
{
|
{
|
||||||
offset: 0,
|
offset: 0,
|
||||||
color: 'rgb(250,205,0)'
|
color: 'rgb(250,205,0)'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
offset: 1,
|
offset: 1,
|
||||||
color: 'rgb(254,129,0)'
|
color: 'rgb(254,129,0)'
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
},
|
},
|
||||||
data: seriesData2
|
data: seriesData2
|
||||||
}];
|
}];
|
||||||
chart2Option.series=series2;
|
chart2Option.series = series2;
|
||||||
let chart2 = that.setChart("chart2", chart2Option);
|
let chart2 = that.setChart("chart2", chart2Option);
|
||||||
// let index2 = 0
|
|
||||||
// this.chartInterval2 = setInterval(function () {
|
|
||||||
// if (index2 < seriesData2.length) {
|
|
||||||
// chart2.dispatchAction({ type: 'downplay', seriesIndex: 0 });
|
|
||||||
// chart2.dispatchAction({ type: 'highlight', seriesIndex: 0, dataIndex: index2 });
|
|
||||||
// chart2.dispatchAction({ type: 'showTip', seriesIndex: 0, dataIndex: index2 });
|
|
||||||
// index2++;
|
|
||||||
// } else {
|
|
||||||
// index2 = 0;
|
|
||||||
// }
|
|
||||||
// }, 3000);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
//车间生产昨日统计 12月1号
|
//车间生产昨日统计 12月1号
|
||||||
let obj3 ={
|
let obj3 = {
|
||||||
query: {start_date:that.yesterday,end_date:that.yesterday,dept_name: "7车间"},
|
query: { start_date: that.yesterday, end_date: that.yesterday, dept_name: "7车间" },
|
||||||
};
|
};
|
||||||
that.$API.bi.dataset.exec.req('lineDay', obj3).then((res3) => {
|
that.$API.bi.dataset.exec.req('lineDay', obj3).then((res3) => {
|
||||||
console.log('车间生产昨日统计:',res3);
|
console.log('车间生产昨日统计:', res3);
|
||||||
let seriesData3 = [
|
let seriesData3 = [
|
||||||
{ value: 0, name: '炸纹' },
|
{ value: 0, name: '炸纹' },
|
||||||
{ value: 0, name: '条纹' },
|
{ value: 0, name: '条纹' },
|
||||||
{ value: 0, name: '气泡' },
|
{ value: 0, name: '气泡' },
|
||||||
{ value: 0, name: '弯曲' },
|
{ value: 0, name: '弯曲' },
|
||||||
{ value: 0, name: '其他' },
|
{ value: 0, name: '其他' },
|
||||||
{ value: 0, name: '合格' },
|
{ value: 0, name: '合格' },
|
||||||
]
|
]
|
||||||
if(res3.data2.ds0.length>0){
|
if (res3.data2.ds0.length > 0) {
|
||||||
let item3 = res3.data2.ds0[0];
|
let item3 = res3.data2.ds0[0];
|
||||||
that.yesterdayObjet = item3;
|
that.yesterdayObjet = item3;
|
||||||
seriesData3[0].value=item3.炸纹;
|
seriesData3[0].value = item3.炸纹;
|
||||||
seriesData3[1].value=item3.条纹;
|
seriesData3[1].value = item3.条纹;
|
||||||
seriesData3[2].value=item3.气泡;
|
seriesData3[2].value = item3.气泡;
|
||||||
seriesData3[3].value=item3.弯曲;
|
seriesData3[3].value = item3.弯曲;
|
||||||
seriesData3[4].value=item3.其他;
|
seriesData3[4].value = item3.其他;
|
||||||
seriesData3[5].value=item3.合格数;
|
seriesData3[5].value = item3.合格数;
|
||||||
}
|
}
|
||||||
that.chart3Option.series.data = seriesData3;
|
that.chart3Option.series.data = seriesData3;
|
||||||
let chart3 = that.setChart("chart3", that.chart3Option);
|
let chart3 = that.setChart("chart3", that.chart3Option);
|
||||||
// let index3 = 0
|
|
||||||
// this.chartInterval3 = setInterval(function () {
|
|
||||||
// if (index3 < seriesData3.length) {
|
|
||||||
// chart3.dispatchAction({ type: 'downplay', seriesIndex: 0 });
|
|
||||||
// chart3.dispatchAction({ type: 'highlight', seriesIndex: 0, dataIndex: index3 });
|
|
||||||
// chart3.dispatchAction({ type: 'showTip', seriesIndex: 0, dataIndex: index3 });
|
|
||||||
// index3++;
|
|
||||||
// } else {
|
|
||||||
// index3 = 0;
|
|
||||||
// }
|
|
||||||
// }, 3000);
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//今日任务
|
//今日任务
|
||||||
getTodayMtask(){
|
getTodayMtask() {
|
||||||
let that = this;
|
let that = this;
|
||||||
let obj ={};
|
let obj = {};
|
||||||
obj.start_date = this.today;
|
obj.start_date = this.today;
|
||||||
obj.end_date = this.today;
|
obj.end_date = this.today;
|
||||||
obj.belong_dept__name='7车间';
|
obj.mgroup__belong_dept__name = '7车间';
|
||||||
obj.page=0;
|
obj.page = 0;
|
||||||
that.$API.pm.mtask.list.req(obj).then((res) => {
|
that.$API.pm.mtask.list.req(obj).then((res) => {
|
||||||
that.todayMtask=res;
|
that.todayMtask = res;
|
||||||
console.log('今日任务:',res);
|
console.log('今日任务:', res);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -583,94 +553,113 @@ export default {
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'myfont'; /* 字体名称 */
|
font-family: 'myfont';
|
||||||
src: url('../../utils/youShe.ttf'); /* 字体文件相对路径 */
|
/* 字体名称 */
|
||||||
}
|
src: url('../../utils/youShe.ttf');
|
||||||
.dashboard {
|
/* 字体文件相对路径 */
|
||||||
background-image: url("/public/img/photon_bg.png");
|
}
|
||||||
color: #fff;
|
|
||||||
font-family: "Microsoft Yahei" !important;
|
.dashboard {
|
||||||
background-size: cover;
|
background-image: url("/public/img/photon_bg.png");
|
||||||
}
|
color: #fff;
|
||||||
.header {
|
font-family: "Microsoft Yahei" !important;
|
||||||
background: url("/public/img/photon_header.png");
|
background-size: cover;
|
||||||
border-bottom: none;
|
}
|
||||||
background-size: 100% 100%;
|
|
||||||
font-size: 26px;
|
.header {
|
||||||
display: block;
|
background: url("/public/img/photon_header.png");
|
||||||
height: 80px;
|
border-bottom: none;
|
||||||
color: rgb(149, 255, 255);
|
background-size: 100% 100%;
|
||||||
font-family: 'Microsoft Yahei';
|
font-size: 26px;
|
||||||
text-align: center;
|
display: block;
|
||||||
padding: 12px 0px;
|
height: 80px;
|
||||||
}.box {
|
color: rgb(149, 255, 255);
|
||||||
background: rgba(10, 63, 68, 0.5);
|
font-family: 'Microsoft Yahei';
|
||||||
height: 100%;
|
text-align: center;
|
||||||
}
|
padding: 12px 0px;
|
||||||
.boxtitle {
|
}
|
||||||
color: #fff;
|
|
||||||
font-size: 16px;
|
.box {
|
||||||
display: flex;
|
background: rgba(10, 63, 68, 0.5);
|
||||||
height: 36px;
|
height: 100%;
|
||||||
background: linear-gradient(40deg, rgba(11, 101, 140, 0.451), rgba(0, 34, 48, 0.335), rgba(11, 101, 140, 0.451));
|
}
|
||||||
}
|
|
||||||
.bgimg {
|
.boxtitle {
|
||||||
background-image: url('https://cdn-upload.datav.aliyun.com/upload/download/1678762309227-E6RP8z2R.png');
|
color: #fff;
|
||||||
background-size: 140% 100%;
|
font-size: 16px;
|
||||||
}
|
display: flex;
|
||||||
|
height: 36px;
|
||||||
|
background: linear-gradient(40deg, rgba(11, 101, 140, 0.451), rgba(0, 34, 48, 0.335), rgba(11, 101, 140, 0.451));
|
||||||
|
}
|
||||||
|
|
||||||
|
.bgimg {
|
||||||
|
background-image: url('https://cdn-upload.datav.aliyun.com/upload/download/1678762309227-E6RP8z2R.png');
|
||||||
|
background-size: 140% 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.boxmain {
|
||||||
|
height: calc(100% - 40px);
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 800px) {
|
||||||
.boxmain {
|
.boxmain {
|
||||||
height: calc(100% - 40px);
|
height: 200px;
|
||||||
}
|
|
||||||
@media screen and (max-width: 800px) {
|
|
||||||
.boxmain {
|
|
||||||
height: 200px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.flex_center {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.border {
|
.flex_center {
|
||||||
border: 1px dashed #49bcf7;
|
display: flex;
|
||||||
}
|
align-items: center;
|
||||||
|
justify-content: center
|
||||||
|
}
|
||||||
|
|
||||||
.bigdata {
|
.border {
|
||||||
font-size: 24px;
|
border: 1px dashed #49bcf7;
|
||||||
}
|
}
|
||||||
.boxlabel {
|
|
||||||
margin-left: 6px;
|
|
||||||
font-size: 18px;
|
|
||||||
margin-top: 6px
|
|
||||||
}
|
|
||||||
.wrapper{
|
|
||||||
overflow: hidden;
|
|
||||||
height: 220px;
|
|
||||||
}
|
|
||||||
.wrapper2{
|
|
||||||
height: 180px;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title{
|
.bigdata {
|
||||||
height: 40px;
|
font-size: 24px;
|
||||||
line-height: 40px;
|
box-sizing: border-box;
|
||||||
text-align: center;
|
}
|
||||||
}
|
|
||||||
.marquee_top{
|
.boxlabel {
|
||||||
transition: all 0.5s ease-in-out;
|
margin-left: 6px;
|
||||||
margin-top: -26px;
|
font-size: 18px;
|
||||||
}
|
margin-top: 6px
|
||||||
.totall{
|
}
|
||||||
color: #fff;
|
|
||||||
background-color: rgb(10, 63, 68);
|
.wrapper {
|
||||||
}
|
overflow: hidden;
|
||||||
.rollData{
|
height: 220px;
|
||||||
background-color: rgb(10, 39, 50);
|
}
|
||||||
}
|
|
||||||
.rollData:nth-of-type(2n+1){
|
.wrapper2 {
|
||||||
background-color: rgb(0, 59, 81);
|
height: 180px;
|
||||||
}
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.marquee_top {
|
||||||
|
transition: all 0.5s ease-in-out;
|
||||||
|
margin-top: -26px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.totall {
|
||||||
|
color: #fff;
|
||||||
|
background-color: rgb(10, 63, 68);
|
||||||
|
}
|
||||||
|
|
||||||
|
.rollData {
|
||||||
|
background-color: rgb(10, 39, 50);
|
||||||
|
}
|
||||||
|
|
||||||
|
.rollData:nth-of-type(2n+1) {
|
||||||
|
background-color: rgb(0, 59, 81);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
|
@ -120,7 +120,10 @@
|
||||||
<div class="border_corner border_right_bottom"></div>
|
<div class="border_corner border_right_bottom"></div>
|
||||||
<p class="title">{{ dialogData.deptName }}</p>
|
<p class="title">{{ dialogData.deptName }}</p>
|
||||||
<div class="infoCantier">
|
<div class="infoCantier">
|
||||||
<div class="leftBlock">
|
<div class="leftBlock" v-if="dialogData.deptName == '办公楼'">
|
||||||
|
<img src="img/gz_logo.png" alt="" style="width:100%">
|
||||||
|
</div>
|
||||||
|
<div class="leftBlock" v-else>
|
||||||
<el-progress :width="70" type="circle" color="rgba(54, 217, 187, 1)" :percentage="dialogData.percentage"
|
<el-progress :width="70" type="circle" color="rgba(54, 217, 187, 1)" :percentage="dialogData.percentage"
|
||||||
id="dashbordProcess">
|
id="dashbordProcess">
|
||||||
<span class="percentage-value" style="font-size: 16px">{{ dialogData.percentage }}%</span>
|
<span class="percentage-value" style="font-size: 16px">{{ dialogData.percentage }}%</span>
|
||||||
|
@ -129,8 +132,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="rightBlock">
|
<div class="rightBlock">
|
||||||
<div>
|
<div>
|
||||||
<p>昨日产量</p>
|
<p v-if="dialogData.deptName !== '办公楼'">昨日产量</p>
|
||||||
<!-- <p> <span class="numberFont">390</span><span class="numberUnit">件</span></p> -->
|
|
||||||
</div>
|
</div>
|
||||||
<div class="countWrap">
|
<div class="countWrap">
|
||||||
<div v-if="dialogData.deptName == '光纤预制管生产车间' || dialogData.deptName == '光学精密加工车间'">
|
<div v-if="dialogData.deptName == '光纤预制管生产车间' || dialogData.deptName == '光学精密加工车间'">
|
||||||
|
@ -148,6 +150,10 @@
|
||||||
<p> <span class="numberFont">{{ dialogData.count }}</span><span class="numberUnit">kg</span>
|
<p> <span class="numberFont">{{ dialogData.count }}</span><span class="numberUnit">kg</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="dialogData.deptName == '办公楼'">
|
||||||
|
<p style="font-size:12px">
|
||||||
|
公司秉承“善用资源,服务建设”的核心理念,践行“材料创造美好世界”的企业使命,坚持“创新、绩效、和谐、责任”的核心价值观,努力成长为具有创新精神和全球视野的光子材料领先企业。</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -160,7 +166,10 @@
|
||||||
<div class="border_corner border_right_bottom"></div>
|
<div class="border_corner border_right_bottom"></div>
|
||||||
<p class="title">{{ currentData.deptName }}</p>
|
<p class="title">{{ currentData.deptName }}</p>
|
||||||
<div class="infoCantier">
|
<div class="infoCantier">
|
||||||
<div class="leftBlock">
|
<div class="leftBlock" v-if="currentData.deptName == '办公楼'">
|
||||||
|
<img src="img/gz_logo.png" alt="" style="margin-top:10px">
|
||||||
|
</div>
|
||||||
|
<div class="leftBlock" v-else>
|
||||||
<el-progress :width="100" type="circle" color="rgba(54, 217, 187, 1)"
|
<el-progress :width="100" type="circle" color="rgba(54, 217, 187, 1)"
|
||||||
:percentage="currentData.percentage" id="dashbordProcess">
|
:percentage="currentData.percentage" id="dashbordProcess">
|
||||||
<span class="percentage-value" style="font-size: 16px">{{ currentData.percentage }}%</span>
|
<span class="percentage-value" style="font-size: 16px">{{ currentData.percentage }}%</span>
|
||||||
|
@ -169,8 +178,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="rightBlock">
|
<div class="rightBlock">
|
||||||
<div>
|
<div>
|
||||||
<p>昨日产量</p>
|
<p v-if="currentData.deptName !== '办公楼'">昨日产量</p>
|
||||||
<!-- <p> <span class="numberFont">390</span><span class="numberUnit">件</span></p> -->
|
|
||||||
</div>
|
</div>
|
||||||
<div class="countWrap">
|
<div class="countWrap">
|
||||||
<div v-if="currentData.deptName == '光纤预制管生产车间' || currentData.deptName == '光学精密加工车间'">
|
<div v-if="currentData.deptName == '光纤预制管生产车间' || currentData.deptName == '光学精密加工车间'">
|
||||||
|
@ -190,6 +198,9 @@
|
||||||
<p> <span class="numberFont">{{ currentData.count }}</span><span class="numberUnit">kg</span>
|
<p> <span class="numberFont">{{ currentData.count }}</span><span class="numberUnit">kg</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="currentData.deptName == '办公楼'">
|
||||||
|
<p>公司秉承“善用资源,服务建设”的核心理念,践行“材料创造美好世界”的企业使命,坚持“创新、绩效、和谐、责任”的核心价值观,努力成长为具有创新精神和全球视野的光子材料领先企业。</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<CircleClose class="circleClose" @click="circleClose" />
|
<CircleClose class="circleClose" @click="circleClose" />
|
||||||
|
@ -416,7 +427,7 @@ export default {
|
||||||
let cDate = new Date();
|
let cDate = new Date();
|
||||||
let yesterday = new Date(cDate.getTime() - ondDayTime);
|
let yesterday = new Date(cDate.getTime() - ondDayTime);
|
||||||
let week = yesterday.getDay();//当前时间的week数
|
let week = yesterday.getDay();//当前时间的week数
|
||||||
console.log(week);
|
// console.log(week);
|
||||||
let weekFirst = week - 1;//第一天对应的天数
|
let weekFirst = week - 1;//第一天对应的天数
|
||||||
let weekLast = 7 - week;//最后一天对应的天数
|
let weekLast = 7 - week;//最后一天对应的天数
|
||||||
if (week == 0) {
|
if (week == 0) {
|
||||||
|
@ -686,7 +697,7 @@ export default {
|
||||||
let countOkDept10 = [0, 0, 0, 0, 0, 0, 0], countRateDept10 = [0, 0, 0, 0, 0, 0, 0];
|
let countOkDept10 = [0, 0, 0, 0, 0, 0, 0], countRateDept10 = [0, 0, 0, 0, 0, 0, 0];
|
||||||
let countOk_dept10 = 0;
|
let countOk_dept10 = 0;
|
||||||
if (list.length > 0) {
|
if (list.length > 0) {
|
||||||
console.log(this.weekDateList)
|
// console.log(this.weekDateList)
|
||||||
list.forEach(item => {
|
list.forEach(item => {
|
||||||
let index = that.weekDateList.indexOf(item.日);
|
let index = that.weekDateList.indexOf(item.日);
|
||||||
countOkDept10[index] = item.合格数;
|
countOkDept10[index] = item.合格数;
|
||||||
|
@ -861,7 +872,7 @@ export default {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
that.taskBoard.data = data;
|
that.taskBoard.data = data;
|
||||||
console.log('getMaterialList', data)
|
// console.log('getMaterialList', data)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
showTime() {
|
showTime() {
|
||||||
|
@ -1074,7 +1085,7 @@ export default {
|
||||||
const pickResult = scene.pick(scene.pointerX, scene.pointerY);
|
const pickResult = scene.pick(scene.pointerX, scene.pointerY);
|
||||||
if (pickResult.hit) {
|
if (pickResult.hit) {
|
||||||
const mesh = pickResult.pickedMesh;
|
const mesh = pickResult.pickedMesh;
|
||||||
console.log('mesh', mesh)
|
// console.log('mesh', mesh)
|
||||||
if (that.nodesLists[mesh.name]) {
|
if (that.nodesLists[mesh.name]) {
|
||||||
that.getDeptClickData(that.nodesLists[mesh.name])
|
that.getDeptClickData(that.nodesLists[mesh.name])
|
||||||
hl1Click.removeAllMeshes();
|
hl1Click.removeAllMeshes();
|
||||||
|
@ -1119,7 +1130,7 @@ export default {
|
||||||
},
|
},
|
||||||
getDeptData(name) {
|
getDeptData(name) {
|
||||||
this.infoVisibel = true;
|
this.infoVisibel = true;
|
||||||
console.log('hoverName', name)
|
// console.log('hoverName', name)
|
||||||
if (name == '光学精密加工车间') { //6
|
if (name == '光学精密加工车间') { //6
|
||||||
this.dialogData = this.dept6Obj;
|
this.dialogData = this.dept6Obj;
|
||||||
} else if (name == '光纤预制棒生产车间') {//7
|
} else if (name == '光纤预制棒生产车间') {//7
|
||||||
|
@ -1131,7 +1142,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getDeptClickData(name) {
|
getDeptClickData(name) {
|
||||||
console.log('clickName', name)
|
// console.log('clickName', name)
|
||||||
if (name == '光学精密加工车间') { //6
|
if (name == '光学精密加工车间') { //6
|
||||||
this.currentData = this.dept6Obj;
|
this.currentData = this.dept6Obj;
|
||||||
} else if (name == '光纤预制棒生产车间') {//7
|
} else if (name == '光纤预制棒生产车间') {//7
|
||||||
|
@ -1849,7 +1860,7 @@ export default {
|
||||||
|
|
||||||
.inforBlock.clickBlock {
|
.inforBlock.clickBlock {
|
||||||
left: 50%;
|
left: 50%;
|
||||||
width: 630px;
|
width: 520px;
|
||||||
height: 225px;
|
height: 225px;
|
||||||
padding: 40px;
|
padding: 40px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
|
Loading…
Reference in New Issue