|
@@ -95,13 +95,34 @@
|
|
|
<el-main class="charts-main">
|
|
|
<div class="chart-item">
|
|
|
<h3>状态累积流量图</h3>
|
|
|
- <el-row type="flex" align="middle">
|
|
|
- <el-col :span="24">
|
|
|
- <div class="chart-contain">
|
|
|
- <status-chart />
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
+ <status-chart />
|
|
|
+ </div>
|
|
|
+ <el-tabs v-model="activeName" class="tab-change">
|
|
|
+ <el-tab-pane name="first">
|
|
|
+ <span slot="label" class="tab-item">累计新增</span>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane name="second">
|
|
|
+ <span slot="label" class="tab-item">累计上线</span>
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ <div class="chart-item">
|
|
|
+ <h3>新增趋势图</h3>
|
|
|
+ <tendency-chart :chart-data="tendencyData" />
|
|
|
+ </div>
|
|
|
+ <div class="chart-item">
|
|
|
+ <h3>周期统计<span>(根据排期计算)</span></h3>
|
|
|
+ <div class="chart-item-tip">
|
|
|
+ <i class="el-icon-warning-outline" />
|
|
|
+ <span>仅统计状态已变更“已排期”且排期不为空的任务</span>
|
|
|
+ </div>
|
|
|
+ <cycle-statistic :chart-data="cycleData" />
|
|
|
+ </div>
|
|
|
+ <div class="chart-item">
|
|
|
+ <h3>研发交付周期分布图<span>(根据排期计算)</span></h3>
|
|
|
+ <div class="chart-item-tip">
|
|
|
+ <i class="el-icon-warning-outline" />
|
|
|
+ <span>仅统计状态已变更“已排期”且排期不为空的任务;横坐标表示任务交付日期,纵坐标代表研发交付周期(研发、联调、上线类型排期的总周期)</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</el-main>
|
|
|
</el-container>
|
|
@@ -112,11 +133,15 @@ moment.locale('zh-cn')
|
|
|
import { settingQueryBizModuleList } from '@/api/defectManage'
|
|
|
import { teamQueryTeamInfoList } from '@/api/configure'
|
|
|
import {
|
|
|
- getSummary
|
|
|
+ getSummary,
|
|
|
+ getBugCountTrend,
|
|
|
+ getRepairTimeSumData
|
|
|
} from '@/api/defectStatistics'
|
|
|
import statusChart from './components/statusChart'
|
|
|
+import tendencyChart from './components/tendencyChart'
|
|
|
+import cycleStatistic from './components/cycleStatistic'
|
|
|
export default {
|
|
|
- components: { statusChart },
|
|
|
+ components: { statusChart, tendencyChart, cycleStatistic },
|
|
|
data() {
|
|
|
return {
|
|
|
bugCountTimeType: 1, // 获取趋缺陷势图数据接口入参:1本周 2本月 3本年
|
|
@@ -130,7 +155,10 @@ export default {
|
|
|
stratAndEnd: [], // 开始结束日期
|
|
|
dateType: 'week', // 时间选择类型
|
|
|
moduleList: [], // 模块列表
|
|
|
- Summary: [] // 顶部数据
|
|
|
+ Summary: [], // 顶部数据
|
|
|
+ activeName: 'first', // tab标签
|
|
|
+ tendencyData: null, // 趋势图数据
|
|
|
+ cycleData: [] // 周期统计数据
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -159,6 +187,8 @@ export default {
|
|
|
methods: {
|
|
|
onSubmit() {
|
|
|
this.getSummary()
|
|
|
+ this.defectTrendTimeChange()
|
|
|
+ this.getCycleData()
|
|
|
},
|
|
|
setDate(type) { // 日期筛选
|
|
|
let startDate = null
|
|
@@ -206,6 +236,27 @@ export default {
|
|
|
async getSummary() { // 获取顶部数据
|
|
|
const res = await getSummary(this.globalParams)
|
|
|
if (res.code === 200) this.Summary = res.data || []
|
|
|
+ },
|
|
|
+ async defectTrendTimeChange() { // 趋势图日期变动
|
|
|
+ const moduleIds = this.defectForm.moduleIds
|
|
|
+ const params = {
|
|
|
+ beginTime: this.stratAndEnd[0] || null,
|
|
|
+ endTime: this.stratAndEnd[1] || null,
|
|
|
+ bizId: Number(localStorage.getItem('bizId')),
|
|
|
+ teamIds: this.defectForm.team || null,
|
|
|
+ moduleIds: moduleIds && moduleIds.length > 0 ? moduleIds : null,
|
|
|
+ timeType: this.bugCountTimeType
|
|
|
+ }
|
|
|
+ const res = await getBugCountTrend(params)
|
|
|
+ if (res.code === 200) this.tendencyData = res.data
|
|
|
+ },
|
|
|
+ async getCycleData() { // 周期统计数据
|
|
|
+ const params = {
|
|
|
+ ...this.globalParams,
|
|
|
+ type: 1
|
|
|
+ }
|
|
|
+ const res = await getRepairTimeSumData(params)
|
|
|
+ if (res.code === 200) this.cycleData = res.data
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -221,6 +272,9 @@ export default {
|
|
|
font-size: 18px;
|
|
|
margin: 0;
|
|
|
padding: 0;
|
|
|
+ span {
|
|
|
+ color: #666666;
|
|
|
+ }
|
|
|
}
|
|
|
.defect-main {
|
|
|
padding: 20px 20px 0 20px;
|
|
@@ -334,5 +388,14 @@ export default {
|
|
|
background:#ffffff;
|
|
|
margin: 10px;
|
|
|
border-radius: 4px;
|
|
|
+ .tab-change {
|
|
|
+ overflow: hidden;
|
|
|
+ margin-top: 40px;
|
|
|
+ }
|
|
|
+ .chart-item-tip {
|
|
|
+ margin-top: 12px;
|
|
|
+ font-size: 12px;
|
|
|
+ color: #E6A23C;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|