|
@@ -1,284 +1,91 @@
|
|
|
<template>
|
|
|
- <div class="data-big-wrapper">
|
|
|
- <div :class="['filter-wrapper', DetailedScreening && 'padding-bottom-10']">
|
|
|
- <el-form
|
|
|
- :model="form_all"
|
|
|
- class="form-wrapper"
|
|
|
- inline
|
|
|
- label-position="right"
|
|
|
- >
|
|
|
- <el-form-item label="部门">
|
|
|
- <el-cascader
|
|
|
- size="small"
|
|
|
- :options="sectorOptions"
|
|
|
- :props="{ checkStrictly: true }"
|
|
|
- clearable
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="时间:">
|
|
|
- <div class="date-select">
|
|
|
- <span
|
|
|
- v-for="item in dateSelect"
|
|
|
- :key="item.key"
|
|
|
- :class="[dateType === item.key ? 'date-active' : '']"
|
|
|
- class="date-item"
|
|
|
- @click.stop="
|
|
|
- dateType = item.key;
|
|
|
- setDate(item.key);
|
|
|
- "
|
|
|
- >{{ item.label }}</span>
|
|
|
- </div>
|
|
|
- <el-date-picker
|
|
|
- v-model="stratAndEnd"
|
|
|
- type="daterange"
|
|
|
- align="right"
|
|
|
- unlink-panels
|
|
|
- range-separator="至"
|
|
|
- start-placeholder="开始日期"
|
|
|
- end-placeholder="结束日期"
|
|
|
- size="small"
|
|
|
- value-format="yyyy.MM.dd"
|
|
|
- :default-time="['00:00:00', '23:59:59']"
|
|
|
- @change="dateType = ''"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- <el-button type="text" @click="DetailedScreening = !DetailedScreening">
|
|
|
- {{ !DetailedScreening ? "更多" : "收起" }}筛选
|
|
|
- </el-button>
|
|
|
- </el-form>
|
|
|
- <div v-show="DetailedScreening" class="stylus-more">
|
|
|
- <div>
|
|
|
- <el-form :model="form_all" class="flex_start">
|
|
|
- <el-form-item label="团队">
|
|
|
- <el-cascader
|
|
|
- size="small"
|
|
|
- :options="teamOptions"
|
|
|
- :props="{ checkStrictly: true }"
|
|
|
- clearable
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- </div>
|
|
|
- <div class="more-btn-wrapper">
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- size="mini"
|
|
|
- @click="query_project(form_all)"
|
|
|
- >筛 选
|
|
|
- </el-button>
|
|
|
- <el-button size="mini" @click="query_Reset">重 置</el-button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <div class="page-wrap data-big-wrapper">
|
|
|
+ <div class="page-header detial">
|
|
|
+ <searchHeader
|
|
|
+ :data="listSearch"
|
|
|
+ :is-hidden-time="true"
|
|
|
+ @search="search"
|
|
|
+ @moreReset="moreReset"
|
|
|
+ @changeShowMore="changeShowMore"
|
|
|
+ />
|
|
|
</div>
|
|
|
- <div class="data-wrapper">
|
|
|
- <dataTitle title="质量" />
|
|
|
- <dataTitle title="吞吐量" />
|
|
|
- <dataTitle title="效率" />
|
|
|
+ <div class="page-content detial" style="min-width: 1320px">
|
|
|
+ <header class="header mb25">
|
|
|
+ <headTitle title="质量" />
|
|
|
+ </header>
|
|
|
+ <qualityModule />
|
|
|
+ <header class="header mb25 mt40">
|
|
|
+ <headTitle title="吞吐量" />
|
|
|
+ </header>
|
|
|
+ <throughputModule />
|
|
|
+ <header class="header mb25 mt40">
|
|
|
+ <headTitle title="效率" />
|
|
|
+ </header>
|
|
|
+ <efficiencyModule />
|
|
|
+ </div>
|
|
|
+ <div @click.stop>
|
|
|
+ <drawer-modal v-if="openDrawer" :drawer="openDrawer" :data="requireList" :status="reqStatus" @clone="clone" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import moment from 'moment'
|
|
|
-import { projectList } from '@/api/projectIndex'
|
|
|
-import { testPost } from '@/api/dataBig'
|
|
|
-/* 页面专有展示组件*/
|
|
|
-import dataTitle from './components/dataTitle'
|
|
|
-
|
|
|
+import { listSearchData } from './data'
|
|
|
+import searchHeader from '@/components/searchHeader'
|
|
|
+import headTitle from '@/components/headTitle'
|
|
|
+import throughputModule from './components/throughputModule/index.vue'
|
|
|
+import qualityModule from './components/qualityModule/index.vue'
|
|
|
+import efficiencyModule from './components/efficiencyModule/index.vue'
|
|
|
+import drawerModal from './components/drawerModal/index.vue'
|
|
|
export default {
|
|
|
- components: { dataTitle },
|
|
|
+ components: {
|
|
|
+ searchHeader,
|
|
|
+ headTitle,
|
|
|
+ throughputModule,
|
|
|
+ qualityModule,
|
|
|
+ efficiencyModule,
|
|
|
+ drawerModal
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
// enum
|
|
|
- dateSelect: [
|
|
|
- {
|
|
|
- key: 'week',
|
|
|
- label: '本周'
|
|
|
- },
|
|
|
- {
|
|
|
- key: 'month',
|
|
|
- label: '本月'
|
|
|
- },
|
|
|
- {
|
|
|
- key: 'year',
|
|
|
- label: '本年'
|
|
|
- }
|
|
|
- ],
|
|
|
- // 筛选
|
|
|
- form_all: {},
|
|
|
- DetailedScreening: false,
|
|
|
- stratAndEnd: [], // 开始结束日期
|
|
|
- dateType: 'week', // 时间选择类型
|
|
|
- bugCountTimeType: 1, // 获取趋缺陷势图数据接口入参:1本周 2本月 3本年
|
|
|
- timeTypeList: [
|
|
|
- // 日期选择
|
|
|
- { code: 1, label: '周' },
|
|
|
- { code: 2, label: '月' },
|
|
|
- { code: 3, label: '年' }
|
|
|
- ],
|
|
|
- sectorOptions: [], // 部门数据
|
|
|
- teamOptions: [] // 团队数据
|
|
|
+ listSearch: listSearchData,
|
|
|
+ showMore: false,
|
|
|
+ openDrawer: true,
|
|
|
+ requireList: {},
|
|
|
+ reqStatus: '缺陷状态'
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- this.init()
|
|
|
+ // this.init()
|
|
|
},
|
|
|
methods: {
|
|
|
- setDate(type) {
|
|
|
- // 日期筛选
|
|
|
- let startDate = null
|
|
|
- let endDate = null
|
|
|
- switch (type) {
|
|
|
- case 'week':
|
|
|
- startDate = moment()
|
|
|
- .startOf('week')
|
|
|
- .format('YYYY.MM.DD')
|
|
|
- endDate = moment()
|
|
|
- .endOf('week')
|
|
|
- .format('YYYY.MM.DD')
|
|
|
- this.bugCountTimeType = this.timeTypeList[0].code
|
|
|
- break
|
|
|
- case 'month':
|
|
|
- startDate = moment()
|
|
|
- .startOf('month')
|
|
|
- .format('YYYY.MM.DD')
|
|
|
- endDate = moment()
|
|
|
- .endOf('month')
|
|
|
- .format('YYYY.MM.DD')
|
|
|
- this.bugCountTimeType = this.timeTypeList[1].code
|
|
|
- break
|
|
|
- case 'year':
|
|
|
- startDate = moment()
|
|
|
- .startOf('year')
|
|
|
- .format('YYYY.MM.DD')
|
|
|
- endDate = moment()
|
|
|
- .endOf('year')
|
|
|
- .format('YYYY.MM.DD')
|
|
|
- this.bugCountTimeType = this.timeTypeList[2].code
|
|
|
- break
|
|
|
- }
|
|
|
- this.stratAndEnd = [startDate, endDate]
|
|
|
- this.onSubmit()
|
|
|
- },
|
|
|
- query_project(e) {
|
|
|
- // 查询
|
|
|
- if (this.isToOne) {
|
|
|
- this.curIndex = 1
|
|
|
- this.currentPage = 1
|
|
|
+ search() {
|
|
|
+ const data = {}
|
|
|
+ // 因为高级筛选不自动搜索,所以每次出发搜索都map renderList就好。
|
|
|
+ this.listSearch.default.map(t => t.map(g => {
|
|
|
+ data[g.key] = g.value
|
|
|
+ }))
|
|
|
+ if (this.showMore) {
|
|
|
+ this.listSearch.adv.map(t => t.map(g => {
|
|
|
+ data[g.key] = g.value
|
|
|
+ }))
|
|
|
}
|
|
|
- this.table_loading = true
|
|
|
- this.query_object = {}
|
|
|
- this.query_object = e
|
|
|
- this.query_object.bizId = this.bizId
|
|
|
- this.query_object.curIndex = this.curIndex
|
|
|
- this.query_object.pageSize = this.pageSize
|
|
|
- projectList(this.query_object).then(res => {
|
|
|
- this.table_project = res.data
|
|
|
- this.total = res.total
|
|
|
- this.table_loading = false
|
|
|
- })
|
|
|
- this.isToOne = true
|
|
|
- },
|
|
|
- query_Reset() {
|
|
|
- // 重置
|
|
|
- this.$set(this.form_all, 'priority', this.query_object.priority)
|
|
|
- this.$set(this.form_all, 'name', this.query_object.name)
|
|
|
- this.$set(this.form_all, 'projectOwner', this.query_object.projectOwner)
|
|
|
- this.$set(this.form_all, 'bizType', '')
|
|
|
- this.$set(this.form_all, 'creater', '')
|
|
|
- this.$message({
|
|
|
- message: '已重置',
|
|
|
- type: 'success',
|
|
|
- duration: 1000,
|
|
|
- offset: 150
|
|
|
- })
|
|
|
- this.query_project(this.form_all)
|
|
|
+ console.log(data)
|
|
|
},
|
|
|
- init() {
|
|
|
- testPost().then(res => {
|
|
|
- console.log(res)
|
|
|
- })
|
|
|
+ moreReset(data) {
|
|
|
+ this.renderList.adv.map(t => t.map(g => {
|
|
|
+ g.value = null
|
|
|
+ }))
|
|
|
},
|
|
|
- onSubmit() {}
|
|
|
+ changeShowMore(e) {
|
|
|
+ this.showMore = e
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
<style lang="scss">
|
|
|
.data-big-wrapper {
|
|
|
padding: 0 10px;
|
|
|
-
|
|
|
- .filter-wrapper {
|
|
|
- background-color: #ffffff;
|
|
|
- padding: 10px 13px 0;
|
|
|
- box-shadow: 0px 0px 11px #eef0f5;
|
|
|
- border-radius: 0px 0px 6px 6px;
|
|
|
-
|
|
|
- &.padding-bottom-10 {
|
|
|
- padding-bottom: 1px;
|
|
|
- }
|
|
|
-
|
|
|
- /*表单样式*/
|
|
|
- .form-wrapper {
|
|
|
- padding-left: 16px;
|
|
|
-
|
|
|
- .el-form-item:nth-child(2) {
|
|
|
- margin-left: 97px;
|
|
|
- }
|
|
|
-
|
|
|
- > button {
|
|
|
- float: right;
|
|
|
- margin-right: 35px;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /*时间选择*/
|
|
|
- .date-select {
|
|
|
- line-height: 20px;
|
|
|
- display: inline-block;
|
|
|
-
|
|
|
- .date-item {
|
|
|
- display: inline-block;
|
|
|
- width: 40px;
|
|
|
- text-align: center;
|
|
|
- cursor: pointer;
|
|
|
- border-radius: 2px;
|
|
|
- margin-right: 5px;
|
|
|
- }
|
|
|
-
|
|
|
- .date-active {
|
|
|
- color: #ffffff;
|
|
|
- background-color: #409eff;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /*更多筛选*/
|
|
|
- .stylus-more {
|
|
|
- height: 98px;
|
|
|
- background: #fcfcfc;
|
|
|
- padding: 15px;
|
|
|
- margin-bottom: 15px;
|
|
|
- border: 1px solid #dddfe5;
|
|
|
- position: relative;
|
|
|
-
|
|
|
- .more-btn-wrapper {
|
|
|
- position: absolute;
|
|
|
- right: 23.33px;
|
|
|
- bottom: 20px;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /*elm样式重写*/
|
|
|
- .el-form-item {
|
|
|
- margin-bottom: 15px;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .data-wrapper {
|
|
|
- padding: 0 30px;
|
|
|
- margin-top: 10px;
|
|
|
- box-shadow: 0px 0px 11px #eef0f5;
|
|
|
- border-radius: 6px;
|
|
|
- background-color: #ffffff;
|
|
|
- }
|
|
|
}
|
|
|
</style>
|