Commit 98a30f94 by chenwq

fix(teamWork): 修正颜色显示逻辑并调整页面标题设置

1. 修复teamList.vue中的进度预警注释,将比率标签默认颜色从绿色改为黑色并更新对应注释
2. 移除reportDetail.vue中无用的导航栏注释代码,调整页面标题设置为直接修改document.title
1 parent 5b923ffa
<template> <template>
<div class="report-detail-page"> <div class="report-detail-page">
<!-- <van-nav-bar :title="title" left-arrow @click-left="onClickLeft" fixed placeholder class="navigation-header" /> -->
<div class="detail-container"> <div class="detail-container">
<div class="detail-section" v-for="(sec, index) in config" :key="index"> <div class="detail-section" v-for="(sec, index) in config" :key="index">
<!-- 状态类型,左右布局 --> <!-- 状态类型,左右布局 -->
...@@ -52,7 +50,7 @@ export default { ...@@ -52,7 +50,7 @@ export default {
created() { created() {
const detailType = this.$route.query.detailType || 'dailyReport' const detailType = this.$route.query.detailType || 'dailyReport'
const strategy = constantData.JUMP_STRATEGY_MAP[detailType] || {} const strategy = constantData.JUMP_STRATEGY_MAP[detailType] || {}
this.title = strategy.title || '督导日报' document.title = strategy.title || '督导日报'
this.taskIdKey = strategy.taskIdKey this.taskIdKey = strategy.taskIdKey
try { try {
......
...@@ -175,16 +175,16 @@ export default { ...@@ -175,16 +175,16 @@ export default {
return { color, fontSize: '20px', fontWeight: '500' } return { color, fontSize: '20px', fontWeight: '500' }
}, },
// 进度预警:如果完成数小于总数,则标红;否则默认绿色 // 进度预警:如果完成数小于总数,则标红;否则默认黑色
getProgressColor(val) { getProgressColor(val) {
if (typeof val !== 'string' || !val.includes('/')) return '#000000E5' if (typeof val !== 'string' || !val.includes('/')) return '#000000E5'
const [num, den] = val.split('/') const [num, den] = val.split('/')
if (Number(num) < Number(den)) return '#F24724' if (Number(num) < Number(den)) return '#F24724'
return '#000000E5' return '#000000E5'
}, },
// 比率预警:低于 80% 标红,否则标绿 // 比率预警:低于 80% 标红,否则标黑
getRateColor(val) { getRateColor(val) {
return parseFloat(val) < 50 ? '#F24724' : '#35C376' return parseFloat(val) < 50 ? '#F24724' : '#000000E5'
}, },
// 专项督办进度的特殊颜色处理 // 专项督办进度的特殊颜色处理
getSpecialProgressColor(val) { getSpecialProgressColor(val) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!