[update] 修改bug80413
This commit is contained in:
@@ -148,6 +148,10 @@ const fixDataSourse = [
|
||||
id: 18,
|
||||
score: '优秀',
|
||||
scoreRange: '7~10'
|
||||
},
|
||||
{
|
||||
id: 19,
|
||||
project: '总分:0'
|
||||
}
|
||||
]
|
||||
const initData = {
|
||||
@@ -257,15 +261,17 @@ export default {
|
||||
dataIndex: 'project',
|
||||
customRender: (text, row, index) => {
|
||||
const obj = {
|
||||
children: text || this.global.emptyLine,
|
||||
attrs: {}
|
||||
}
|
||||
if (index % 3 === 0) {
|
||||
obj.children = text || this.global.emptyLine
|
||||
obj.attrs.rowSpan = 3
|
||||
} else if (index % 3 !== 0 && index !== 19) {
|
||||
} else if (index % 3 !== 0 && index !== 18) {
|
||||
obj.children = text || this.global.emptyLine
|
||||
obj.attrs.rowSpan = 0
|
||||
}
|
||||
if (index === 19) {
|
||||
if (index === 18) {
|
||||
obj.children = <p class="all-score">总分: {this.allScore}</p>
|
||||
obj.attrs.colSpan = 6
|
||||
}
|
||||
return obj
|
||||
@@ -283,10 +289,10 @@ export default {
|
||||
}
|
||||
if (index % 3 === 0) {
|
||||
obj.attrs.rowSpan = 3
|
||||
} else if (index % 3 !== 0 && index !== 19) {
|
||||
} else if (index % 3 !== 0 && index !== 18) {
|
||||
obj.attrs.rowSpan = 0
|
||||
}
|
||||
if (index === 19) {
|
||||
if (index === 18) {
|
||||
obj.attrs.colSpan = 0
|
||||
}
|
||||
return obj
|
||||
@@ -303,7 +309,7 @@ export default {
|
||||
children: text || this.global.emptyLine,
|
||||
attrs: {}
|
||||
}
|
||||
if (index === 19) {
|
||||
if (index === 18) {
|
||||
obj.attrs.colSpan = 0
|
||||
}
|
||||
return obj
|
||||
@@ -314,7 +320,17 @@ export default {
|
||||
align: 'center',
|
||||
width: 100,
|
||||
dataIndex: 'scoreRange',
|
||||
colSpan: 0
|
||||
colSpan: 0,
|
||||
customRender: (text, row, index) => {
|
||||
const obj = {
|
||||
children: text || this.global.emptyLine,
|
||||
attrs: {}
|
||||
}
|
||||
if (index === 18) {
|
||||
obj.attrs.colSpan = 0
|
||||
}
|
||||
return obj
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('enterpriseStandardLibrary.reviewMeeting.grade'),
|
||||
@@ -326,7 +342,7 @@ export default {
|
||||
children: text || this.global.emptyLine,
|
||||
attrs: {}
|
||||
}
|
||||
if (index === 19) {
|
||||
if (index === 18) {
|
||||
obj.attrs.colSpan = 0
|
||||
}
|
||||
if (index % 3 === 0) {
|
||||
@@ -347,7 +363,7 @@ export default {
|
||||
children: text || this.global.emptyLine,
|
||||
attrs: {}
|
||||
}
|
||||
if (index === 19) {
|
||||
if (index === 18) {
|
||||
obj.attrs.colSpan = 0
|
||||
}
|
||||
if (index % 3 === 0) {
|
||||
@@ -385,6 +401,17 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// 总分
|
||||
allScore () {
|
||||
const arr = [0, 3, 6, 9, 12, 15]
|
||||
let score = 0
|
||||
for (const item of arr) {
|
||||
score += Number(this.dataSource[item].evaluateScore) || 0
|
||||
}
|
||||
return score
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open (id) {
|
||||
this.visible = true
|
||||
@@ -440,4 +467,5 @@ export default {
|
||||
width: 80%;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
+37
-9
@@ -147,6 +147,10 @@ const fixDataSourse = [
|
||||
id: 18,
|
||||
score: '优秀',
|
||||
scoreRange: '7~10'
|
||||
},
|
||||
{
|
||||
id: 19,
|
||||
project: '总分:0'
|
||||
}
|
||||
]
|
||||
|
||||
@@ -168,15 +172,17 @@ export default {
|
||||
dataIndex: 'project',
|
||||
customRender: (text, row, index) => {
|
||||
const obj = {
|
||||
children: text || this.global.emptyLine,
|
||||
attrs: {}
|
||||
}
|
||||
if (index % 3 === 0) {
|
||||
obj.children = text || this.global.emptyLine
|
||||
obj.attrs.rowSpan = 3
|
||||
} else if (index % 3 !== 0 && index !== 19) {
|
||||
} else if (index % 3 !== 0 && index !== 18) {
|
||||
obj.children = text || this.global.emptyLine
|
||||
obj.attrs.rowSpan = 0
|
||||
}
|
||||
if (index === 19) {
|
||||
if (index === 18) {
|
||||
obj.children = <p class="all-score">总分: {this.allScore}</p>
|
||||
obj.attrs.colSpan = 6
|
||||
}
|
||||
return obj
|
||||
@@ -194,10 +200,10 @@ export default {
|
||||
}
|
||||
if (index % 3 === 0) {
|
||||
obj.attrs.rowSpan = 3
|
||||
} else if (index % 3 !== 0 && index !== 19) {
|
||||
} else if (index % 3 !== 0 && index !== 18) {
|
||||
obj.attrs.rowSpan = 0
|
||||
}
|
||||
if (index === 19) {
|
||||
if (index === 18) {
|
||||
obj.attrs.colSpan = 0
|
||||
}
|
||||
return obj
|
||||
@@ -214,7 +220,7 @@ export default {
|
||||
children: text || this.global.emptyLine,
|
||||
attrs: {}
|
||||
}
|
||||
if (index === 19) {
|
||||
if (index === 18) {
|
||||
obj.attrs.colSpan = 0
|
||||
}
|
||||
return obj
|
||||
@@ -225,7 +231,17 @@ export default {
|
||||
align: 'center',
|
||||
width: 100,
|
||||
dataIndex: 'scoreRange',
|
||||
colSpan: 0
|
||||
colSpan: 0,
|
||||
customRender: (text, row, index) => {
|
||||
const obj = {
|
||||
children: text || this.global.emptyLine,
|
||||
attrs: {}
|
||||
}
|
||||
if (index === 18) {
|
||||
obj.attrs.colSpan = 0
|
||||
}
|
||||
return obj
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('enterpriseStandardLibrary.reviewMeeting.grade'),
|
||||
@@ -237,7 +253,7 @@ export default {
|
||||
children: text || this.global.emptyLine,
|
||||
attrs: {}
|
||||
}
|
||||
if (index === 19) {
|
||||
if (index === 18) {
|
||||
obj.attrs.colSpan = 0
|
||||
}
|
||||
if (index % 3 === 0) {
|
||||
@@ -258,7 +274,7 @@ export default {
|
||||
children: text || this.global.emptyLine,
|
||||
attrs: {}
|
||||
}
|
||||
if (index === 19) {
|
||||
if (index === 18) {
|
||||
obj.attrs.colSpan = 0
|
||||
}
|
||||
if (index % 3 === 0) {
|
||||
@@ -296,6 +312,17 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// 总分
|
||||
allScore () {
|
||||
const arr = [0, 3, 6, 9, 12, 15]
|
||||
let score = 0
|
||||
for (const item of arr) {
|
||||
score += Number(this.dataSource[item].evaluateScore) || 0
|
||||
}
|
||||
return score
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open (standardId) {
|
||||
this.visible = true
|
||||
@@ -351,4 +378,5 @@ export default {
|
||||
width: 80%;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@@ -153,6 +153,10 @@ const fixDataSourse = [
|
||||
id: 18,
|
||||
score: '优秀',
|
||||
scoreRange: '7~10'
|
||||
},
|
||||
{
|
||||
id: 19,
|
||||
project: '总分:0'
|
||||
}
|
||||
]
|
||||
|
||||
@@ -169,15 +173,16 @@ export default {
|
||||
dataIndex: 'project',
|
||||
customRender: (text, row, index) => {
|
||||
const obj = {
|
||||
children: text || this.global.emptyLine,
|
||||
attrs: {}
|
||||
}
|
||||
if (index % 3 === 0) {
|
||||
obj.children = text || this.global.emptyLine
|
||||
obj.attrs.rowSpan = 3
|
||||
} else if (index % 3 !== 0 && index !== 19) {
|
||||
} else if (index % 3 !== 0 && index !== 18) {
|
||||
obj.attrs.rowSpan = 0
|
||||
}
|
||||
if (index === 19) {
|
||||
if (index === 18) {
|
||||
obj.children = <p class="all-score">总分: {this.allScore}</p>
|
||||
obj.attrs.colSpan = 6
|
||||
}
|
||||
return obj
|
||||
@@ -186,7 +191,6 @@ export default {
|
||||
{
|
||||
title: this.$t('enterpriseStandardLibrary.reviewMeeting.desc'),
|
||||
align: 'center',
|
||||
// width: 100,
|
||||
dataIndex: 'desc',
|
||||
customRender: (text, row, index) => {
|
||||
const obj = {
|
||||
@@ -195,10 +199,10 @@ export default {
|
||||
}
|
||||
if (index % 3 === 0) {
|
||||
obj.attrs.rowSpan = 3
|
||||
} else if (index % 3 !== 0 && index !== 19) {
|
||||
} else if (index % 3 !== 0 && index !== 18) {
|
||||
obj.attrs.rowSpan = 0
|
||||
}
|
||||
if (index === 19) {
|
||||
if (index === 18) {
|
||||
obj.attrs.colSpan = 0
|
||||
}
|
||||
return obj
|
||||
@@ -215,7 +219,7 @@ export default {
|
||||
children: text || this.global.emptyLine,
|
||||
attrs: {}
|
||||
}
|
||||
if (index === 19) {
|
||||
if (index === 18) {
|
||||
obj.attrs.colSpan = 0
|
||||
}
|
||||
return obj
|
||||
@@ -226,7 +230,17 @@ export default {
|
||||
align: 'center',
|
||||
width: 100,
|
||||
dataIndex: 'scoreRange',
|
||||
colSpan: 0
|
||||
colSpan: 0,
|
||||
customRender: (text, row, index) => {
|
||||
const obj = {
|
||||
children: text || this.global.emptyLine,
|
||||
attrs: {}
|
||||
}
|
||||
if (index === 18) {
|
||||
obj.attrs.colSpan = 0
|
||||
}
|
||||
return obj
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('enterpriseStandardLibrary.reviewMeeting.grade'),
|
||||
@@ -248,7 +262,7 @@ export default {
|
||||
// />,
|
||||
attrs: {}
|
||||
}
|
||||
if (index === 19) {
|
||||
if (index === 18) {
|
||||
obj.attrs.colSpan = 0
|
||||
}
|
||||
if (index % 3 === 0) {
|
||||
@@ -275,7 +289,7 @@ export default {
|
||||
/>,
|
||||
attrs: {}
|
||||
}
|
||||
if (index === 19) {
|
||||
if (index === 18) {
|
||||
obj.attrs.colSpan = 0
|
||||
}
|
||||
if (index % 3 === 0) {
|
||||
@@ -290,6 +304,17 @@ export default {
|
||||
dataSource: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// 总分
|
||||
allScore () {
|
||||
const arr = [0, 3, 6, 9, 12, 15]
|
||||
let score = 0
|
||||
for (const item of arr) {
|
||||
score += Number(this.dataSource[item].evaluateScore) || 0
|
||||
}
|
||||
return score
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.dataSource = []
|
||||
},
|
||||
@@ -301,7 +326,7 @@ export default {
|
||||
if (data.reviewMeetingDetails && data.reviewMeetingDetails.length > 0) {
|
||||
this.dataSource = JSON.parse(JSON.stringify(fixDataSourse))
|
||||
for (const i in fixDataSourse) {
|
||||
if (i % 3 === 0) {
|
||||
if (i % 3 === 0 && Number(i) !== 18) {
|
||||
this.$set(this.dataSource[i], 'evaluateScore', data.reviewMeetingDetails[Math.floor(i / 3)].evaluateScore || '')
|
||||
this.$set(this.dataSource[i], 'deductionScoreReason', data.reviewMeetingDetails[Math.floor(i / 3)].deductionScoreReason || '')
|
||||
}
|
||||
@@ -320,7 +345,7 @@ export default {
|
||||
const data = {}
|
||||
const arr = []
|
||||
for (const item in this.dataSource) {
|
||||
if (item % 3 === 0) {
|
||||
if (item % 3 === 0 && Number(item) !== 18) {
|
||||
// 是有评分和扣分理由的行
|
||||
arr.push({
|
||||
...this.dataSource[item],
|
||||
@@ -337,6 +362,9 @@ export default {
|
||||
let hasErr = false
|
||||
const arr = []
|
||||
for (const item in this.dataSource) {
|
||||
if (Number(item) === 18) {
|
||||
break
|
||||
}
|
||||
if (item % 3 === 0 && (!this.dataSource[item].evaluateScore || !this.dataSource[item].deductionScoreReason)) {
|
||||
hasErr = true
|
||||
break
|
||||
@@ -354,6 +382,7 @@ export default {
|
||||
data = false
|
||||
} else {
|
||||
data.reviewMeetingDetails = arr
|
||||
data.totalScore = this.allScore
|
||||
}
|
||||
return data
|
||||
}
|
||||
@@ -369,9 +398,9 @@ export default {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
p {
|
||||
margin-bottom: 0;
|
||||
height: 100%;
|
||||
}
|
||||
p {
|
||||
margin-bottom: 0;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user