|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<section>
|
|
|
<div class="chart-contain">
|
|
|
- <normal-echart v-if="echartsOption" :chart-id="id" :option="echartsOption" />
|
|
|
+ <normal-echart v-if="echartsOption" :chart-id="id" :option="echartsOption" @onClick="toLink" />
|
|
|
</div>
|
|
|
</section>
|
|
|
</template>
|
|
@@ -20,6 +20,11 @@ export default {
|
|
|
type: Array,
|
|
|
default: () => [],
|
|
|
required: false
|
|
|
+ },
|
|
|
+ type: {
|
|
|
+ type: String,
|
|
|
+ default: '',
|
|
|
+ required: false
|
|
|
}
|
|
|
},
|
|
|
data() {
|
|
@@ -86,6 +91,13 @@ export default {
|
|
|
}
|
|
|
}]
|
|
|
}
|
|
|
+ },
|
|
|
+ toLink(params) {
|
|
|
+ if (this.type === 'require') {
|
|
|
+ this.$router.push({ name: '需求详情', query: { id: params.data[2] }})
|
|
|
+ } else if (this.type === 'task') {
|
|
|
+ this.$router.push({ name: '任务详情', query: { id: params.data[2] }})
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|