|
@@ -104,7 +104,7 @@ export default {
|
|
echartsOption2: null,
|
|
echartsOption2: null,
|
|
totalTask: 0, // 所有总数
|
|
totalTask: 0, // 所有总数
|
|
totalIdList: 0, // 所有总数的idList
|
|
totalIdList: 0, // 所有总数的idList
|
|
- itemType: 0, // 0: 未上线的需求分布 1: 本周状态流入图
|
|
|
|
|
|
+ itemType: '0', // 0: 未上线的需求分布 1: 本周状态流入图
|
|
tips: {
|
|
tips: {
|
|
'需求': [
|
|
'需求': [
|
|
'交付日期为今天,且状态仍未变更为“已上线”的需求数量(不包含当前状态为hold的需求)。',
|
|
'交付日期为今天,且状态仍未变更为“已上线”的需求数量(不包含当前状态为hold的需求)。',
|
|
@@ -158,7 +158,6 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onChangeTagRadio(e) {
|
|
onChangeTagRadio(e) {
|
|
- console.log(e)
|
|
|
|
const { requestChart } = this.requestObj
|
|
const { requestChart } = this.requestObj
|
|
this.getChart(requestChart, this.itemType)
|
|
this.getChart(requestChart, this.itemType)
|
|
},
|
|
},
|
|
@@ -180,18 +179,16 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
async getChart(requestUrl, type) { // 获取图表数据
|
|
async getChart(requestUrl, type) { // 获取图表数据
|
|
- if (type) {
|
|
|
|
- const res = await requestUrl({ teamSearchInfo: this.searchForm, type: type })
|
|
|
|
- if (type === '3') {
|
|
|
|
- this.echartsOption = this.setChart(res.data)
|
|
|
|
- } else if (type === '5') {
|
|
|
|
- this.echartsOption2 = this.setChart(res.data)
|
|
|
|
- }
|
|
|
|
|
|
+ const res = await requestUrl({ teamSearchInfo: this.searchForm, type: type })
|
|
|
|
+ if (type === '3') {
|
|
|
|
+ this.echartsOption = this.setChart(res.data)
|
|
|
|
+ } else if (type === '5') {
|
|
|
|
+ this.echartsOption2 = this.setChart(res.data)
|
|
} else {
|
|
} else {
|
|
const res = await requestUrl({ teamSearchInfo: this.searchForm, type })
|
|
const res = await requestUrl({ teamSearchInfo: this.searchForm, type })
|
|
this.totalTask = res.data.total
|
|
this.totalTask = res.data.total
|
|
this.totalIdList = res.data.idList
|
|
this.totalIdList = res.data.idList
|
|
- this.echartsOption = res.data
|
|
|
|
|
|
+ this.echartsOption = { ...res.data, type: this.itemType }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
setChart(chartData) { // 设置图表options
|
|
setChart(chartData) { // 设置图表options
|
|
@@ -219,8 +216,17 @@ export default {
|
|
this.changeData(this.totalIdList, `未上线的`)
|
|
this.changeData(this.totalIdList, `未上线的`)
|
|
},
|
|
},
|
|
chartChange(params) { // 点击图表产生触发列表更改
|
|
chartChange(params) { // 点击图表产生触发列表更改
|
|
|
|
+ let idList = params.data.idList || []
|
|
|
|
+ // 本周需求状态流入图需要特殊处理。循环出对应下标的idlist
|
|
|
|
+ if (this.itemType === '1') {
|
|
|
|
+ // console.log(this.echartsOption.xaxis)
|
|
|
|
+ const dataIndex = params.dataIndex
|
|
|
|
+ this.echartsOption.yaxis.forEach(t => {
|
|
|
|
+ idList = [...idList, ...t.idList[dataIndex]]
|
|
|
|
+ })
|
|
|
|
+ }
|
|
this.clickItem = -1
|
|
this.clickItem = -1
|
|
- this.changeData(params.data.idList, params.name)
|
|
|
|
|
|
+ this.changeData(idList, params.name)
|
|
},
|
|
},
|
|
changeData(idList, name) { // 点击顶部数据触发列表更改
|
|
changeData(idList, name) { // 点击顶部数据触发列表更改
|
|
this.$emit('change', this.title, idList, name)
|
|
this.$emit('change', this.title, idList, name)
|