|
@@ -34,11 +34,11 @@
|
|
|
</div>
|
|
|
<div v-else class="edit-wrapper">
|
|
|
<span v-if="item.name === '新增缺陷:总数|P0|P1' && otherColumns.all && otherColumns.all.headerKey" class="other-item-wrapper" @click="print(scope.row, itemIndex)">
|
|
|
- <span class="all" @click.stop="query({row: scope.row, column: {property: otherColumns.all.headerKey}}, 1)">{{ scope.row[otherColumns.all.headerKey].value }}</span>/
|
|
|
- P0:<span class="p0" @click.stop="query({row: scope.row, column: {property: otherColumns.p0.headerKey}}, 2)">{{ scope.row[otherColumns.p0.headerKey].value }}</span>
|
|
|
- P1:<span class="p1" @click.stop="query({row: scope.row, column: {property: otherColumns.p1.headerKey}}, 3)">{{ scope.row[otherColumns.p1.headerKey].value }}</span>
|
|
|
+ <span class="all" @click.stop="query({row: scope.row, column: {property: otherColumns.all.headerKey}}, 1)">{{ setOtherValue(scope.row, 'all' ) }}</span>/
|
|
|
+ P0:<span class="p0" @click.stop="query({row: scope.row, column: {property: otherColumns.p0.headerKey}}, 2)">{{ setOtherValue(scope.row, 'p0' ) }}</span>
|
|
|
+ P1:<span class="p1" @click.stop="query({row: scope.row, column: {property: otherColumns.p1.headerKey}}, 3)">{{ setOtherValue(scope.row, 'p1' ) }}</span>
|
|
|
</span>
|
|
|
- <span v-else class="edit-cell" :class="{'query-colors':item.name.search(/过夜率/) > -1 && scope.row[item.headerKey].value > 30}" @click.stop="query(scope, itemIndex + 2)" v-html="scope.row[item.headerKey].value" />
|
|
|
+ <span v-else class="edit-cell" :class="{'query-colors':item.name.search(/过夜率/) > -1 && scope.row[item.headerKey].value > 30}" @click.stop="query(scope, itemIndex + 2)" v-html="scope.row[item.headerKey].value || ''" />
|
|
|
<!-- <span v-if="item.name.search(/过夜率/) > -1 && scope.row[item.headerKey].value !== '--'"> -->
|
|
|
<!-- <span>%</span> -->
|
|
|
<!-- </span> -->
|
|
@@ -150,6 +150,13 @@ export default {
|
|
|
return this.$store.state.monthlyReportEdit.pageDate
|
|
|
}
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ tableData() {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.init()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
mounted() {
|
|
|
this.$nextTick(() => {
|
|
|
this.init()
|
|
@@ -264,6 +271,14 @@ export default {
|
|
|
}
|
|
|
return `${width}px`
|
|
|
},
|
|
|
+ //
|
|
|
+ setOtherValue(row, key) {
|
|
|
+ const headerKey = this.otherColumns[key].headerKey
|
|
|
+ return row[headerKey] && row[headerKey].value ? row[headerKey].value : ''
|
|
|
+ },
|
|
|
+ // otherQuery(row, key) {
|
|
|
+ // this.query()
|
|
|
+ // },
|
|
|
// 设置列的对齐方式
|
|
|
isFixed(item, index, columns) {
|
|
|
if (item.name === '操作') return 'right'
|
|
@@ -287,7 +302,7 @@ export default {
|
|
|
this.requireList = { toType: '缺陷', title: '累计reopen', yaxis: yaxis, idList: yaxis }
|
|
|
} else if (index === 4) {
|
|
|
let [one, tow, three, four] = [[], [], [], []]
|
|
|
- const [a, s, d, f, g, h, j, k, l, z, x, c] = [[], [], [], [], [], [], [], [], []]
|
|
|
+ const [a, s, d, f, g, h, j, k, l, z, x, c] = [[], [], [], [], [], [], [], [], [], [], [], []]
|
|
|
if (data.reportBugs[0]) {
|
|
|
data.reportBugs.map(item => {
|
|
|
if (item.isRepaired && item.repairTime < 24) { // 24小时内修复
|