|
@@ -141,12 +141,20 @@ export const fixedGrouping = {
|
|
{ label: '研发部工艺调试', filed: '研发部工艺调试' },
|
|
{ label: '研发部工艺调试', filed: '研发部工艺调试' },
|
|
{ label: '研发部工艺调试验收', filed: '研发部工艺调试验收' },
|
|
{ label: '研发部工艺调试验收', filed: '研发部工艺调试验收' },
|
|
{ label: '研发部工艺设计', filed: '研发部工艺设计' },
|
|
{ label: '研发部工艺设计', filed: '研发部工艺设计' },
|
|
|
|
+ { label: '报价占比', filed: '报价占比', unit: '%' },
|
|
|
|
+ { label: '行政占比', filed: '行政占比', unit: '%' },
|
|
|
|
+ { label: '项目设计占比', filed: '项目设计占比', unit: '%' },
|
|
],
|
|
],
|
|
tabPicFileds: [
|
|
tabPicFileds: [
|
|
{ label: '方案设计', filed: '方案设计', title: '报价项目占比' },
|
|
{ label: '方案设计', filed: '方案设计', title: '报价项目占比' },
|
|
// { label: '研发部', filed: '研发部', title: '行政项目占比' },
|
|
// { label: '研发部', filed: '研发部', title: '行政项目占比' },
|
|
{ label: '研发部工艺调试', filed: '研发部工艺调试', title: '项目设计占比' }
|
|
{ label: '研发部工艺调试', filed: '研发部工艺调试', title: '项目设计占比' }
|
|
],
|
|
],
|
|
|
|
+ proportion: [
|
|
|
|
+ { key: '报价占比', value: '方案设计' },
|
|
|
|
+ { key: '行政占比', value: '研发部' },
|
|
|
|
+ { key: '项目设计占比', value: '研发部工艺设计' },
|
|
|
|
+ ],
|
|
deptIds: '8754,8768',
|
|
deptIds: '8754,8768',
|
|
name: '研发工艺',
|
|
name: '研发工艺',
|
|
tableKey: 1001
|
|
tableKey: 1001
|
|
@@ -155,11 +163,17 @@ export const fixedGrouping = {
|
|
tableFileds: [
|
|
tableFileds: [
|
|
{ label: '研发部', filed: '研发部' },
|
|
{ label: '研发部', filed: '研发部' },
|
|
{ label: '研发部BIM设计', filed: '研发部BIM设计' },
|
|
{ label: '研发部BIM设计', filed: '研发部BIM设计' },
|
|
|
|
+ { label: '行政占比', filed: '行政占比', unit: '%' },
|
|
|
|
+ { label: '设计占比', filed: '设计占比', unit: '%' },
|
|
],
|
|
],
|
|
tabPicFileds: [
|
|
tabPicFileds: [
|
|
// { label: '研发部', filed: '研发部', title: 'BIM行政工时占比' },
|
|
// { label: '研发部', filed: '研发部', title: 'BIM行政工时占比' },
|
|
{ label: '研发部BIM设计', filed: '研发部BIM设计', title: 'BIM设计项目占比' }
|
|
{ label: '研发部BIM设计', filed: '研发部BIM设计', title: 'BIM设计项目占比' }
|
|
],
|
|
],
|
|
|
|
+ proportion: [
|
|
|
|
+ { key: '行政占比', value: '研发部' },
|
|
|
|
+ { key: '设计占比', value: '研发部BIM设计' },
|
|
|
|
+ ],
|
|
deptIds: '8757',
|
|
deptIds: '8757',
|
|
name: '研发BIM',
|
|
name: '研发BIM',
|
|
tableKey: 1002,
|
|
tableKey: 1002,
|
|
@@ -168,11 +182,17 @@ export const fixedGrouping = {
|
|
tableFileds: [
|
|
tableFileds: [
|
|
{ label: '研发部', filed: '研发部' },
|
|
{ label: '研发部', filed: '研发部' },
|
|
{ label: '研发部结构设计', filed: '研发部结构设计' },
|
|
{ label: '研发部结构设计', filed: '研发部结构设计' },
|
|
|
|
+ { label: '行政占比', filed: '行政占比', unit: '%' },
|
|
|
|
+ { label: '设计占比', filed: '设计占比', unit: '%' },
|
|
],
|
|
],
|
|
tabPicFileds: [
|
|
tabPicFileds: [
|
|
// { label: '研发部', filed: '研发部', title: '研发行政工时占比' },
|
|
// { label: '研发部', filed: '研发部', title: '研发行政工时占比' },
|
|
{ label: '研发部结构设计', filed: '研发部结构设计', title: '结构设计项目占比' }
|
|
{ label: '研发部结构设计', filed: '研发部结构设计', title: '结构设计项目占比' }
|
|
],
|
|
],
|
|
|
|
+ proportion: [
|
|
|
|
+ { key: '行政占比', value: '研发部' },
|
|
|
|
+ { key: '设计占比', value: '研发部结构设计' },
|
|
|
|
+ ],
|
|
deptIds: '8758,8769',
|
|
deptIds: '8758,8769',
|
|
name: '研发结构',
|
|
name: '研发结构',
|
|
tableKey: 1003
|
|
tableKey: 1003
|
|
@@ -183,12 +203,20 @@ export const fixedGrouping = {
|
|
{ label: '研发部电气调试验收', filed: '研发电气调试验收' },
|
|
{ label: '研发部电气调试验收', filed: '研发电气调试验收' },
|
|
{ label: '研发部电气设计', filed: '研发部电气设计' },
|
|
{ label: '研发部电气设计', filed: '研发部电气设计' },
|
|
{ label: '研发部售后', filed: '研发部售后' },
|
|
{ label: '研发部售后', filed: '研发部售后' },
|
|
|
|
+ { label: '行政占比', filed: '行政占比', unit: '%' },
|
|
|
|
+ { label: '设计占比', filed: '设计占比', unit: '%' },
|
|
|
|
+ { label: '调试占比', filed: '调试占比', unit: '%' },
|
|
],
|
|
],
|
|
tabPicFileds: [
|
|
tabPicFileds: [
|
|
// { label: '研发部', filed: '研发部', title: '电气行政工时占比' },
|
|
// { label: '研发部', filed: '研发部', title: '电气行政工时占比' },
|
|
{ label: '研发部电气设计', filed: '研发部电气设计', title: '电气设计项目占比' },
|
|
{ label: '研发部电气设计', filed: '研发部电气设计', title: '电气设计项目占比' },
|
|
{ label: '研发部电气调试验收', filed: '研发部电气调试验收', title: '电气调试项目占比' }
|
|
{ label: '研发部电气调试验收', filed: '研发部电气调试验收', title: '电气调试项目占比' }
|
|
],
|
|
],
|
|
|
|
+ proportion: [
|
|
|
|
+ { key: '行政占比', value: '研发部' },
|
|
|
|
+ { key: '设计占比', value: '研发部电气设计' },
|
|
|
|
+ { key: '调试占比', value: '研发部电气调试验收' },
|
|
|
|
+ ],
|
|
deptIds: '8756,8770',
|
|
deptIds: '8756,8770',
|
|
name: '研发电气',
|
|
name: '研发电气',
|
|
tableKey: 1004
|
|
tableKey: 1004
|
|
@@ -201,12 +229,20 @@ export const fixedGrouping = {
|
|
{ label: '研发部工艺设计', filed: '研发部工艺设计' },
|
|
{ label: '研发部工艺设计', filed: '研发部工艺设计' },
|
|
{ label: '研发部售后', filed: '研发部售后' },
|
|
{ label: '研发部售后', filed: '研发部售后' },
|
|
{ label: '研发部运维', filed: '研发部运维' },
|
|
{ label: '研发部运维', filed: '研发部运维' },
|
|
|
|
+ { label: '行政占比', filed: '行政占比', unit: '%' },
|
|
|
|
+ { label: '项目调试占比', filed: '项目调试占比', unit: '%' },
|
|
|
|
+ { label: '售后占比', filed: '售后占比', unit: '%' },
|
|
],
|
|
],
|
|
tabPicFileds: [
|
|
tabPicFileds: [
|
|
// { label: '研发部', filed: '研发部', title: '研发调试行政工时占比' },
|
|
// { label: '研发部', filed: '研发部', title: '研发调试行政工时占比' },
|
|
{ label: '研发部工艺调试验收', filed: '研发部工艺调试验收', title: '调试项目占比' },
|
|
{ label: '研发部工艺调试验收', filed: '研发部工艺调试验收', title: '调试项目占比' },
|
|
{ label: '研发部售后', filed: '研发部售后', title: '售后项目占比' }
|
|
{ label: '研发部售后', filed: '研发部售后', title: '售后项目占比' }
|
|
],
|
|
],
|
|
|
|
+ proportion: [
|
|
|
|
+ { key: '行政占比', value: '研发部' },
|
|
|
|
+ { key: '项目调试占比', value: '研发部工艺调试验收' },
|
|
|
|
+ { key: '售后占比', value: '研发部售后' },
|
|
|
|
+ ],
|
|
deptIds: '8755',
|
|
deptIds: '8755',
|
|
name: '研发调试',
|
|
name: '研发调试',
|
|
tableKey: 1005
|
|
tableKey: 1005
|
|
@@ -216,11 +252,18 @@ export const fixedGrouping = {
|
|
{ label: '生产部', filed: '生产部' },
|
|
{ label: '生产部', filed: '生产部' },
|
|
{ label: '生产部车间', filed: '生产部车间' },
|
|
{ label: '生产部车间', filed: '生产部车间' },
|
|
{ label: '生产部电气', filed: '生产部电气' },
|
|
{ label: '生产部电气', filed: '生产部电气' },
|
|
|
|
+ { label: '行政占比', filed: '行政占比', unit: '%' },
|
|
|
|
+ { label: '项目占比', filed: '项目占比', unit: '%' },
|
|
],
|
|
],
|
|
tabPicFileds: [
|
|
tabPicFileds: [
|
|
// { label: '研发部', filed: '研发部', title: '生产部行政工时占比' },
|
|
// { label: '研发部', filed: '研发部', title: '生产部行政工时占比' },
|
|
{ label: '生产部车间,生产部电气', filed: '生产部车间,生产部电气', title: '生产项目占比' }
|
|
{ label: '生产部车间,生产部电气', filed: '生产部车间,生产部电气', title: '生产项目占比' }
|
|
],
|
|
],
|
|
|
|
+ proportion: [
|
|
|
|
+ { key: '行政占比', value: '生产部' },
|
|
|
|
+ { key: '项目占比', value: '生产部车间' },
|
|
|
|
+ { key: '项目占比', value: '生产部电气' },
|
|
|
|
+ ],
|
|
deptIds: '8762,8760,8761,8737,7903',
|
|
deptIds: '8762,8760,8761,8737,7903',
|
|
name: '生产部',
|
|
name: '生产部',
|
|
tableKey: 1006
|
|
tableKey: 1006
|
|
@@ -238,6 +281,13 @@ export const fixedGrouping = {
|
|
{ label: '项目阶段', filed: '项目阶段' },
|
|
{ label: '项目阶段', filed: '项目阶段' },
|
|
{ label: '研发部工艺调试验收', filed: '研发部工艺调试验收' },
|
|
{ label: '研发部工艺调试验收', filed: '研发部工艺调试验收' },
|
|
{ label: '研发部运维', filed: '研发部运维' },
|
|
{ label: '研发部运维', filed: '研发部运维' },
|
|
|
|
+ { label: '行政占比', filed: '行政占比', unit: '%' },
|
|
|
|
+ { label: '配合调试占比', filed: '配合调试占比', unit: '%' },
|
|
|
|
+ { label: '运维占比', filed: '运维占比', unit: '%' },
|
|
|
|
+ { label: '售后占比', filed: '售后占比', unit: '%' },
|
|
|
|
+ { label: '施工占比', filed: '施工占比', unit: '%' },
|
|
|
|
+ { label: '施工占配合生产占比', filed: '施工占配合生产占比', unit: '%' },
|
|
|
|
+ { label: '配合生产占比', filed: '配合生产占比', unit: '%' },
|
|
],
|
|
],
|
|
tabPicFileds: [
|
|
tabPicFileds: [
|
|
// { label: '工程部', filed: '工程部', title: '工程部行政工时占比' },
|
|
// { label: '工程部', filed: '工程部', title: '工程部行政工时占比' },
|
|
@@ -247,8 +297,42 @@ export const fixedGrouping = {
|
|
{ label: '工程部现场安装施工', filed: '工程部现场安装施工', title: '施工占比' },
|
|
{ label: '工程部现场安装施工', filed: '工程部现场安装施工', title: '施工占比' },
|
|
{ label: '生产部,生产部车间,生产部电气', filed: '生产部,生产部车间,生产部电气', title: '配合生产占比' },
|
|
{ label: '生产部,生产部车间,生产部电气', filed: '生产部,生产部车间,生产部电气', title: '配合生产占比' },
|
|
],
|
|
],
|
|
|
|
+ proportion: [
|
|
|
|
+ { key: '行政占比', value: '工程部' },
|
|
|
|
+ { key: '配合调试占比', value: '工程部配合调试' },
|
|
|
|
+ { key: '运维占比', value: '工程部配合运维' },
|
|
|
|
+ { key: '售后占比', value: '工程部售后' },
|
|
|
|
+ { key: '施工占比', value: '工程部现场安装施工' },
|
|
|
|
+ { key: '配合生产占比', value: '生产部' },
|
|
|
|
+ { key: '配合生产占比', value: '生产部车间' },
|
|
|
|
+ { key: '配合生产占比', value: '生产部电气' },
|
|
|
|
+ ],
|
|
deptIds: '7460,8763,8764,8765,8766',
|
|
deptIds: '7460,8763,8764,8765,8766',
|
|
name: '工程部',
|
|
name: '工程部',
|
|
tableKey: 1007
|
|
tableKey: 1007
|
|
},
|
|
},
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// 更具计算返回对应的占比
|
|
|
|
+export const getProportion = (list, fixedKey) => {
|
|
|
|
+ const listItem = fixedGrouping[fixedKey]
|
|
|
|
+ const proportion = listItem.proportion
|
|
|
|
+ list.forEach(item => {
|
|
|
|
+ proportion.forEach(proportionItem => {
|
|
|
|
+ if(!item[proportionItem.key]) {
|
|
|
|
+ item[proportionItem.key] = item[proportionItem.value]
|
|
|
|
+ } else {
|
|
|
|
+ item[proportionItem.key] += item[proportionItem.value]
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ list.forEach(item => {
|
|
|
|
+ proportion.forEach(proportionItem => {
|
|
|
|
+ if(item[proportionItem.key] != 0) {
|
|
|
|
+ let num = (item[proportionItem.key] / item.totalWorkTime) * 100
|
|
|
|
+ item[proportionItem.key] = Number(num.toFixed(2))
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ return list
|
|
}
|
|
}
|