|  |  |  | 
|---|
|  |  |  | <div class="content_left_item1_content_row_line"> | 
|---|
|  |  |  | <el-progress | 
|---|
|  |  |  | :show-text="false" | 
|---|
|  |  |  | :percentage="item.doneNum"> | 
|---|
|  |  |  | :percentage="item.doneNum / baseNum"> | 
|---|
|  |  |  | </el-progress> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="content_left_item1_content_row_num">{{ item.doneNum }}</div> | 
|---|
|  |  |  | 
|---|
|  |  |  | <div @mouseenter="handleMouseEnter1" @mouseleave="handleMouseLeave1" class="main_container"> | 
|---|
|  |  |  | <div ref="scrollContainer1" class="scroll_container"> | 
|---|
|  |  |  | <div v-for="(item, index) in data.plannedProgress" :key="index" :class="index % 2 == 0 ? 'scroll_item scroll_item_bg1' : 'scroll_item scroll_item_bg2'"> | 
|---|
|  |  |  | <div class="scroll_item_row">323444112</div> | 
|---|
|  |  |  | <div class="scroll_item_row">电吉他</div> | 
|---|
|  |  |  | <div class="scroll_item_row">CP003</div> | 
|---|
|  |  |  | <div class="scroll_item_row">1000</div> | 
|---|
|  |  |  | <div class="scroll_item_row">{{ item.code }}</div> | 
|---|
|  |  |  | <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"> | 
|---|
|  |  |  | <el-tooltip | 
|---|
|  |  |  | v-for="(child, i) in 6" :key="i" | 
|---|
|  |  |  | v-for="(child, i) in item.procedureList" :key="i" | 
|---|
|  |  |  | effect="dark" | 
|---|
|  |  |  | content="已报工良品数1000;工序计划数500" | 
|---|
|  |  |  | :content="'已报工良品数' + child.doneNum + ';工序计划数' + child.planNum" | 
|---|
|  |  |  | placement="top"> | 
|---|
|  |  |  | <div class="scroll_item_row_item"> | 
|---|
|  |  |  | <div class="scroll_item_row_item" @click="jump(child.procedureId)"> | 
|---|
|  |  |  | <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-else>98%</span> | 
|---|
|  |  |  | <!-- <img v-if="i == 0 || i == 1" src="@/assets/img/ic_complete@2x.png" alt="" /> --> | 
|---|
|  |  |  | <span v-if="child.rate < 100">{{ child.rate }}%</span> | 
|---|
|  |  |  | <img v-else src="@/assets/img/ic_complete@2x.png" alt="" /> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </el-tooltip> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="scroll_item_row">498/500</div> | 
|---|
|  |  |  | <div class="scroll_item_row">{{ item.qualifiedNum }}/{{ item.doneNum }}</div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | 
|---|
|  |  |  | <span>近7天不良品分布</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="content_right_top_nr"> | 
|---|
|  |  |  | <div class="content_right_top_nr_bottom_yuan"> | 
|---|
|  |  |  | <span>67</span> | 
|---|
|  |  |  | <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> | 
|---|
|  |  |  | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <script setup> | 
|---|
|  |  |  | import { reactive, ref, onMounted, onBeforeUnmount, onUnmounted, nextTick, computed, watch } from 'vue' | 
|---|
|  |  |  | import { getTop, getStockList, getWorkPlansList, getProcedureProcessList, getRecordLogPage, getDeviceCheckPage } from '@/utils/api.js' | 
|---|
|  |  |  | import { reactive, ref, onMounted, nextTick, onUnmounted, computed, watch, onActivated } from 'vue' | 
|---|
|  |  |  | import { getPlanData, getTop, getStockList, getWorkPlansList, getProcedureProcessList, getRecordLogPage, getDeviceCheckPage, getUnqualified7DayData, getUnqualifiedCateData } from '@/utils/api.js' | 
|---|
|  |  |  | import { useCounterStore } from '@/stores/counter.js' | 
|---|
|  |  |  | import * as echarts from 'echarts' | 
|---|
|  |  |  | import { useRouter } from 'vue-router' | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const router = useRouter() | 
|---|
|  |  |  |  | 
|---|
|  |  |  | let data = reactive({ | 
|---|
|  |  |  | production: [], | 
|---|
|  |  |  | 
|---|
|  |  |  | processProgress: [], | 
|---|
|  |  |  | log: [], | 
|---|
|  |  |  | patrolInspection: [], | 
|---|
|  |  |  | dayDistribution: [ | 
|---|
|  |  |  | { date: '8/1', num: '20' }, | 
|---|
|  |  |  | { date: '8/2', num: '10' }, | 
|---|
|  |  |  | { date: '8/3', num: '20' }, | 
|---|
|  |  |  | { date: '8/4', num: '40' }, | 
|---|
|  |  |  | { date: '8/5', num: '30' }, | 
|---|
|  |  |  | { date: '8/6', num: '10' }, | 
|---|
|  |  |  | { date: '8/7', num: '20' }, | 
|---|
|  |  |  | ], | 
|---|
|  |  |  | typeDistribution: [ | 
|---|
|  |  |  | { name: '外观不良', num: 15 }, | 
|---|
|  |  |  | { name: '有毛刺', num: 12 }, | 
|---|
|  |  |  | { name: '尺寸不良', num: 22 }, | 
|---|
|  |  |  | { name: '有划痕', num: 5 }, | 
|---|
|  |  |  | { name: '其他', num: 2 } | 
|---|
|  |  |  | ] | 
|---|
|  |  |  | dayDistribution: [], | 
|---|
|  |  |  | typeDistribution: [], | 
|---|
|  |  |  | num: 0, | 
|---|
|  |  |  | baseNum: 0 | 
|---|
|  |  |  | }) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | let { baseNum } = toRefs(data) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | let timer = ref(null) | 
|---|
|  |  |  | let timer1 = ref(null) | 
|---|
|  |  |  | 
|---|
|  |  |  | return enterprise.departId | 
|---|
|  |  |  | }) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const jump = (procedureId) => { | 
|---|
|  |  |  | router.push({ name: 'process', query: { procedureId } }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | watch(() => departId.value, (val) => { | 
|---|
|  |  |  | if (val) { | 
|---|
|  |  |  | // 当日员工产量TOP10 | 
|---|
|  |  |  | getTop(companyId.value, departId.value) | 
|---|
|  |  |  | .then(res => { | 
|---|
|  |  |  | if (res.length > 0) { | 
|---|
|  |  |  | res.forEach((item, index) => { | 
|---|
|  |  |  | if (index > 1) { | 
|---|
|  |  |  | item.doneNum1 = res[0].doneNum / item.doneNum | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | data.production = res | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | // 仓库实时余量统计 | 
|---|
|  |  |  | getStockList(companyId.value, departId.value) | 
|---|
|  |  |  | .then(res => { | 
|---|
|  |  |  | data.marginStatistics = res | 
|---|
|  |  |  | nextTick(() => { | 
|---|
|  |  |  | start() | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | // 成品计划进度 | 
|---|
|  |  |  | getWorkPlansList(companyId.value, departId.value) | 
|---|
|  |  |  | .then(res => { | 
|---|
|  |  |  | data.plannedProgress = res | 
|---|
|  |  |  | nextTick(() => { | 
|---|
|  |  |  | start1() | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | // 报工日志 | 
|---|
|  |  |  | getRecordLogPage(companyId.value, departId.value, { | 
|---|
|  |  |  | capacity: 9999, | 
|---|
|  |  |  | model: {}, | 
|---|
|  |  |  | page: 1 | 
|---|
|  |  |  | }).then(res => { | 
|---|
|  |  |  | data.log = res.records | 
|---|
|  |  |  | nextTick(() => { | 
|---|
|  |  |  | start3() | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | // 设备巡检记录 | 
|---|
|  |  |  | getDeviceCheckPage(companyId.value, departId.value, { | 
|---|
|  |  |  | capacity: 9999, | 
|---|
|  |  |  | model: {}, | 
|---|
|  |  |  | page: 1 | 
|---|
|  |  |  | }).then(res => { | 
|---|
|  |  |  | data.patrolInspection = res.records | 
|---|
|  |  |  | nextTick(() => { | 
|---|
|  |  |  | start4() | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | init() | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | // router.afterEach((to) => { | 
|---|
|  |  |  | //     if (to.fullPath === '/') { | 
|---|
|  |  |  | //         if (!departId.value) return | 
|---|
|  |  |  | //         // data.production = [] | 
|---|
|  |  |  | //         // data.marginStatistics = [] | 
|---|
|  |  |  | //         // data.plannedProgress = [] | 
|---|
|  |  |  | //         // data.processProgress = [] | 
|---|
|  |  |  | //         // data.log = [] | 
|---|
|  |  |  | //         // init() | 
|---|
|  |  |  | //     } else { | 
|---|
|  |  |  | //         clearTimeout(timer.value) | 
|---|
|  |  |  | //         clearTimeout(timer1.value) | 
|---|
|  |  |  | //         clearTimeout(timer2.value) | 
|---|
|  |  |  | //         clearTimeout(timer3.value) | 
|---|
|  |  |  | //         clearTimeout(timer4.value) | 
|---|
|  |  |  | //     } | 
|---|
|  |  |  | // }) | 
|---|
|  |  |  | // router.beforeEach((to) => { | 
|---|
|  |  |  | //     console.log(to); | 
|---|
|  |  |  | //     if (to.fullPath === '/') { | 
|---|
|  |  |  | //         if (!departId.value) return | 
|---|
|  |  |  | //         init() | 
|---|
|  |  |  | //     } else { | 
|---|
|  |  |  | //         clearTimeout(timer.value) | 
|---|
|  |  |  | //         clearTimeout(timer1.value) | 
|---|
|  |  |  | //         clearTimeout(timer2.value) | 
|---|
|  |  |  | //         clearTimeout(timer3.value) | 
|---|
|  |  |  | //         clearTimeout(timer4.value) | 
|---|
|  |  |  | //     } | 
|---|
|  |  |  | // }) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | start1() | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const init = () => { | 
|---|
|  |  |  | // 当日员工产量TOP10 | 
|---|
|  |  |  | getTop(companyId.value, departId.value) | 
|---|
|  |  |  | .then(res => { | 
|---|
|  |  |  | if (res.length > 0) { | 
|---|
|  |  |  | data.baseNum = res[0].doneNum | 
|---|
|  |  |  | data.production = res | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | // 仓库实时余量统计 | 
|---|
|  |  |  | getStockList(companyId.value, departId.value) | 
|---|
|  |  |  | .then(res => { | 
|---|
|  |  |  | data.marginStatistics = res | 
|---|
|  |  |  | nextTick(() => { | 
|---|
|  |  |  | start() | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | // 成品计划进度 | 
|---|
|  |  |  | getWorkPlansList(companyId.value, departId.value) | 
|---|
|  |  |  | .then(res => { | 
|---|
|  |  |  | data.plannedProgress = res | 
|---|
|  |  |  | nextTick(() => { | 
|---|
|  |  |  | start1() | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | // 报工日志 | 
|---|
|  |  |  | getRecordLogPage(companyId.value, departId.value, { | 
|---|
|  |  |  | capacity: 9999, | 
|---|
|  |  |  | model: {}, | 
|---|
|  |  |  | page: 1 | 
|---|
|  |  |  | }).then(res => { | 
|---|
|  |  |  | data.log = res.records | 
|---|
|  |  |  | nextTick(() => { | 
|---|
|  |  |  | start3() | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | // 设备巡检记录 | 
|---|
|  |  |  | getDeviceCheckPage(companyId.value, departId.value, { | 
|---|
|  |  |  | capacity: 9999, | 
|---|
|  |  |  | model: {}, | 
|---|
|  |  |  | page: 1 | 
|---|
|  |  |  | }).then(res => { | 
|---|
|  |  |  | data.patrolInspection = res.records | 
|---|
|  |  |  | nextTick(() => { | 
|---|
|  |  |  | start4() | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | // 近七天不良数 | 
|---|
|  |  |  | getUnqualified7DayData(companyId.value, departId.value, '') | 
|---|
|  |  |  | .then(res => { | 
|---|
|  |  |  | if (res && res.length > 0) { | 
|---|
|  |  |  | data.dayDistribution = res.map(item => { | 
|---|
|  |  |  | return { | 
|---|
|  |  |  | date: item.createTime, | 
|---|
|  |  |  | num: item.unqualifiedNum | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | setDayChart() | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | // 近七天不良项 | 
|---|
|  |  |  | getUnqualifiedCateData(companyId.value, departId.value, '') | 
|---|
|  |  |  | .then(res => { | 
|---|
|  |  |  | if (res && res.length > 0) { | 
|---|
|  |  |  | data.num = 0 | 
|---|
|  |  |  | data.typeDistribution = res.map(item => { | 
|---|
|  |  |  | data.num += item.unqualifiedNum | 
|---|
|  |  |  | return { | 
|---|
|  |  |  | name: item.categoryName, | 
|---|
|  |  |  | num: item.unqualifiedNum | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | setTypeChart() | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | // getPlanData | 
|---|
|  |  |  | getPlanData(companyId.value, departId.value) | 
|---|
|  |  |  | .then(res => { | 
|---|
|  |  |  | enterprise.setNum(res) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 七日折线图 | 
|---|
|  |  |  | 
|---|
|  |  |  | let myChart = echarts.init(dayChartDom); | 
|---|
|  |  |  | let dateList = [] | 
|---|
|  |  |  | let numList = [] | 
|---|
|  |  |  |  | 
|---|
|  |  |  | let num = 0 | 
|---|
|  |  |  | data.dayDistribution.forEach(item => { | 
|---|
|  |  |  | dateList.push(item.date) | 
|---|
|  |  |  | numList.push(item.num) | 
|---|
|  |  |  | num += item.num | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | let option; | 
|---|
|  |  |  | option = { | 
|---|
|  |  |  | title: { | 
|---|
|  |  |  | text: '近七日不良品总数:67', | 
|---|
|  |  |  | text: `近七日不良品总数:${num}`, | 
|---|
|  |  |  | textStyle: { | 
|---|
|  |  |  | color: '#fff', | 
|---|
|  |  |  | fontSize: 12 | 
|---|
|  |  |  | 
|---|
|  |  |  | * 不良类型分布 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | function setTypeChart() { | 
|---|
|  |  |  | let dayChartDom = document.getElementById('pieChart'); | 
|---|
|  |  |  | let myChart = echarts.init(dayChartDom); | 
|---|
|  |  |  | let legendData = [] | 
|---|
|  |  |  | let seriesData = [] | 
|---|
|  |  |  | data.typeDistribution.forEach(item => { | 
|---|
|  |  |  | legendData.push(item.name) | 
|---|
|  |  |  | seriesData.push({name:item.name, value:item.num}) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | let option = { | 
|---|
|  |  |  | // title: { | 
|---|
|  |  |  | //   text: '同名数量统计', | 
|---|
|  |  |  | //   subtext: '纯属虚构', | 
|---|
|  |  |  | //   left: 'center' | 
|---|
|  |  |  | // }, | 
|---|
|  |  |  | // tooltip: { | 
|---|
|  |  |  | //   trigger: 'item', | 
|---|
|  |  |  | //   formatter: '{a} <br/>{b} : {c} ({d}%)' | 
|---|
|  |  |  | // }, | 
|---|
|  |  |  | legend: { | 
|---|
|  |  |  | show: false, | 
|---|
|  |  |  | type: 'scroll', | 
|---|
|  |  |  | orient: 'vertical', | 
|---|
|  |  |  | right: 10, | 
|---|
|  |  |  | top: 20, | 
|---|
|  |  |  | bottom: 20, | 
|---|
|  |  |  | data: legendData | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | series: [ | 
|---|
|  |  |  | { | 
|---|
|  |  |  | // name: '姓名', | 
|---|
|  |  |  | type: 'pie', | 
|---|
|  |  |  | let dayChartDom = document.getElementById('pieChart'); | 
|---|
|  |  |  | let myChart = echarts.init(dayChartDom); | 
|---|
|  |  |  | let legendData = [] | 
|---|
|  |  |  | let seriesData = [] | 
|---|
|  |  |  | data.typeDistribution.forEach(item => { | 
|---|
|  |  |  | legendData.push(item.name) | 
|---|
|  |  |  | seriesData.push({name:item.name, value:item.num}) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | let option = { | 
|---|
|  |  |  | // title: { | 
|---|
|  |  |  | //   text: '同名数量统计', | 
|---|
|  |  |  | //   subtext: '纯属虚构', | 
|---|
|  |  |  | //   left: 'center' | 
|---|
|  |  |  | // }, | 
|---|
|  |  |  | // tooltip: { | 
|---|
|  |  |  | //   trigger: 'item', | 
|---|
|  |  |  | //   formatter: '{a} <br/>{b} : {c} ({d}%)' | 
|---|
|  |  |  | // }, | 
|---|
|  |  |  | legend: { | 
|---|
|  |  |  | show: false, | 
|---|
|  |  |  | type: 'scroll', | 
|---|
|  |  |  | orient: 'vertical', | 
|---|
|  |  |  | right: 10, | 
|---|
|  |  |  | top: 20, | 
|---|
|  |  |  | bottom: 20, | 
|---|
|  |  |  | data: legendData | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | series: [ | 
|---|
|  |  |  | { | 
|---|
|  |  |  | // name: '姓名', | 
|---|
|  |  |  | type: 'pie', | 
|---|
|  |  |  |  | 
|---|
|  |  |  | radius: ['60%', '70%'], | 
|---|
|  |  |  | // avoidLabelOverlap: false, | 
|---|
|  |  |  | itemStyle: { | 
|---|
|  |  |  | borderRadius: 4, | 
|---|
|  |  |  | borderColor: 'rgba(52, 88, 159, 0.4)', | 
|---|
|  |  |  | borderWidth: 4 | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | center: ['50%', '50%'], | 
|---|
|  |  |  | labelLine: { | 
|---|
|  |  |  | show: false | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | label: { | 
|---|
|  |  |  | formatter:'{dot| } {title|{b} {c}}\n\n{per|{d}%}', | 
|---|
|  |  |  | rich: { | 
|---|
|  |  |  | title: { | 
|---|
|  |  |  | color: '#fff' | 
|---|
|  |  |  | radius: ['60%', '70%'], | 
|---|
|  |  |  | // avoidLabelOverlap: false, | 
|---|
|  |  |  | itemStyle: { | 
|---|
|  |  |  | borderRadius: 4, | 
|---|
|  |  |  | borderColor: 'rgba(52, 88, 159, 0.4)', | 
|---|
|  |  |  | borderWidth: 4 | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | per: { | 
|---|
|  |  |  | color: '#01D9FE' | 
|---|
|  |  |  | center: ['50%', '50%'], | 
|---|
|  |  |  | labelLine: { | 
|---|
|  |  |  | show: false | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | dot: { | 
|---|
|  |  |  | backgroundColor: 'inherit', | 
|---|
|  |  |  | width: 8, | 
|---|
|  |  |  | height: 8, | 
|---|
|  |  |  | borderRadius: 4 | 
|---|
|  |  |  | label: { | 
|---|
|  |  |  | formatter:'{dot| } {title|{b} {c}}\n\n{per|{d}%}', | 
|---|
|  |  |  | rich: { | 
|---|
|  |  |  | title: { | 
|---|
|  |  |  | color: '#fff' | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | per: { | 
|---|
|  |  |  | color: '#01D9FE' | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | dot: { | 
|---|
|  |  |  | backgroundColor: 'inherit', | 
|---|
|  |  |  | width: 8, | 
|---|
|  |  |  | height: 8, | 
|---|
|  |  |  | borderRadius: 4 | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | // labelLayout: { | 
|---|
|  |  |  | //   hideOverlap: true | 
|---|
|  |  |  | // }, | 
|---|
|  |  |  | endLabel: { | 
|---|
|  |  |  | show: true, | 
|---|
|  |  |  | distance: 5, | 
|---|
|  |  |  | color: "red" | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | data: seriesData, | 
|---|
|  |  |  | emphasis: { | 
|---|
|  |  |  | itemStyle: { | 
|---|
|  |  |  | shadowBlur: 10, | 
|---|
|  |  |  | shadowOffsetX: 0, | 
|---|
|  |  |  | shadowColor: 'rgba(0, 0, 0, 1)' | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | // labelLayout: { | 
|---|
|  |  |  | //   hideOverlap: true | 
|---|
|  |  |  | // }, | 
|---|
|  |  |  | endLabel: { | 
|---|
|  |  |  | show: true, | 
|---|
|  |  |  | distance: 5, | 
|---|
|  |  |  | color: "red" | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | data: seriesData, | 
|---|
|  |  |  | emphasis: { | 
|---|
|  |  |  | itemStyle: { | 
|---|
|  |  |  | shadowBlur: 10, | 
|---|
|  |  |  | shadowOffsetX: 0, | 
|---|
|  |  |  | shadowColor: 'rgba(0, 0, 0, 1)' | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ] | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ] | 
|---|
|  |  |  | } | 
|---|
|  |  |  | option && myChart.setOption(option); | 
|---|
|  |  |  | option && myChart.setOption(option); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | onMounted(() => { | 
|---|
|  |  |  | setDayChart() | 
|---|
|  |  |  | setTypeChart() | 
|---|
|  |  |  | }) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | onBeforeUnmount(()=>{ | 
|---|
|  |  |  | clearTimeout(timer.value) | 
|---|
|  |  |  | clearTimeout(timer1.value) | 
|---|
|  |  |  | clearTimeout(timer2.value) | 
|---|
|  |  |  | clearTimeout(timer3.value) | 
|---|
|  |  |  | clearTimeout(timer4.value) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | // onBeforeUnmount(()=>{ | 
|---|
|  |  |  | //     clearTimeout(timer.value) | 
|---|
|  |  |  | //     clearTimeout(timer1.value) | 
|---|
|  |  |  | //     clearTimeout(timer2.value) | 
|---|
|  |  |  | //     clearTimeout(timer3.value) | 
|---|
|  |  |  | //     clearTimeout(timer4.value) | 
|---|
|  |  |  | // }) | 
|---|
|  |  |  | onUnmounted(()=>{ | 
|---|
|  |  |  | clearTimeout(timer.value) | 
|---|
|  |  |  | clearTimeout(timer1.value) | 
|---|
|  |  |  | 
|---|
|  |  |  | if (i == 0) { | 
|---|
|  |  |  | getWorkPlansList(companyId.value, departId.value) | 
|---|
|  |  |  | .then(res => { | 
|---|
|  |  |  | console.log(res) | 
|---|
|  |  |  | data.plannedProgress = res | 
|---|
|  |  |  | nextTick(() => { | 
|---|
|  |  |  | start1() | 
|---|
|  |  |  | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | getProcedureProcessList(companyId.value, departId.value) | 
|---|
|  |  |  | .then(res => { | 
|---|
|  |  |  | console.log(res) | 
|---|
|  |  |  | data.processProgress = res | 
|---|
|  |  |  | nextTick(() => { | 
|---|
|  |  |  | start2() | 
|---|
|  |  |  | 
|---|
|  |  |  | function start() { | 
|---|
|  |  |  | clearTimeout(timer.value) | 
|---|
|  |  |  | // 定时器触发周期 | 
|---|
|  |  |  | let speed = ref(25) | 
|---|
|  |  |  | let speed = ref(100) | 
|---|
|  |  |  | timer.value = setInterval(ListScroll, speed.value) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // 开启定时器 | 
|---|
|  |  |  | function start1() { | 
|---|
|  |  |  | clearTimeout(timer1.value) | 
|---|
|  |  |  | // 定时器触发周期 | 
|---|
|  |  |  | let speed1 = ref(25) | 
|---|
|  |  |  | let speed1 = ref(100) | 
|---|
|  |  |  | timer1.value = setInterval(ListScroll1, speed1.value) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // 开启定时器 | 
|---|
|  |  |  | function start2() { | 
|---|
|  |  |  | clearTimeout(timer2.value) | 
|---|
|  |  |  | // 定时器触发周期 | 
|---|
|  |  |  | let speed2 = ref(25) | 
|---|
|  |  |  | let speed2 = ref(100) | 
|---|
|  |  |  | timer2.value = setInterval(ListScroll2, speed2.value) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // 开启定时器 | 
|---|
|  |  |  | function start3() { | 
|---|
|  |  |  | clearTimeout(timer3.value) | 
|---|
|  |  |  | // 定时器触发周期 | 
|---|
|  |  |  | let speed3 = ref(25) | 
|---|
|  |  |  | let speed3 = ref(100) | 
|---|
|  |  |  | timer3.value = setInterval(ListScroll3, speed3.value) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // 开启定时器 | 
|---|
|  |  |  | function start4() { | 
|---|
|  |  |  | clearTimeout(timer4.value) | 
|---|
|  |  |  | // 定时器触发周期 | 
|---|
|  |  |  | let speed4 = ref(25) | 
|---|
|  |  |  | let speed4 = ref(100) | 
|---|
|  |  |  | timer4.value = setInterval(ListScroll4, speed4.value) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | function ListScroll() { | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // onUnmounted(() => { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // }) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | onMounted(() => { | 
|---|
|  |  |  | console.log('11111') | 
|---|
|  |  |  | init() | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <style lang="scss" scoped> | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .content_left_item1_content_row_name { | 
|---|
|  |  |  | flex-shrink: 0; | 
|---|
|  |  |  | width: 100px; | 
|---|
|  |  |  | display: flex; | 
|---|
|  |  |  | align-items: center; | 
|---|
|  |  |  | span { | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .content_left_item1_content_row_num { | 
|---|
|  |  |  | font-size: 13px; | 
|---|
|  |  |  | width: 60px; | 
|---|
|  |  |  | font-family: SourceHanSansSC-Regular, SourceHanSansSC; | 
|---|
|  |  |  | font-weight: 400; | 
|---|
|  |  |  | color: #D2E0FF; | 
|---|
|  |  |  | 
|---|
|  |  |  | align-items: center; | 
|---|
|  |  |  | .scroll_item_row { | 
|---|
|  |  |  | flex: 1; | 
|---|
|  |  |  | overflow: hidden; | 
|---|
|  |  |  | text-overflow: ellipsis; | 
|---|
|  |  |  | white-space: nowrap; | 
|---|
|  |  |  | height: 100%; | 
|---|
|  |  |  | display: flex; | 
|---|
|  |  |  | align-items: center; | 
|---|
|  |  |  | 
|---|
|  |  |  | position: relative; | 
|---|
|  |  |  | .content_right_top_nr_bottom_yuan { | 
|---|
|  |  |  | position: absolute; | 
|---|
|  |  |  | top: 299px; | 
|---|
|  |  |  | left: 168px; | 
|---|
|  |  |  | top: 50%; | 
|---|
|  |  |  | left: 50%; | 
|---|
|  |  |  | transform: translate(-50%, 53%); | 
|---|
|  |  |  | z-index: 999; | 
|---|
|  |  |  | width: 114px; | 
|---|
|  |  |  | height: 114px; | 
|---|