大屏优化

dev
qiuhongwu 5 months ago
parent c0aeef65da
commit 7088867a29

@ -212,7 +212,12 @@ export default {
} }
.item_span { .item_span {
display: inline-block; display: inline-block;
padding: 5px 25px; padding: 5px 0;
text-align: center;
width:100px;
overflow: hidden; /* 隐藏超出的内容 */
text-overflow: ellipsis; /* 添加省略号 */
white-space: nowrap; /* 防止内容换行 */
} }
} }
.ranking1 { .ranking1 {

@ -114,7 +114,7 @@ export default {
this.config = { ...this.config }; this.config = { ...this.config };
this.config1 = { ...this.config1 }; this.config1 = { ...this.config1 };
} else { } else {
this.datas = JSON.parse(item.data); var datas = JSON.parse(item.data);
this.config.data = [datas[0] * 1]; this.config.data = [datas[0] * 1];
this.config1.data = [datas[1] * 1]; this.config1.data = [datas[1] * 1];
this.config = { ...this.config }; this.config = { ...this.config };

@ -122,12 +122,7 @@ export default {
formatter: "{value}%", formatter: "{value}%",
waveNum: 2, waveNum: 2,
waveHeight: 10, waveHeight: 10,
colors: colors:item[5] == 0? ["#00FFFF", "#00B2EE"]:(item[5] == 2?["#FFE57E", "#FF6715"]: ["#ff6600", "#CD0100"]),
item[5] == 0
? ["#00FFFF", "#00B2EE"]
: item[5] == 2
? ["#ff6600", "#CD0100"]
: ["#FFE57E", "#FF6715"],
// //
}; };
this.reqlist.push({ this.reqlist.push({
@ -141,6 +136,7 @@ export default {
config: n, config: n,
}); });
} }
this.lessL = 12 - this.reqlist.length;
} else { } else {
var datalist = JSON.parse(item.data); var datalist = JSON.parse(item.data);
for (const item of datalist) { for (const item of datalist) {
@ -151,11 +147,7 @@ export default {
waveNum: 2, waveNum: 2,
waveHeight: 10, waveHeight: 10,
colors: colors:
item[5] == 0 item[5] == 0? ["#00FFFF", "#00B2EE"]:(item[5] == 2?["#FFE57E", "#FF6715"]: ["#ff6600", "#CD0100"]),
? ["#00FFFF", "#00B2EE"]
: item[5] == 2
? ["#ff6600", "#CD0100"]
: ["#FFE57E", "#FF6715"],
// //
}; };
this.reqlist.push({ this.reqlist.push({
@ -169,6 +161,7 @@ export default {
config: n, config: n,
}); });
} }
this.lessL = 12 - this.reqlist.length;
} }
} }
}); });
@ -499,12 +492,7 @@ export default {
formatter: "{value}%", formatter: "{value}%",
waveNum: 2, waveNum: 2,
waveHeight: 10, waveHeight: 10,
colors: colors:item[5] == 0? ["#00FFFF", "#00B2EE"]:(item[5] == 2?["#FFE57E", "#FF6715"]: ["#ff6600", "#CD0100"]),
item.intraday_yield_rate > 97
? ["#00FFFF", "#00B2EE"]
: item.intraday_yield_rate > 92
? ["#ff6600", "#CD0100"]
: ["#FFE57E", "#FF6715"],
// //
}; };
_this.reqlist.push({ _this.reqlist.push({

@ -15,138 +15,58 @@
<dv-scroll-board class="dv-scr-board" :config="config" /> <dv-scroll-board class="dv-scr-board" :config="config" />
</div> </div>
</div> </div>
<el-dialog title="工单详细信息" style="font-color:#fff" :visible.sync="moDetailShow" width="50%" :append-to-body="true">
<el-descriptions class="margin-top" :column="1" border>
<el-descriptions-item>
<template slot="label">工单号</template>{{ moInfo.FBILL_NO }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">产线</template>{{ moInfo.FWORK_SHOP }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">产品名称</template>{{ moInfo.FMATERIAL_NAME }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">型号</template>{{ moInfo.FSPECIFICATION }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">单位</template>{{ moInfo.FUNIT_ID }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">计划数量</template>{{ moInfo.FQTY_SHOW }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">合格品数量</template>{{ moInfo.FREPQUAAUX_QTY_SHOW }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">不合格数量</template>{{ moInfo.FREPFAILAUX_QTY_SHOW }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">开工</template>{{ moInfo.FSTATUS }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">计划开工日期</template>{{ moInfo.FPLAN_START_DATE_SHOW }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">预定完工日期</template>{{ moInfo.FPLAN_FINISH_DATE_SHOW }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">实际开工时间</template>{{ moInfo.FSTART_DATE_SHOW }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">实际完工时间</template>{{ moInfo.FFINISH_DATE_SHOW }}
</el-descriptions-item>
</el-descriptions>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="moDetailShow = false"> </el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { request } from "@/utils/request.js"; import { request } from '@/utils/request.js'
export default { export default {
data() { data() {
return { return {
config: { config: {
header: [ header: ['生产订单', '产品名称', '订单数量', '合格品数量', '剩余天数', '生产进度%'],
"生产订单",
"产品名称",
"订单数量",
"合格品数量",
"剩余天数",
"生产进度%",
],
// data: [], // data: [],
data: [ data: [
["MO000680", "2020*510门扇 040201001", "1000", "997", "3", "99.70%"], ['MO000680', '2020*510门扇 040201001', '1000', '997', '3', '99.70%'],
["MO000681", "2020*560门扇 040201015", "1023", "989", "34", "96.68%"], ['MO000681', '2020*560门扇 040201015', '1023', '989', '34', '96.68%'],
[ ['MO000682', '2020*750门扇 040201051', '1653', '1546', '107', '93.53%'],
"MO000682", ['MO000683', 'L100延长套', '1245', '1103', '142', '88.59%'],
"2020*750门扇 040201051", ['MO000684', 'C120门套 040201084', '2341', '2340', '1', '99.96%'],
"1653", ['MO000685', 'B100横头 040201093', '2213', '2209', '4', '99.82%'],
"1546", ['MO000686', '2030*650移门 040201101', '678', '619', '59', '91.30%'],
"107", ['MO000687', '2020*600 窄玻璃门 040201111', '1908', '1708', '200', '89.52%'],
"93.53%", ['MO000680', '2020*510门扇 040201001', '1000', '997', '3', '99.70%'],
], ['MO000681', '2020*560门扇 040201015', '1023', '989', '34', '96.68%'],
["MO000683", "L100延长套", "1245", "1103", "142", "88.59%"], ['MO000682', '2020*750门扇 040201051', '1653', '1546', '107', '93.53%'],
["MO000684", "C120门套 040201084", "2341", "2340", "1", "99.96%"], ['MO000683', 'L100延长套', '1245', '1103', '142', '88.59%'],
["MO000685", "B100横头 040201093", "2213", "2209", "4", "99.82%"], ['MO000684', 'C120门套 040201084', '2341', '2340', '1', '99.96%'],
["MO000686", "2030*650移门 040201101", "678", "619", "59", "91.30%"], ['MO000685', 'B100横头 040201093', '2213', '2209', '4', '99.82%'],
[ ['MO000686', '2030*650移门 040201101', '678', '619', '59', '91.30%'],
"MO000687", ['MO000687', '2020*600 窄玻璃门 040201111', '1908', '1708', '200', '89.52%']
"2020*600 窄玻璃门 040201111",
"1908",
"1708",
"200",
"89.52%",
],
["MO000680", "2020*510门扇 040201001", "1000", "997", "3", "99.70%"],
["MO000681", "2020*560门扇 040201015", "1023", "989", "34", "96.68%"],
[
"MO000682",
"2020*750门扇 040201051",
"1653",
"1546",
"107",
"93.53%",
],
["MO000683", "L100延长套", "1245", "1103", "142", "88.59%"],
["MO000684", "C120门套 040201084", "2341", "2340", "1", "99.96%"],
["MO000685", "B100横头 040201093", "2213", "2209", "4", "99.82%"],
["MO000686", "2030*650移门 040201101", "678", "619", "59", "91.30%"],
[
"MO000687",
"2020*600 窄玻璃门 040201111",
"1908",
"1708",
"200",
"89.52%",
],
], ],
rowNum: 8, // rowNum: 8, //
align: ["center"], align: ['center'],
headerHeight: 35, headerHeight: 35,
headerBGC: "#0f1325", // headerBGC: '#0f1325', //
oddRowBGC: "#0f1325", // oddRowBGC: '#0f1325', //
evenRowBGC: "#171c33", // evenRowBGC: '#171c33', //
// index: true, // index: true,
columnWidth: [130, 250, 120, 120, 120, 120], // columnWidth: [130, 250, 120, 120, 120, 120], //
align: ["center"], align: ['center']
}, },
moDetailShow: false, moDetailShow: false,
moKey: null, moKey: null,
moInfo: {}, moInfo: {}
}; }
}, },
created() { created() {
this.setData(); this.setData()
}, },
mounted() { mounted() {
this.setData(); this.setData()
this.startInterval(); this.startInterval()
this.startInterval1()
}, },
methods: { methods: {
// //
@ -157,91 +77,74 @@ export default {
// this.moDetailShow = true; // this.moDetailShow = true;
// }, // },
// //
startInterval1() {
const timer = 1000 * 60 * 10 // 10;
if (this.intervalId1 !== null) {
clearInterval(this.intervalId1) // this.intervalId1
}
this.intervalId1 = setInterval(() => {
location.reload()
}, timer)
},
startInterval() { startInterval() {
const _this = this; const _this = this
const time = 1000 * 60 * 60 * 2; const time = 1000 * 10
if (this.intervalId !== null) { if (this.intervalId !== null) {
clearInterval(this.intervalId); clearInterval(this.intervalId)
} }
this.intervalId = setInterval(() => { this.intervalId = setInterval(() => {
_this.setData(); _this.setData()
}, time); }, time)
}, },
setData() { setData() {
const _this = this; const _this = this
request({ request({
// //
url: "/admin-api/biz/screen/all", url: '/admin-api/biz/screen/all',
method: "get", method: 'get'
}).then((r) => { }).then((r) => {
// // //
localStorage.removeItem("myStoredArray"); // localStorage.removeItem("myStoredArray");
var dataArray = JSON.stringify(r.data); // var dataArray = JSON.stringify(r.data);
localStorage.setItem("myStoredArray", dataArray); // localStorage.setItem("myStoredArray", dataArray);
//
var oldData = localStorage.getItem('myStoredArray')
if (oldData) {
oldData = JSON.parse(oldData)
} else {
oldData = null
}
//
var newData = r.data
//
if (!_.isEqual(newData, oldData)) {
// 使lodashisEqual
//
localStorage.removeItem('myStoredArray')
var dataArray = JSON.stringify(newData)
localStorage.setItem('myStoredArray', dataArray)
} else {
//
// console.log('.')
}
r.data.filter((item) => { r.data.filter((item) => {
if (item.type == "ProductionStateList") { if (item.type == 'ProductionStateList') {
if (item.openMock == 1) { if (item.openMock == 1) {
var datalist = JSON.parse(item.mockData); var datalist = JSON.parse(item.mockData)
this.config.data = datalist; this.config.data = datalist
this.config = { ...this.config }; this.config = { ...this.config }
} else { } else {
var datalist = JSON.parse(item.data); var datalist = JSON.parse(item.data)
this.config.data = datalist; this.config.data = datalist
this.config = { ...this.config }; this.config = { ...this.config }
} }
} }
}); })
// if (r) { })
// const newArr = r.data.map(function (item) { }
// var ret = []; }
// ret.push( }
// item.FBILL_NO,
// item.FMATERIAL_NAME,
// item.FQTY_SHOW,
// item.FREPQUAAUX_QTY_SHOW,
// item.FREPFAILAUX_QTY_SHOW,
// (item.COMPLETE_RATE =
// (item.COMPLETE_RATE * 100).toFixed(1) + "%"),
// item.FENTRY_ID
// );
// return ret;
// });
// _this.config = {
// header: [
// "",
// "",
// "",
// "",
// "",
// "(%)",
// "11",
// ],
// data: newArr,
// rowNum: 8, //
// headerHeight: 35,
// headerBGC: "#0f1325", //
// oddRowBGC: "#0f1325", //
// evenRowBGC: "#171c33", //
// columnWidth: [110, 380, 100, 90, 100, 110, 0], //
// align: ["left", "left", "right", "right", "right", "right"], //
// };
// }
});
},
// getmoDetailInfo() {
// const _this = this;
// // request({
// // //
// // url: '/api/BigScreen/getPlanOrderDetail?fentryId=' + this.moKey,
// // method: 'get'
// // }).then((r) => {
// // // debugger
// // _this.moInfo = r.data
// // })
// },
},
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

Loading…
Cancel
Save