From c5c6fa800cedd37cea0e3cc3e68df78b47ee2813 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期一, 28 八月 2023 10:37:59 +0800
Subject: [PATCH] 111
---
screen_standard/src/views/index.vue | 145 +++++++++++++++++++++++++++++++++---------------
1 files changed, 100 insertions(+), 45 deletions(-)
diff --git a/screen_standard/src/views/index.vue b/screen_standard/src/views/index.vue
index b996fd3..025a41b 100644
--- a/screen_standard/src/views/index.vue
+++ b/screen_standard/src/views/index.vue
@@ -54,7 +54,7 @@
<div class="scroll_item_row">{{ item.materialName }}</div>
<div class="scroll_item_row">{{ item.materialCode }}</div>
<div class="scroll_item_row">{{ item.num }}</div>
- <div class="scroll_item_row">
+ <div class="scroll_item_row" style="text-align: left;">
<el-tooltip v-for="(child, i) in item.procedureList" :key="i" effect="dark"
:content="'宸叉姤宸ヨ壇鍝佹暟' + child.doneNum + '锛涘伐搴忚鍒掓暟' + child.planNum" placement="top">
<div class="scroll_item_row_item" @click="jump(child.procedureId, child.procedureName)">
@@ -137,8 +137,8 @@
<div v-for="(item, index) in data.log" :key="index"
:class="index % 2 == 0 ? 'scroll_item scroll_item_bg1' : 'scroll_item scroll_item_bg2'">
<div class="scroll_item_row">{{ item.userName }}</div>
+ <div class="scroll_item_row">{{ item.materialName }}</div>
<div class="scroll_item_row">{{ item.procedureName }}</div>
- <div class="scroll_item_row">{{ item.materialCode }}</div>
<div class="scroll_item_row">{{ dateToSub(item.createTime) }}</div>
<div class="scroll_item_row">{{ item.qualifiedNum || 0 }}</div>
<div class="scroll_item_row">{{ item.unqualifiedNum || 0 }}</div>
@@ -157,7 +157,7 @@
<span>杩�7澶╀笉鑹搧鍒嗗竷</span>
</div>
<div class="content_right_top_nr">
-
+
<div class="content_right_top_nr_top" id="lineChrat"></div>
<div class="content_right_top_nr_bottom">
<div class="content_right_top_nr_bottom_yuan" v-if="data.typeDistribution.length > 0">
@@ -166,7 +166,7 @@
</div>
<div id="pieChart"></div>
</div>
-
+
</div>
</div>
<!-- 璁惧宸℃璁板綍 -->
@@ -187,7 +187,10 @@
:class="index % 2 == 0 ? 'scroll_item scroll_item_bg1' : 'scroll_item scroll_item_bg2'">
<div class="scroll_item_row">{{ dateToSub(item.checkdate) }}</div>
<div class="scroll_item_row">{{ item.deviceName }}</div>
- <div class="scroll_item_row">{{ item.status == 0 ? '鍚堟牸' : '涓嶅悎鏍�' }}</div>
+ <div class="scroll_item_row">
+ <span v-if="item.status == 0">姝e父</span>
+ <span v-else style="color: #F84F26">寮傚父</span>
+ </div>
<div class="scroll_item_row">{{ item.userName }}</div>
</div>
</div>
@@ -218,10 +221,11 @@
dayDistribution: [],
typeDistribution: [],
num: 0,
- baseNum: 0
+ baseNum: 0,
+ bottomAuthHeight: 284
})
-let { baseNum } = toRefs(data)
+let { baseNum, bottomAuthHeight } = toRefs(data)
let timer = ref(null)
let timer1 = ref(null)
@@ -229,7 +233,6 @@
let timer3 = ref(null)
let timer4 = ref(null)
let timer5 = ref(null)
-let bottomAuthHeight = 284;
let scrollContainer = ref(null)
let scrollContainer1 = ref(null)
let scrollContainer2 = ref(null)
@@ -282,9 +285,11 @@
.then(res => {
if (res.length > 0) {
data.baseNum = res[0].doneNum
- data.production = res
- start()
+ } else {
+ data.baseNum = 0
}
+ data.production = res
+ data.fifthScroll = true
})
// 浠撳簱瀹炴椂浣欓噺缁熻
// getStockList(companyId.value, departId.value)
@@ -316,8 +321,8 @@
}
}
})
-
-
+
+
// 鎶ュ伐鏃ュ織
getRecordLogPage(companyId.value, departId.value, {
capacity: 20,
@@ -376,8 +381,7 @@
}
function setBottomHeight(){
const pageHeight = window.innerHeight;
- bottomAuthHeight = pageHeight -700;
- // bottom1.style.height=bottomAuthHeight;
+ bottomAuthHeight = pageHeight - 700;
}
/**
@@ -403,6 +407,11 @@
fontSize: 12
}
},
+ grid: {
+ top: 40,
+ bottom: 30,
+ left: 60
+ },
xAxis: {
type: 'category',
boundaryGap: false,
@@ -410,6 +419,15 @@
lineStyle: {
width: 0.5,
color: ['#fff']
+ }
+ },
+ axisLine: {
+ show: true,
+ onZero: true,
+ lineStyle: {
+ width: 0.5,
+ color: '#fff',
+ opacity: .5
}
},
axisLabel: {
@@ -426,6 +444,15 @@
lineStyle: {
width: 0.5,
color: ['#fff']
+ }
+ },
+ axisLine: {
+ show: true,
+ onZero: true,
+ lineStyle: {
+ width: 1,
+ color: '#fff',
+ opacity: .5
}
},
axisLabel: {
@@ -550,14 +577,6 @@
}
option && myChart.setOption(option);
}
-
-// onBeforeUnmount(()=>{
-// clearTimeout(timer.value)
-// clearTimeout(timer1.value)
-// clearTimeout(timer2.value)
-// clearTimeout(timer3.value)
-// clearTimeout(timer4.value)
-// })
onUnmounted(() => {
clearTimeout(timer.value)
clearTimeout(timer1.value)
@@ -667,15 +686,16 @@
if (scrollDom.offsetHeight == 0) {
scrollDom = scrollContainer.value
} else {
+ let maxLength = scrollDom.clientHeight/34
// 濡傛灉鍒楄〃鏁伴噺杩囧皯涓嶈繘琛屾粴鍔�
- if (scrollDom.children.length < 6) {
+ if (scrollDom.children.length <= maxLength) {
clearTimeout(timer.value)
return
}
// 缁勪欢杩涜婊氬姩
- scrollDom.scrollTop += 1
+ scrollDom.scrollTop += 2
// 鍒ゆ柇鏄惁婊氬姩鍒板簳閮�
- if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight)) {
+ if (Math.floor(scrollDom.scrollTop) >= (scrollDom.scrollHeight - scrollDom.clientHeight)) {
// 鑾峰彇缁勪欢绗竴涓妭鐐�
let first = scrollDom.children[0]
// 鍒犻櫎鑺傜偣
@@ -693,14 +713,14 @@
scrollDom = scrollContainer1.value
} else {
// 濡傛灉鍒楄〃鏁伴噺杩囧皯涓嶈繘琛屾粴鍔�
- if (scrollDom.children.length < 7) {
+ if (scrollDom.children.length < 6) {
clearTimeout(timer1.value)
return
}
// 缁勪欢杩涜婊氬姩
- scrollDom.scrollTop += 1
+ scrollDom.scrollTop += 2
// 鍒ゆ柇鏄惁婊氬姩鍒板簳閮�
- if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight)) {
+ if (scrollDom.scrollTop+2 >= (scrollDom.scrollHeight - scrollDom.clientHeight)) {
// 鑾峰彇缁勪欢绗竴涓妭鐐�
let first = scrollDom.children[0]
// 鍒犻櫎鑺傜偣
@@ -745,12 +765,15 @@
scrollDom = scrollContainer3.value
} else {
// 濡傛灉鍒楄〃鏁伴噺杩囧皯涓嶈繘琛屾粴鍔�
- if (scrollDom.children.length <= 5) {
+ let num = scrollContainer3.value.offsetHeight / 35;
+ // alert(scrollDom.children.length +"---------------"+num)
+ // 濡傛灉鍒楄〃鏁伴噺杩囧皯涓嶈繘琛屾粴鍔�
+ if (scrollDom.children.length <= num) {
clearTimeout(timer3.value)
return
}
// 缁勪欢杩涜婊氬姩
- scrollDom.scrollTop += 1
+ scrollDom.scrollTop = scrollDom.scrollTop+2
// 鍒ゆ柇鏄惁婊氬姩鍒板簳閮�
if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight)) {
// 鑾峰彇缁勪欢绗竴涓妭鐐�
@@ -769,15 +792,29 @@
if (scrollDom.offsetHeight == 0) {
scrollDom = scrollContainer4.value
} else {
- // 濡傛灉鍒楄〃鏁伴噺杩囧皯涓嶈繘琛屾粴鍔�
- if (scrollDom.children.length < 5) {
+ // console.log(scrollDom.offsetHeight);
+ let num = scrollDom.offsetHeight / 35;
+ num = num + (scrollDom.offsetHeight % 35 > 0 ? 1 : 0)
+ // console.log('----------');
+ // console.log('scrollDom.children.length', scrollDom.children.length)
+ // console.log('scrollDom.offsetHeight % 35', scrollDom.offsetHeight % 35)
+ // console.log('num', num)
+ // console.log('----------');
+ // // 濡傛灉鍒楄〃鏁伴噺杩囧皯涓嶈繘琛屾粴鍔�
+ if (scrollDom.children.length <= num) {
clearTimeout(timer4.value)
return
}
// 缁勪欢杩涜婊氬姩
scrollDom.scrollTop += 1
+
// 鍒ゆ柇鏄惁婊氬姩鍒板簳閮�
if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight)) {
+ console.log('scrollDom.scrollTop', scrollDom.scrollTop);
+ console.log('scrollDom.scrollHeight', scrollDom.scrollHeight);
+ console.log('scrollDom.clientHeight', scrollDom.clientHeight );
+ // if (scrollDom.scrollTop >= 35) {
+
// 鑾峰彇缁勪欢绗竴涓妭鐐�
let first = scrollDom.children[0]
// 鍒犻櫎鑺傜偣
@@ -793,12 +830,29 @@
// })
onMounted(() => {
- if (!departId.value) return;
- timer5.value = setInterval(init(), 60000)
+ if (departId.value) {
+ console.log('onMounted');
+ init()
+ timer5.value = setInterval(init, 60000)
+ timer.value = setInterval(scrillAction, 100)
+ }
+ window.addEventListener('resize', () => {
+ setTypeChart()
+ setDayChart()
+ })
+
+})
+
+onUnmounted(() => {
+ clearTimeout(timer.value)
+ clearTimeout(timer5.value)
+
})
</script>
<style lang="scss" scoped>
+
+$fixed-height: 690px;
.content1 {
flex: 1;
width: 100%;
@@ -812,7 +866,7 @@
margin-right: 20px;
.content_left_item1 {
width: 100%;
- height: calc(100vh - 700px);
+ height: calc(100vh - 690px);
// height: 284px;
margin-bottom: 20px;
.content_left_item1_head {
@@ -837,7 +891,7 @@
.content_left_item1_content {
width: 100%;
- height: 246px;
+ height: calc(100% - 36px);
padding: 20px;
overflow: hidden;
box-sizing: border-box;
@@ -848,7 +902,8 @@
display: flex;
align-items: center;
justify-content: space-between;
- margin-bottom: 13px;
+ // margin-bottom: 13px;
+ padding: 7px 0;
&:last-child {
margin: 0;
@@ -974,7 +1029,7 @@
.main_container {
width: 100%;
- height: calc(100% - 35px);
+ height: calc(100% - 38px);
.scroll_container {
width: 100%;
@@ -1088,8 +1143,8 @@
color: #01D9FE;
&:nth-child(5) {
- flex: 2.7;
-
+ flex: 3;
+
}
}
}
@@ -1129,7 +1184,7 @@
&:nth-child(5) {
flex: 3;
-
+ justify-content: start;
}
.scroll_item_row_item {
margin-top: -11px;
@@ -1286,7 +1341,7 @@
.content_center_bottom {
width: 100%;
// height: 284px;
- height: calc(100vh - 700px);
+ height: calc(100vh - 690px);
flex: 2;
.content_center_bottom_head {
width: 100%;
@@ -1427,8 +1482,8 @@
left: 50%;
transform: translate(-50%, -50%);
z-index: 999;
- width: 114px;
- height: 114px;
+ width: 100px;
+ height: 100px;
border-radius: 50%;
border: 2px dashed #01D9FE;
display: flex;
@@ -1472,7 +1527,7 @@
width: 100%;
// height: 284px;
- height: calc(100vh - 700px);
+ height: calc(100vh - 690px);
.content_right_bottom_head {
width: 100%;
height: 38px;
--
Gitblit v1.9.3