|  |  |  | 
|---|
|  |  |  | <template> | 
|---|
|  |  |  | <div class="content1"> | 
|---|
|  |  |  | <div class="content_left"> | 
|---|
|  |  |  | <!-- 当日员工产量TOP10 --> | 
|---|
|  |  |  | <div class="content_left_item1"> | 
|---|
|  |  |  | <div class="content_left_item1_head"> | 
|---|
|  |  |  | <span>当日员工产量TOP10</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="content_left_item1_content"> | 
|---|
|  |  |  | <div class="content_left_item1_content_row" v-for="(item, index) in data.production" :key="index"> | 
|---|
|  |  |  | <div class="content_left_item1_content_row_name"> | 
|---|
|  |  |  | <div :class="index > 2 ? 'num bg1' : 'num bg2'">{{ index + 1 }}</div> | 
|---|
|  |  |  | <span>{{ item.userName }}</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="content_left_item1_content_row_line"> | 
|---|
|  |  |  | <el-progress :show-text="false" :percentage="item.doneNum / baseNum * 100"> | 
|---|
|  |  |  | </el-progress> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="content_left_item1_content_row_num">{{ item.doneNum }}</div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <!-- 仓库实时余量统计 --> | 
|---|
|  |  |  | <!-- <div class="content_left"> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <div class="content_left_item2"> | 
|---|
|  |  |  | <div class="content_left_item2_head"> | 
|---|
|  |  |  | <span>仓库实时余量统计</span> | 
|---|
|  |  |  | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> --> | 
|---|
|  |  |  | <div class="content_center"> | 
|---|
|  |  |  | <!-- 成品计划进度/工序进度 --> | 
|---|
|  |  |  | <div class="content_center_top"> | 
|---|
|  |  |  | 
|---|
|  |  |  | <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)"> | 
|---|
|  |  |  | <div class="scroll_item_row_item_x"></div> | 
|---|
|  |  |  | <!-- <img v-if="i == 0 || i == 1" src="@/assets/img/ic_complete@2x.png" alt="" /> --> | 
|---|
|  |  |  | <span v-if="child.rate < 100">{{ child.rate }}%</span> | 
|---|
|  |  |  | <span v-if="child.rate < 100">{{ child.rate.toFixed(0) }}%</span> | 
|---|
|  |  |  | <img v-else src="@/assets/img/ic_complete@2x.png" alt="" /> | 
|---|
|  |  |  | <span class="scroll_item_row_item_wz">{{ child.procedureName }}</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | 
|---|
|  |  |  | <div class="scroll_item_row">{{ item.qualifiedNum }}</div> | 
|---|
|  |  |  | <div class="scroll_item_row">{{ item.unqualifiedNum }}</div> | 
|---|
|  |  |  | <div class="scroll_item_row">{{ item.undoneNum }}</div> | 
|---|
|  |  |  | <div class="scroll_item_row">{{ item.unqualifiedRate }}%</div> | 
|---|
|  |  |  | <div class="scroll_item_row">{{ (item.unqualifiedRate||0).toFixed(2) }}%</div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <!-- 报工日志 --> | 
|---|
|  |  |  | <div class="content_center_bottom"> | 
|---|
|  |  |  | <div class="content_center_bottom_head"> | 
|---|
|  |  |  | <span>报工日志</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="content_center_bottom_b"> | 
|---|
|  |  |  | <div class="content_center_top_form_head"> | 
|---|
|  |  |  | <div class="content_center_top_form_head_item">员工名称</div> | 
|---|
|  |  |  | <div class="content_center_top_form_head_item">物料名称</div> | 
|---|
|  |  |  | <div class="content_center_top_form_head_item">物料编码</div> | 
|---|
|  |  |  | <div class="content_center_top_form_head_item">报工时间</div> | 
|---|
|  |  |  | <div class="content_center_top_form_head_item">良品数</div> | 
|---|
|  |  |  | <div class="content_center_top_form_head_item">不良品数</div> | 
|---|
|  |  |  | <div class="content_center_top_form_head_item">不良率</div> | 
|---|
|  |  |  | <div style="display: flex;"> | 
|---|
|  |  |  | <div class="content_left" style="flex: 1;"> | 
|---|
|  |  |  | <div class="content_left_item1"> | 
|---|
|  |  |  | <div class="content_left_item1_head"> | 
|---|
|  |  |  | <span>当日员工产量TOP10</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="content_left_item1_content" ref="scrollContainer"> | 
|---|
|  |  |  | <div class="content_left_item1_content_row" v-for="(item, index) in data.production" :key="index"> | 
|---|
|  |  |  | <div class="content_left_item1_content_row_name"> | 
|---|
|  |  |  | <div :class="index > 2 ? 'num bg1' : 'num bg2'">{{ index + 1 }}</div> | 
|---|
|  |  |  | <span>{{ item.userName }}</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="content_left_item1_content_row_line"> | 
|---|
|  |  |  | <el-progress :show-text="false" :percentage="item.doneNum / baseNum * 100"> | 
|---|
|  |  |  | </el-progress> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="content_left_item1_content_row_num">{{ item.doneNum }}</div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div @mouseenter="handleMouseEnter3" @mouseleave="handleMouseLeave3" class="main_container"> | 
|---|
|  |  |  | <div ref="scrollContainer3" class="scroll_container"> | 
|---|
|  |  |  | <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.materialCode }}</div> | 
|---|
|  |  |  | <div class="scroll_item_row">{{ item.createTime }}</div> | 
|---|
|  |  |  | <div class="scroll_item_row">{{ item.qualifiedNum ? item.qualifiedNum : '-' }}</div> | 
|---|
|  |  |  | <div class="scroll_item_row">{{ item.unqualifiedNum }}</div> | 
|---|
|  |  |  | <div class="scroll_item_row">{{ item.unqualifiedRate ? item.unqualifiedRate : '0' }}%</div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="content_center_bottom"> | 
|---|
|  |  |  | <div class="content_center_bottom_head"> | 
|---|
|  |  |  | <span>报工日志</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="content_center_bottom_b"> | 
|---|
|  |  |  | <div class="content_center_top_form_head"> | 
|---|
|  |  |  | <div class="content_center_top_form_head_item">员工名称</div> | 
|---|
|  |  |  | <div class="content_center_top_form_head_item">物料名称</div> | 
|---|
|  |  |  | <div class="content_center_top_form_head_item">工序</div> | 
|---|
|  |  |  | <div class="content_center_top_form_head_item">报工时间</div> | 
|---|
|  |  |  | <div class="content_center_top_form_head_item">良品数</div> | 
|---|
|  |  |  | <div class="content_center_top_form_head_item">不良品数</div> | 
|---|
|  |  |  | <div class="content_center_top_form_head_item">不良率</div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div @mouseenter="handleMouseEnter3" @mouseleave="handleMouseLeave3" class="main_container"> | 
|---|
|  |  |  | <div ref="scrollContainer3" class="scroll_container"> | 
|---|
|  |  |  | <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">{{ dateToSub(item.createTime) }}</div> | 
|---|
|  |  |  | <div class="scroll_item_row">{{ item.qualifiedNum || 0 }}</div> | 
|---|
|  |  |  | <div class="scroll_item_row">{{ item.unqualifiedNum || 0 }}</div> | 
|---|
|  |  |  | <div class="scroll_item_row">{{ (item.unqualifiedRate || 0).toFixed(2) }}%</div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | 
|---|
|  |  |  | <span>近7天不良品分布</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="content_right_top_nr"> | 
|---|
|  |  |  | <div class="content_right_top_nr_bottom_yuan" v-if="data.typeDistribution.length > 0"> | 
|---|
|  |  |  | <span>{{ data.num }}</span> | 
|---|
|  |  |  | <span>不良项分布</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <div class="content_right_top_nr_top" id="lineChrat"></div> | 
|---|
|  |  |  | <div class="content_right_top_nr_bottom" id="pieChart"></div> | 
|---|
|  |  |  | <div class="content_right_top_nr_bottom"> | 
|---|
|  |  |  | <div class="content_right_top_nr_bottom_yuan" v-if="data.typeDistribution.length > 0"> | 
|---|
|  |  |  | <span>{{ data.num }}</span> | 
|---|
|  |  |  | <span>不良项分布</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div id="pieChart"></div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <!-- 设备巡检记录 --> | 
|---|
|  |  |  | <div class="content_right_bottom"> | 
|---|
|  |  |  | <div class="content_right_bottom" ref="bottom1"> | 
|---|
|  |  |  | <div class="content_right_bottom_head"> | 
|---|
|  |  |  | <span>设备巡检记录</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | 
|---|
|  |  |  | <div ref="scrollContainer4" class="scroll_container"> | 
|---|
|  |  |  | <div v-for="(item, index) in data.patrolInspection" :key="index" | 
|---|
|  |  |  | :class="index % 2 == 0 ? 'scroll_item scroll_item_bg1' : 'scroll_item scroll_item_bg2'"> | 
|---|
|  |  |  | <div class="scroll_item_row">{{ item.checkdate }}</div> | 
|---|
|  |  |  | <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">正常</span> | 
|---|
|  |  |  | <span v-else style="color: #F84F26">异常</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="scroll_item_row">{{ item.userName }}</div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <script setup> | 
|---|
|  |  |  | import { dateToSub } from '@/utils' | 
|---|
|  |  |  | import { reactive, ref, onMounted, nextTick, onUnmounted, computed, watch, toRefs } from 'vue' | 
|---|
|  |  |  | import { getPlanData, getTop, getStockList, getWorkPlansList, getProcedureProcessList, getRecordLogPage, getDeviceCheckPage, getUnqualified7DayData, getUnqualifiedCateData } from '@/utils/api.js' | 
|---|
|  |  |  | import { useCounterStore } from '@/stores/counter.js' | 
|---|
|  |  |  | 
|---|
|  |  |  | 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) | 
|---|
|  |  |  | 
|---|
|  |  |  | let scrollContainer2 = ref(null) | 
|---|
|  |  |  | let scrollContainer3 = ref(null) | 
|---|
|  |  |  | let scrollContainer4 = ref(null) | 
|---|
|  |  |  | let bottom1 = ref(null) | 
|---|
|  |  |  | let cate = ref([ | 
|---|
|  |  |  | { | 
|---|
|  |  |  | name: '成品计划进度', | 
|---|
|  |  |  | 
|---|
|  |  |  | start1() | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const init = () => { | 
|---|
|  |  |  | setBottomHeight(); | 
|---|
|  |  |  | // 当日员工产量TOP10 | 
|---|
|  |  |  | getTop(companyId.value, departId.value) | 
|---|
|  |  |  | .then(res => { | 
|---|
|  |  |  | if (res.length > 0) { | 
|---|
|  |  |  | data.baseNum = res[0].doneNum | 
|---|
|  |  |  | data.production = res | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | data.baseNum = 0 | 
|---|
|  |  |  | } | 
|---|
|  |  |  | data.production = res | 
|---|
|  |  |  | data.fifthScroll = true | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | // 仓库实时余量统计 | 
|---|
|  |  |  | getStockList(companyId.value, departId.value) | 
|---|
|  |  |  | .then(res => { | 
|---|
|  |  |  | data.marginStatistics = res | 
|---|
|  |  |  | nextTick(() => { | 
|---|
|  |  |  | start() | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | // 成品计划进度 | 
|---|
|  |  |  | getWorkPlansList(companyId.value, departId.value) | 
|---|
|  |  |  | .then(res => { | 
|---|
|  |  |  | data.plannedProgress = res | 
|---|
|  |  |  | nextTick(() => { | 
|---|
|  |  |  | start1() | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | // getStockList(companyId.value, departId.value) | 
|---|
|  |  |  | //   .then(res => { | 
|---|
|  |  |  | //     data.marginStatistics = res | 
|---|
|  |  |  | //     nextTick(() => { | 
|---|
|  |  |  | //       start() | 
|---|
|  |  |  | //     }) | 
|---|
|  |  |  | //   }) | 
|---|
|  |  |  | cate.value.forEach((item, index) => { | 
|---|
|  |  |  | if (item.active) { | 
|---|
|  |  |  | if (index == 1) { | 
|---|
|  |  |  | getProcedureProcessList(companyId.value, departId.value) | 
|---|
|  |  |  | .then(res => { | 
|---|
|  |  |  | data.processProgress = res | 
|---|
|  |  |  | nextTick(() => { | 
|---|
|  |  |  | start2() | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | // 成品计划进度 | 
|---|
|  |  |  | getWorkPlansList(companyId.value, departId.value) | 
|---|
|  |  |  | .then(res => { | 
|---|
|  |  |  | data.plannedProgress = res | 
|---|
|  |  |  | nextTick(() => { | 
|---|
|  |  |  | start1() | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 报工日志 | 
|---|
|  |  |  | getRecordLogPage(companyId.value, departId.value, { | 
|---|
|  |  |  | capacity: 9999, | 
|---|
|  |  |  | capacity: 20, | 
|---|
|  |  |  | model: {}, | 
|---|
|  |  |  | page: 1 | 
|---|
|  |  |  | }).then(res => { | 
|---|
|  |  |  | 
|---|
|  |  |  | enterprise.setNum(res) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | function  setBottomHeight(){ | 
|---|
|  |  |  | const pageHeight = window.innerHeight; | 
|---|
|  |  |  | bottomAuthHeight = pageHeight - 700; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 七日折线图 | 
|---|
|  |  |  | 
|---|
|  |  |  | fontSize: 12 | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | grid: { | 
|---|
|  |  |  | top: 40, | 
|---|
|  |  |  | bottom: 30, | 
|---|
|  |  |  | left: 60 | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | xAxis: { | 
|---|
|  |  |  | type: 'category', | 
|---|
|  |  |  | boundaryGap: false, | 
|---|
|  |  |  | 
|---|
|  |  |  | lineStyle: { | 
|---|
|  |  |  | width: 0.5, | 
|---|
|  |  |  | color: ['#fff'] | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | axisLine: { | 
|---|
|  |  |  | show: true, | 
|---|
|  |  |  | onZero: true, | 
|---|
|  |  |  | lineStyle: { | 
|---|
|  |  |  | width: 0.5, | 
|---|
|  |  |  | color: '#fff', | 
|---|
|  |  |  | opacity: .5 | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | axisLabel: { | 
|---|
|  |  |  | 
|---|
|  |  |  | lineStyle: { | 
|---|
|  |  |  | width: 0.5, | 
|---|
|  |  |  | color: ['#fff'] | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | axisLine: { | 
|---|
|  |  |  | show: true, | 
|---|
|  |  |  | onZero: true, | 
|---|
|  |  |  | lineStyle: { | 
|---|
|  |  |  | width: 1, | 
|---|
|  |  |  | color: '#fff', | 
|---|
|  |  |  | opacity: .5 | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | axisLabel: { | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 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) | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | function ListScroll() { | 
|---|
|  |  |  | let scrollDom = scrollContainer.value | 
|---|
|  |  |  | if (!scrollDom) return | 
|---|
|  |  |  | // 判读组件是否渲染完成 | 
|---|
|  |  |  | if (scrollDom.offsetHeight == 0) { | 
|---|
|  |  |  | scrollDom = scrollContainer.value | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | let maxLength = scrollDom.clientHeight/34 | 
|---|
|  |  |  | // 如果列表数量过少不进行滚动 | 
|---|
|  |  |  | if (scrollDom.children.length < 8) { | 
|---|
|  |  |  | 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] | 
|---|
|  |  |  | // 删除节点 | 
|---|
|  |  |  | 
|---|
|  |  |  | function ListScroll1() { | 
|---|
|  |  |  | let scrollDom = scrollContainer1.value | 
|---|
|  |  |  | // 判读组件是否渲染完成 | 
|---|
|  |  |  | if (!scrollDom) return | 
|---|
|  |  |  | if (scrollDom.offsetHeight == 0) { | 
|---|
|  |  |  | 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] | 
|---|
|  |  |  | // 删除节点 | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | function ListScroll2() { | 
|---|
|  |  |  | let scrollDom = scrollContainer2.value | 
|---|
|  |  |  | if (!scrollDom) return | 
|---|
|  |  |  | // 判读组件是否渲染完成 | 
|---|
|  |  |  | if (scrollDom.offsetHeight == 0) { | 
|---|
|  |  |  | scrollDom = scrollContainer2.value | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | // 如果列表数量过少不进行滚动 | 
|---|
|  |  |  | if (scrollDom.children.length < 7) { | 
|---|
|  |  |  | if (scrollDom.children.length < 10) { | 
|---|
|  |  |  | clearTimeout(timer2.value) | 
|---|
|  |  |  | return | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // 组件进行滚动 | 
|---|
|  |  |  | scrollDom.scrollTop += 1 | 
|---|
|  |  |  | // console.log('scrollDom.scrollTop', scrollDom.scrollTop); | 
|---|
|  |  |  | // console.log('scrollDom.scrollHeight - scrollDom.clientHeight', scrollDom.scrollHeight - scrollDom.clientHeight); | 
|---|
|  |  |  | // 判断是否滚动到底部 | 
|---|
|  |  |  | if (scrollDom.scrollTop >= (scrollDom.scrollHeight - scrollDom.clientHeight)) { | 
|---|
|  |  |  | // 获取组件第一个节点 | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | function ListScroll3() { | 
|---|
|  |  |  | let scrollDom = scrollContainer3.value | 
|---|
|  |  |  | if (!scrollDom) return | 
|---|
|  |  |  | // 判读组件是否渲染完成 | 
|---|
|  |  |  | if (scrollDom.offsetHeight == 0) { | 
|---|
|  |  |  | scrollDom = scrollContainer3.value | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | // 如果列表数量过少不进行滚动 | 
|---|
|  |  |  | if (scrollDom.children.length < 6) { | 
|---|
|  |  |  | 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)) { | 
|---|
|  |  |  | // 获取组件第一个节点 | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | function ListScroll4() { | 
|---|
|  |  |  | let scrollDom = scrollContainer4.value | 
|---|
|  |  |  | if (!scrollDom) return | 
|---|
|  |  |  | // 判读组件是否渲染完成 | 
|---|
|  |  |  | if (scrollDom.offsetHeight == 0) { | 
|---|
|  |  |  | scrollDom = scrollContainer4.value | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | // 如果列表数量过少不进行滚动 | 
|---|
|  |  |  | if (scrollDom.children.length < 7) { | 
|---|
|  |  |  | // 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] | 
|---|
|  |  |  | // 删除节点 | 
|---|
|  |  |  | 
|---|
|  |  |  | // }) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 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%; | 
|---|
|  |  |  | height: auto; | 
|---|
|  |  |  | display: flex; | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .content_left { | 
|---|
|  |  |  | flex: 1; | 
|---|
|  |  |  | margin-right: 20px; | 
|---|
|  |  |  | .content_left_item1 { | 
|---|
|  |  |  | width: 100%; | 
|---|
|  |  |  | height: 398px; | 
|---|
|  |  |  | height:  calc(100vh - 690px); | 
|---|
|  |  |  | //  height: 284px; | 
|---|
|  |  |  | margin-bottom: 20px; | 
|---|
|  |  |  | .content_left_item1_head { | 
|---|
|  |  |  | background: url('@/assets/img/home_title_short@2x.png'); | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .content_left_item1_content { | 
|---|
|  |  |  | width: 100%; | 
|---|
|  |  |  | height: 360px; | 
|---|
|  |  |  | height: calc(100% - 36px); | 
|---|
|  |  |  | padding: 20px; | 
|---|
|  |  |  | overflow: hidden; | 
|---|
|  |  |  | box-sizing: border-box; | 
|---|
|  |  |  | background: linear-gradient(180deg, rgba(52, 88, 159, 0) 0%, rgba(0, 86, 255, 0.4) 100%); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | display: flex; | 
|---|
|  |  |  | align-items: center; | 
|---|
|  |  |  | justify-content: space-between; | 
|---|
|  |  |  | margin-bottom: 13px; | 
|---|
|  |  |  | // margin-bottom: 13px; | 
|---|
|  |  |  | padding: 7px 0; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | &:last-child { | 
|---|
|  |  |  | margin: 0; | 
|---|
|  |  |  | 
|---|
|  |  |  | .content_left_item2 { | 
|---|
|  |  |  | width: 100%; | 
|---|
|  |  |  | flex: 1; | 
|---|
|  |  |  | display: flex; | 
|---|
|  |  |  | flex-direction: column; | 
|---|
|  |  |  | .content_left_item2_head { | 
|---|
|  |  |  | background: url('@/assets/img/home_title_short@2x.png'); | 
|---|
|  |  |  | background-repeat: no-repeat; | 
|---|
|  |  |  | 
|---|
|  |  |  | .content_left_item2_content { | 
|---|
|  |  |  | width: 100%; | 
|---|
|  |  |  | height: 361px; | 
|---|
|  |  |  | height: 100%; | 
|---|
|  |  |  | padding: 20px; | 
|---|
|  |  |  | box-sizing: border-box; | 
|---|
|  |  |  | background: linear-gradient(180deg, rgba(52, 88, 159, 0) 0%, rgba(0, 86, 255, 0.4) 100%); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .item2_content_head { | 
|---|
|  |  |  | width: 100%; | 
|---|
|  |  |  | height: 36px; | 
|---|
|  |  |  | height: 35px; | 
|---|
|  |  |  | display: flex; | 
|---|
|  |  |  | align-items: center; | 
|---|
|  |  |  | background: rgba(52, 88, 159, 0.5); | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .main_container { | 
|---|
|  |  |  | width: 100%; | 
|---|
|  |  |  | height: calc(100% - 36px); | 
|---|
|  |  |  | height: calc(100% - 38px); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .scroll_container { | 
|---|
|  |  |  | width: 100%; | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .scroll_item { | 
|---|
|  |  |  | width: 100%; | 
|---|
|  |  |  | height: 36px; | 
|---|
|  |  |  | height: 35px; | 
|---|
|  |  |  | display: flex; | 
|---|
|  |  |  | align-items: center; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .content_center { | 
|---|
|  |  |  | flex: 2; | 
|---|
|  |  |  | margin: 0 20px; | 
|---|
|  |  |  | flex: 3; | 
|---|
|  |  |  | margin-right: 20px; | 
|---|
|  |  |  | .content_center_top { | 
|---|
|  |  |  | width: 100%; | 
|---|
|  |  |  | height: 509px; | 
|---|
|  |  |  | height: 424px; | 
|---|
|  |  |  | margin-bottom: 20px; | 
|---|
|  |  |  | background: linear-gradient(180deg, rgba(52, 88, 159, 0) 0%, rgba(0, 86, 255, 0.4) 100%); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .content_center_top_list { | 
|---|
|  |  |  | width: 100%; | 
|---|
|  |  |  | height: 38px; | 
|---|
|  |  |  | height: 35px; | 
|---|
|  |  |  | display: flex; | 
|---|
|  |  |  | align-items: center; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .content_center_top_list_item { | 
|---|
|  |  |  | width: 200px; | 
|---|
|  |  |  | height: 38px; | 
|---|
|  |  |  | height: 35px; | 
|---|
|  |  |  | cursor: pointer; | 
|---|
|  |  |  | line-height: 38px; | 
|---|
|  |  |  | line-height: 35px; | 
|---|
|  |  |  | padding-left: 34px; | 
|---|
|  |  |  | box-sizing: border-box; | 
|---|
|  |  |  | font-size: 16px; | 
|---|
|  |  |  | 
|---|
|  |  |  | color: #01D9FE; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | &:nth-child(5) { | 
|---|
|  |  |  | flex: 2.7; | 
|---|
|  |  |  | flex: 3; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | .main_container { | 
|---|
|  |  |  | width: 100%; | 
|---|
|  |  |  | height: calc(100% - 34px); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .scroll_container { | 
|---|
|  |  |  | width: 100%; | 
|---|
|  |  |  | height: 100%; | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .scroll_item { | 
|---|
|  |  |  | width: 100%; | 
|---|
|  |  |  | height: 58px; | 
|---|
|  |  |  | height: 50px; | 
|---|
|  |  |  | display: flex; | 
|---|
|  |  |  | align-items: center; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .scroll_item_row { | 
|---|
|  |  |  | flex: 1; | 
|---|
|  |  |  | height: 100%; | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | &:nth-child(5) { | 
|---|
|  |  |  | flex: 3; | 
|---|
|  |  |  | justify-content: start; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .scroll_item_row_item { | 
|---|
|  |  |  | margin-top: -11px; | 
|---|
|  |  |  | width: 29px; | 
|---|
|  |  |  | height: 29px; | 
|---|
|  |  |  | border-radius: 50%; | 
|---|
|  |  |  | margin-right: 19px; | 
|---|
|  |  |  | display: flex; | 
|---|
|  |  |  | flex-direction: column; | 
|---|
|  |  |  | align-items: center; | 
|---|
|  |  |  | justify-content: center; | 
|---|
|  |  |  | border: 2px solid #01D9FE; | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .scroll_item { | 
|---|
|  |  |  | width: 100%; | 
|---|
|  |  |  | height: 36px; | 
|---|
|  |  |  | height: 35px; | 
|---|
|  |  |  | display: flex; | 
|---|
|  |  |  | align-items: center; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .content_center_bottom { | 
|---|
|  |  |  | width: 100%; | 
|---|
|  |  |  | height: 286px; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // height: 284px; | 
|---|
|  |  |  | height:  calc(100vh - 690px); | 
|---|
|  |  |  | flex: 2; | 
|---|
|  |  |  | .content_center_bottom_head { | 
|---|
|  |  |  | width: 100%; | 
|---|
|  |  |  | height: 38px; | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .scroll_item { | 
|---|
|  |  |  | width: 100%; | 
|---|
|  |  |  | height: 37px; | 
|---|
|  |  |  | height: 35px; | 
|---|
|  |  |  | display: flex; | 
|---|
|  |  |  | align-items: center; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .content_right { | 
|---|
|  |  |  | flex: 1; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .content_right_top { | 
|---|
|  |  |  | width: 100%; | 
|---|
|  |  |  | height: 511px; | 
|---|
|  |  |  | height: 425px; | 
|---|
|  |  |  | margin-bottom: 20px; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .content_right_top_head { | 
|---|
|  |  |  | 
|---|
|  |  |  | height: calc(100% - 38px); | 
|---|
|  |  |  | background: linear-gradient(180deg, rgba(52, 88, 159, 0) 0%, rgba(0, 86, 255, 0.4) 100%); | 
|---|
|  |  |  | position: relative; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #pieChart { | 
|---|
|  |  |  | width: 100%; | 
|---|
|  |  |  | height: 100%; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .content_right_top_nr_bottom_yuan { | 
|---|
|  |  |  | position: absolute; | 
|---|
|  |  |  | top: 50%; | 
|---|
|  |  |  | left: 50%; | 
|---|
|  |  |  | transform: translate(-50%, 53%); | 
|---|
|  |  |  | transform: translate(-50%, -50%); | 
|---|
|  |  |  | z-index: 999; | 
|---|
|  |  |  | width: 114px; | 
|---|
|  |  |  | height: 114px; | 
|---|
|  |  |  | width: 100px; | 
|---|
|  |  |  | height: 100px; | 
|---|
|  |  |  | border-radius: 50%; | 
|---|
|  |  |  | border: 2px dashed #01D9FE; | 
|---|
|  |  |  | display: flex; | 
|---|
|  |  |  | 
|---|
|  |  |  | .content_right_top_nr_bottom { | 
|---|
|  |  |  | width: 100%; | 
|---|
|  |  |  | height: 50%; | 
|---|
|  |  |  | position: relative; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .content_right_bottom { | 
|---|
|  |  |  | width: 100%; | 
|---|
|  |  |  | height: 284px; | 
|---|
|  |  |  | // height: 284px; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | height:  calc(100vh - 690px); | 
|---|
|  |  |  | .content_right_bottom_head { | 
|---|
|  |  |  | width: 100%; | 
|---|
|  |  |  | height: 38px; | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .item2_content_head { | 
|---|
|  |  |  | width: 100%; | 
|---|
|  |  |  | height: 36px; | 
|---|
|  |  |  | height: 35px; | 
|---|
|  |  |  | display: flex; | 
|---|
|  |  |  | align-items: center; | 
|---|
|  |  |  | background: rgba(52, 88, 159, 0.5); | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .main_container { | 
|---|
|  |  |  | width: 100%; | 
|---|
|  |  |  | height: calc(100% - 36px); | 
|---|
|  |  |  | height: calc(100% - 35px); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .scroll_container { | 
|---|
|  |  |  | width: 100%; | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .scroll_item { | 
|---|
|  |  |  | width: 100%; | 
|---|
|  |  |  | height: 36px; | 
|---|
|  |  |  | height: 35px; | 
|---|
|  |  |  | display: flex; | 
|---|
|  |  |  | align-items: center; | 
|---|
|  |  |  |  | 
|---|