数据看板今日任务改动

This commit is contained in:
shijing 2024-01-23 09:08:08 +08:00
parent c2d09a0fe1
commit e0dcddfec6
3 changed files with 288 additions and 250 deletions

View File

@ -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;
// 11-----121 // 11-----121
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;
}); });
/////111-----1130 /////111-----1130
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 {
}); });
// 121 // 121
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>

View File

@ -14,13 +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" <div v-for="item in todayMtask" :key="item.id"
style="width:50%;display:inline-block; height: 40px;"> style="width:50%;display:inline-block;height: 40px;line-height:40px;padding:0 20px;">
<span style="font-size:12px">{{ item.number }}</span> <div
<span style="display:flex;justify-content:space-between;border-bottom:1px dashed #eeeeee">
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
</span> style="color: #fef000;margin-left: 10px;font-weight:bold;font-family:electronicFont">
{{ item.count }}
</span>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -282,7 +286,12 @@ export default {
refValue2: 'moocBox2', refValue2: 'moocBox2',
liData1: ['序号', '日期', '名称', '型号', '规格', '发货数量'], liData1: ['序号', '日期', '名称', '型号', '规格', '发货数量'],
liData2: ['序号', '工序', '产品名称', '型号', '计划数量', '合格数量', '完成进度', '合格率'], liData2: ['序号', '工序', '产品名称', '型号', '计划数量', '合格数量', '完成进度', '合格率'],
todayUtask: [], todayMtask: [
{ material_out_name: '光纤预制棒|33*470|ZJ2|棒料成型', count: 300 },
{ 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: [], saleOutData: [],
processData: [], processData: [],
time: null, time: null,
@ -338,7 +347,7 @@ export default {
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();
// //
@ -368,17 +377,23 @@ export default {
}, 500) }, 500)
}, },
// //
getTodayUtask() { getTodayMtask() {
let that = this; let that = this;
let obj = {}; let obj = {};
obj.start_date__lte = this.today; obj.start_date = this.today;
obj.end_date__gte = this.today; obj.end_date = this.today;
obj.belong_dept__name = '6车间'; obj.is_count_utask = true;
obj.mgroup__belong_dept__name = '6车间';
obj.page = 0; obj.page = 0;
that.$API.pm.utask.list.req(obj).then((res) => { that.$API.pm.mtask.list.req(obj).then((res) => {
that.todayUtask = res; that.todayMtask = res;
console.log('今日任务:', res); console.log('今日任务:', res);
}); });
// that.$API.pm.utask.list.req(obj).then((res) => {
// that.todayMtask = res;
// console.log(':', res);
// });
}, },
// //
getMioItem() { getMioItem() {

View File

@ -12,13 +12,17 @@
<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" <div v-for="item in todayMtask" :key="item.id"
style="width:50%;display:inline-block; height: 40px;"> style="width:50%;display:inline-block;height: 40px;line-height:40px;padding:0 20px;">
<span style="font-size:12px">{{ item.material_out_name }}</span> <div style="display:flex;justify-content:space-between;border-bottom:1px dashed #eeeeee">
<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
</span> style="color: #fef000;margin-left: 10px;font-weight:bold;font-family:electronicFont">
{{ item.count }}
</span>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -537,7 +541,7 @@ export default {
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;
@ -616,6 +620,7 @@ export default {
.bigdata { .bigdata {
font-size: 24px; font-size: 24px;
box-sizing: border-box;
} }
.boxlabel { .boxlabel {