| | |
| | | <template> |
| | | <div> |
| | | <div v-if="Object.keys(detailData).length"> |
| | | <div class="top-box-header"> |
| | | <div class="top-box-header-title"> |
| | | <div>项目组总积分表</div> |
| | | <div class="top-box-header-time"> |
| | | <div>评定开始时间:2024-02-09</div> |
| | | <div>评定结束始时间:2024-02-09</div> |
| | | <div>评定开始时间:{{ detailData.startTime }}</div> |
| | | <div>评定结束始时间:{{ detailData.endTime }}</div> |
| | | </div> |
| | | </div> |
| | | <div class="top-box-integral"> |
| | | <div :style="{ backgroundColor: ['rgba(232, 250, 246, 1)', 'rgba(255, 243, 213, 1)', 'rgba(254, 237, 220, 1)', 'rgba(239, 248, 255, 1)', 'rgba(255, 237, 238, 1)'][item - 1] }" |
| | | v-for="item in 5" :key="item" class="top-box-integral-card"> |
| | | <div class="top-box-integral-card-title">{{ ['项目组总积分', '工艺工程师积分', '化验师积分', '实验员积分', '实验终止次数'][item - |
| | | <div :style="{ backgroundColor: ['rgba(232, 250, 246, 1)', 'rgba(254, 237, 220, 1)', 'rgba(239, 248, 255, 1)', 'rgba(255, 237, 238, 1)'][item - 1] }" |
| | | v-for="item in 4" :key="item" class="top-box-integral-card"> |
| | | <div class="top-box-integral-card-title">{{ ['项目组总积分', '菌种工程师积分', '菌种实验员积分', '菌种实验失败次数'][item - |
| | | 1] }}</div> |
| | | <div :style="{ color: ['rgba(4, 156, 154, 1)', 'rgba(255, 197, 61, 1)', 'rgba(255, 147, 0, 1)', 'rgba(23, 119, 213, 1)', 'rgba(255, 73, 85, 1)'][item - 1] }" |
| | | class="top-box-integral-card-num">99.9</div> |
| | | <div :style="{ color: ['rgba(4, 156, 154, 1)', 'rgba(255, 147, 0, 1)', 'rgba(23, 119, 213, 1)', 'rgba(255, 73, 85, 1)'][item - 1] }" |
| | | class="top-box-integral-card-num">{{ |
| | | detailData[['teamIntegral', 'engineerIntegral', 'experimenterIntegral', 'failCount'][item - 1]] |
| | | }} |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="integral-content-box"> |
| | | <div class="integral-content-box-left"> |
| | | <div @click="changeActiveItem(item)" class="integral-content-box-left-item" |
| | | :class="actionsLeftTab == item && 'activeItem'" v-for="item in 3" :key="item"> |
| | | <div>{{ ['工艺工程师', '化验师', '实验员'][item - 1] }}</div> |
| | | <div>工作内容评定</div> |
| | | :class="actionsLeftTab == item && 'activeItem'" v-for="item in 2" :key="item"> |
| | | <div>{{ ['菌种工程师', '菌种实验员'][item - 1] }}</div> |
| | | </div> |
| | | </div> |
| | | <div class="integral-content-box-right"> |
| | | <div v-show="actionsLeftTab != 1" @wheel.prevent="handleWheel" class="integral-content-box-right-nameTab"> |
| | | <div @click="changeActiveName(item)" :class="activeNameTab == item && 'activeName'" class="integral-content-box-right-nameTab-name" v-for="item in 8" :key="item">张三</div> |
| | | <div v-show="actionsLeftTab != 1" @wheel.prevent="handleWheel" |
| | | class="integral-content-box-right-nameTab"> |
| | | <div @click="changeActiveName(item.userName)" |
| | | :class="activeNameTab == item.userName && 'activeName'" |
| | | class="integral-content-box-right-nameTab-name" |
| | | v-for="{ item, index } in detailData.detailExperimentVOS" :key="index">{{ item.userName }} |
| | | </div> |
| | | </div> |
| | | <div class="integral-content-box-right-thead"> |
| | | <div>评定项</div> |
| | | <div>评定情况</div> |
| | | <div>开始时间</div> |
| | | <div>结束时间</div> |
| | | <div>操作</div> |
| | | </div> |
| | | <div class="integral-content-box-right-body"> |
| | | <div v-for="item in itemList" :key="item" class="integral-content-box-right-body-item"> |
| | | <div v-for="(item, index) in itemList" :key="index" |
| | | class="integral-content-box-right-body-item"> |
| | | <div>{{ item.gainer }}</div> |
| | | <div> |
| | | <div v-if="item.situationOne">{{ item.situationOne }}</div> |
| | | <div v-if="item.situationTwo">{{ item.situationTwo }}</div> |
| | | <div>{{ item.situationOne }}{{ |
| | | actionsLeftTab === 2 ? |
| | | (selectedExperimenter || {})[item.keys[0]] : |
| | | detailData[item.keys[0]] |
| | | }}</div> |
| | | <div>{{ item.situationTwo }}{{ |
| | | actionsLeftTab === 2 ? |
| | | (selectedExperimenter || {})[item.keys[1]] : |
| | | detailData[item.keys[1]] |
| | | }}</div> |
| | | </div> |
| | | <div></div> |
| | | <div></div> |
| | | <div> |
| | | <el-button type="text">修改</el-button> |
| | | </div> |
| | | <div>{{ |
| | | actionsLeftTab === 2 ? |
| | | (selectedExperimenter || {})[item.keys[2]] : |
| | | detailData[item.keys[2]] |
| | | }}</div> |
| | | <div>{{ |
| | | actionsLeftTab === 2 ? |
| | | (selectedExperimenter || {})[item.keys[3]] : |
| | | detailData[item.keys[3]] |
| | | }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getDetailData } from './service' |
| | | export default { |
| | | data() { |
| | | return { |
| | | actionsLeftTab: 1, |
| | | activeNameTab: 1, |
| | | actionspPersonnel: null, |
| | | activeNameTab: '', |
| | | craftList: [ |
| | | { |
| | | gainer: '1、项目可研报告', |
| | | gainer: '1、创新型课题', |
| | | situationOne: '课题数:', |
| | | situationTwo: '积分数:', |
| | | keys: ['innovateCount', 'innovateIntegral', 'innovateStartTime', 'innovateEndTime'] |
| | | }, |
| | | { |
| | | gainer: '2、项目可行报告', |
| | | gainer: '2、规程型课题', |
| | | situationOne: '课题数:', |
| | | situationTwo: '积分数:', |
| | | keys: ['regulationCount', 'regulationIntegral', 'regulationStartTime', 'regulationEndTime'] |
| | | }, |
| | | { |
| | | gainer: '3、项目实验室开发阶段', |
| | | situationOne: '实验数:', |
| | | gainer: '3、实验操作评定', |
| | | situationOne: '考核数:', |
| | | situationTwo: '积分数:', |
| | | keys: ['handleCount', 'handleIntegral', 'handleStartTime', 'handleEndTime'] |
| | | }, |
| | | { |
| | | gainer: '4、项目中试试验阶段', |
| | | situationOne: '实验数:', |
| | | situationTwo: '积分数:', |
| | | }, |
| | | { |
| | | gainer: '5、项目生产验证试验阶段', |
| | | situationOne: '实验数:', |
| | | situationTwo: '积分数:', |
| | | }, |
| | | { |
| | | gainer: '6、工艺开发工具', |
| | | situationOne: '课题数:', |
| | | situationTwo: '积分数:', |
| | | }, |
| | | { |
| | | gainer: '7、验证与开发', |
| | | situationOne: '课题数:', |
| | | situationTwo: '积分数:', |
| | | }, |
| | | { |
| | | gainer: '8、立项报告', |
| | | situationOne: '课题数:', |
| | | situationTwo: '积分数:', |
| | | }, |
| | | { |
| | | gainer: '9、临床实验积分', |
| | | situationTwo: '积分数:', |
| | | }, |
| | | ],//工艺工程师-工作内容评定 |
| | | ],//菌种工程师 |
| | | assayList: [ |
| | | { |
| | | gainer: '1、项目开发阶段', |
| | | situationOne: '实验数:', |
| | | gainer: '1、实验操作评定', |
| | | situationOne: '考核数:', |
| | | situationTwo: '积分数:', |
| | | keys: ['handleCount', 'handleIntegral', 'handleStartTime', 'handleEndTime'] |
| | | }, |
| | | { |
| | | gainer: '2、项目中试试验阶段', |
| | | situationOne: '实验数:', |
| | | situationTwo: '积分数:', |
| | | }, |
| | | { |
| | | gainer: '3、项目生产验证试验阶段', |
| | | situationOne: '实验数:', |
| | | situationTwo: '积分数:', |
| | | }, |
| | | { |
| | | gainer: '4、项目检测项、检验包评定', |
| | | situationOne: '课题数:', |
| | | situationTwo: '积分数:', |
| | | }, |
| | | { |
| | | gainer: '5、中试、生产验证试验检验分析报告评定', |
| | | situationOne: '课题数:', |
| | | situationTwo: '积分数:', |
| | | }, |
| | | { |
| | | gainer: '6、原辅料、包材、竞品检验分析报告评定', |
| | | situationOne: '课题数:', |
| | | situationTwo: '积分数:', |
| | | }, |
| | | { |
| | | gainer: '7、产品报批及项目工作总结报告评定', |
| | | situationOne: '课题数:', |
| | | situationTwo: '积分数:', |
| | | }, |
| | | ],//化验师-工作内容评定 |
| | | experimentList: [ |
| | | { |
| | | gainer: '1、项目实验室开发阶段', |
| | | situationOne: '实验数:', |
| | | situationTwo: '积分数:', |
| | | }, |
| | | { |
| | | gainer: '2、项目中试试验阶段', |
| | | situationOne: '实验数:', |
| | | situationTwo: '积分数:', |
| | | }, |
| | | { |
| | | gainer: '3、项目生产验证试验阶段', |
| | | situationOne: '实验数:', |
| | | situationTwo: '积分数:', |
| | | }, |
| | | { |
| | | gainer: '4、其他任务', |
| | | situationOne: '实验数:', |
| | | situationTwo: '积分数:', |
| | | }, |
| | | ],//实验员-工作内容评定 |
| | | ],//菌种实验员 |
| | | detailData: {}, |
| | | selectedExperimenter: null |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | return this.craftList |
| | | case 2: |
| | | return this.assayList |
| | | case 3: |
| | | return this.experimentList |
| | | default: |
| | | return this.craftList |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | getDetailData(this.$route.query.id).then(res => { |
| | | this.detailData = res; |
| | | // 确保detailExperimentVOS存在且是数组 |
| | | this.detailData.detailExperimentVOS = this.detailData.detailExperimentVOS || []; |
| | | if (this.detailData.detailExperimentVOS.length) { |
| | | this.selectedExperimenter = this.detailData.detailExperimentVOS[0]; |
| | | this.activeNameTab = this.selectedExperimenter.userName; |
| | | } else { |
| | | // 设置空对象保护 |
| | | this.selectedExperimenter = {}; |
| | | this.activeNameTab = ''; |
| | | } |
| | | }) |
| | | }, |
| | | methods: { |
| | | changeActiveItem(item) { |
| | | this.actionsLeftTab = item |
| | | }, |
| | | changeActiveName(item) { |
| | | this.activeNameTab = item |
| | | changeActiveName(userName) { |
| | | this.activeNameTab = userName; |
| | | this.selectedExperimenter = this.detailData.detailExperimentVOS.find( |
| | | item => item.userName === userName |
| | | ); |
| | | }, |
| | | handleWheel(e) { |
| | | if (this.scrollTimer) { |