|
@@ -1,16 +1,17 @@
|
|
<template>
|
|
<template>
|
|
<mx-table ref="table" :prop-defines="resolvedTable.columns" :rows="resolvedTable.rows" border>
|
|
<mx-table ref="table" :prop-defines="resolvedTable.columns" :rows="resolvedTable.rows" border>
|
|
<template #elective-cell="{value, label, prop, key}">
|
|
<template #elective-cell="{value, label, prop, key}">
|
|
- <el-tooltip :disabled="(value&&value.disabled)||!!!prop.queryCode" effect="light">
|
|
|
|
|
|
+ <el-tooltip :disabled="!isCellQueryable(value, prop)" effect="light">
|
|
<div slot="content">
|
|
<div slot="content">
|
|
查看名单
|
|
查看名单
|
|
</div>
|
|
</div>
|
|
- <div v-if="value" class="pointer" :style="getCellStyles(value)" @click="goDetails(value, label, $event)">
|
|
|
|
|
|
+ <div v-if="value" :class="{'pointer': isCellQueryable(value, prop)}" :style="getCellStyles(value)"
|
|
|
|
+ @click="goDetails(value, prop, true)">
|
|
<template v-if="!useUnderOverBadge(key)">
|
|
<template v-if="!useUnderOverBadge(key)">
|
|
<span v-if="value.star">*</span>
|
|
<span v-if="value.star">*</span>
|
|
<span>{{ value && value.value }}</span>
|
|
<span>{{ value && value.value }}</span>
|
|
</template>
|
|
</template>
|
|
- <over-under-badge v-else :value="value.value" exchange></over-under-badge>
|
|
|
|
|
|
+ <over-under-badge v-else :value="value.value"></over-under-badge>
|
|
</div>
|
|
</div>
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
</template>
|
|
</template>
|
|
@@ -99,6 +100,9 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ isCellQueryable(value, prop) {
|
|
|
|
+ return value && value.value && !value.disabled && !!prop.queryCode
|
|
|
|
+ },
|
|
useUnderOverBadge(label) {
|
|
useUnderOverBadge(label) {
|
|
return ['indicateCount'].some(prop => label.includes(prop))
|
|
return ['indicateCount'].some(prop => label.includes(prop))
|
|
},
|
|
},
|
|
@@ -144,7 +148,10 @@ export default {
|
|
}
|
|
}
|
|
return styles
|
|
return styles
|
|
},
|
|
},
|
|
- goDetails(option, label, e) {
|
|
|
|
|
|
+ goDetails(value, column, check = false) {
|
|
|
|
+ if (check) {
|
|
|
|
+ if (!this.isCellQueryable(value, column)) return
|
|
|
|
+ }
|
|
// jump logic
|
|
// jump logic
|
|
const path = '/elective/generation/detail'
|
|
const path = '/elective/generation/detail'
|
|
const nextData = {
|
|
const nextData = {
|
|
@@ -152,12 +159,12 @@ export default {
|
|
roundId: this.chartBinding.generation.status.roundId,
|
|
roundId: this.chartBinding.generation.status.roundId,
|
|
roundName: this.chartBinding.generation.status.roundName,
|
|
roundName: this.chartBinding.generation.status.roundName,
|
|
activeGeneration: this.chartBinding.generation.active,
|
|
activeGeneration: this.chartBinding.generation.active,
|
|
- isAccumulate: option.isAccumulate || false,
|
|
|
|
- queryGeneration: option.generation,
|
|
|
|
- queryGroupId: option.groupId,
|
|
|
|
- queryCode: option.queryCode,
|
|
|
|
- queryableCategories: option.queryableCategories,
|
|
|
|
- ignoreGroupCategories: option.ignoreGroupCategories,
|
|
|
|
|
|
+ isAccumulate: value.isAccumulate || false,
|
|
|
|
+ queryGeneration: value.generation,
|
|
|
|
+ queryGroupId: value.groupId,
|
|
|
|
+ queryCode: value.queryCode,
|
|
|
|
+ queryableCategories: value.queryableCategories,
|
|
|
|
+ ignoreGroupCategories: value.ignoreGroupCategories,
|
|
groups: this.chartBinding.generation.roundGroups.map(rg => ({ groupId: rg.groupId, groupName: rg.groupName }))
|
|
groups: this.chartBinding.generation.roundGroups.map(rg => ({ groupId: rg.groupId, groupName: rg.groupName }))
|
|
}
|
|
}
|
|
this.transferTo(path, nextData)
|
|
this.transferTo(path, nextData)
|
|
@@ -174,8 +181,10 @@ export default {
|
|
for (const row of this.resolvedTable.rows) {
|
|
for (const row of this.resolvedTable.rows) {
|
|
const val = row[subColProp]
|
|
const val = row[subColProp]
|
|
if (val?.generation == current) {
|
|
if (val?.generation == current) {
|
|
- this.goDetails(val)
|
|
|
|
- return
|
|
|
|
|
|
+ if (this.isCellQueryable(val, column)) {
|
|
|
|
+ this.goDetails(val, column, false)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|