|
@@ -1,21 +1,35 @@
|
|
|
<template>
|
|
|
<el-drawer :title="Statistics.title" :visible.sync="drawer_" :direction="direction" :modal="false" :class="{'drawer-box': showClass}" size="100%" :before-close="handleClose">
|
|
|
- <div style="height: calc(100vh - 200px); overflow: scroll; overflow-x: hidden;">
|
|
|
+ <div>
|
|
|
<div class="qz-drawer-header">
|
|
|
- <timeline :data="list" @update="getTimeLine" />
|
|
|
- <timeline :data="list" @update="getTimeLine" />
|
|
|
+ <timeline :data="list" :num="defaultKey" @update="getTimeLine" />
|
|
|
+ <!-- <timeline :data="list" @update="getTimeLine" /> -->
|
|
|
+ </div>
|
|
|
+ <div style="height: calc(100vh - 295px); overflow: scroll; overflow-x: hidden;">
|
|
|
+ <el-table :data="tableData" style="width: 100%;" :header-cell-style="{ 'color':'rgba(74,74,74,1)','font-size':'14px','font-weight':'500' }" class="integration-num">
|
|
|
+ <el-table-column label="优先级" min-width="100">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div class="div_priority" :style="{background: priorityColors[scope.row.priority % priorityColors.length]}">{{ 'P'+scope.row.priority }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="需求名称'" min-width="250">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div class="drawer-id">{{ scope.row.requirementDisplayId }}</div>
|
|
|
+ <el-tooltip v-if="scope.row.name.length >= 15" class="item" effect="dark" :content="scope.row.name" placement="top">
|
|
|
+ <div class="drawer-name" @click="jumper(scope.row)">{{ scope.row.name | ellipsis }}</div>
|
|
|
+ </el-tooltip>
|
|
|
+ <div v-else class="drawer-name" @click="jumper(scope.row)">{{ scope.row.name | ellipsis }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="状态" min-width="100">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>{{ scope.row.statusName }}</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
</div>
|
|
|
- <qz-table :table-list="tableData" :header="header" />
|
|
|
- <!-- <qz-table :tableData="tableData" :tableHead="tableHead" selectionShow="true" :indexShow="true" indexLabel="序号" :indexWidth="50" /> -->
|
|
|
- <!-- <el-table :data="tableData" style="width: 100%;" :header-cell-style="{ 'color':'rgba(74,74,74,1)','font-size':'14px','font-weight':'500' }" class="integration-num">
|
|
|
- <el-table-column label="优先级" min-width="100">
|
|
|
- <template slot-scope="scope">
|
|
|
- <div class="div_priority" :style="{background: priorityColors[scope.row.priority % priorityColors.length]}">{{ 'P'+scope.row.priority }}</div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table> -->
|
|
|
</div>
|
|
|
- <!-- <el-pagination
|
|
|
+ <el-pagination
|
|
|
style="text-align: center;"
|
|
|
:current-page.sync="currentPage"
|
|
|
:page-size="10"
|
|
@@ -23,31 +37,29 @@
|
|
|
:total="total"
|
|
|
@size-change="handleSizeChange"
|
|
|
@current-change="handleCurrentChange"
|
|
|
- /> -->
|
|
|
+ />
|
|
|
</el-drawer>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-// import { EncryptId } from '@/utils/crypto-js.js'
|
|
|
-// import { getRequirement } from '@/api/requirement.js'
|
|
|
+import { EncryptId } from '@/utils/crypto-js.js'
|
|
|
+import { getRequirement } from '@/api/requirement.js'
|
|
|
// import { taskList } from '@/api/taskIndex'
|
|
|
// import { bugList, bugGetEnum } from '@/api/defectManage'
|
|
|
import timeline from '@/components/timeline'
|
|
|
-import qzTable from '@/components/table'
|
|
|
export default {
|
|
|
components: {
|
|
|
- timeline,
|
|
|
- qzTable
|
|
|
+ timeline
|
|
|
+ },
|
|
|
+ filters: {
|
|
|
+ ellipsis(value) {
|
|
|
+ if (!value) return ''
|
|
|
+ if (value.length > 15) {
|
|
|
+ return value.slice(0, 15) + '...'
|
|
|
+ }
|
|
|
+ return value
|
|
|
+ }
|
|
|
},
|
|
|
- // filters: {
|
|
|
- // ellipsis(value) {
|
|
|
- // if (!value) return ''
|
|
|
- // if (value.length > 15) {
|
|
|
- // return value.slice(0, 15) + '...'
|
|
|
- // }
|
|
|
- // return value
|
|
|
- // }
|
|
|
- // },
|
|
|
props: {
|
|
|
data: { type: Object, required: true },
|
|
|
drawer: { type: Boolean, default: false }
|
|
@@ -60,44 +72,13 @@ export default {
|
|
|
direction: 'rtl',
|
|
|
showClass: false,
|
|
|
bugList: [],
|
|
|
- // currentPage: 1,
|
|
|
- // total: 0,
|
|
|
- // paging: {
|
|
|
- // curIndex: 1, // 分页
|
|
|
- // pageSize: 10 // 分页
|
|
|
- // },
|
|
|
- header: [
|
|
|
- { prop: 'w', label: '全部' },
|
|
|
- { prop: 'x', label: 'x',
|
|
|
- formatter: (row) => {
|
|
|
- return row.x.toFixed(3)
|
|
|
- }
|
|
|
- },
|
|
|
- { prop: 'd', label: 'd',
|
|
|
- formatter: (row) => {
|
|
|
- return row.d.toFixed(2)
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- label: '操作',
|
|
|
- render: (h, data) => {
|
|
|
- return (
|
|
|
- <el-button
|
|
|
- type='primary'
|
|
|
- onClick={() => {
|
|
|
- this.handleClick(data.row)
|
|
|
- }}
|
|
|
- >
|
|
|
- 点我获取行数据
|
|
|
- </el-button>
|
|
|
- )
|
|
|
- }
|
|
|
- }
|
|
|
- ],
|
|
|
- tableData: [
|
|
|
- { w: 1, x: 99.25123, d: 0.23892 },
|
|
|
- { w: 1, x: 255.6666, d: 0.99134 }
|
|
|
- ]
|
|
|
+ currentPage: 1,
|
|
|
+ total: 0,
|
|
|
+ paging: {
|
|
|
+ curIndex: 1, // 分页
|
|
|
+ pageSize: 10 // 分页
|
|
|
+ },
|
|
|
+ tableData: []
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -112,12 +93,14 @@ export default {
|
|
|
data: {
|
|
|
handler(newV, oldV) {
|
|
|
this.Statistics = newV
|
|
|
+ this.list = newV.xaxis
|
|
|
+ this.defaultKey = newV.dataIndex
|
|
|
this.currentPage = 1
|
|
|
- // this.paging = {
|
|
|
- // curIndex: 1, // 分页
|
|
|
- // pageSize: 10 // 分页
|
|
|
- // }
|
|
|
- // this.getTableData()
|
|
|
+ this.paging = {
|
|
|
+ curIndex: 1, // 分页
|
|
|
+ pageSize: 10 // 分页
|
|
|
+ }
|
|
|
+ this.getTableData(this.Statistics.yaxis[0].idList[this.defaultKey],)
|
|
|
},
|
|
|
immediate: true
|
|
|
}
|
|
@@ -125,22 +108,33 @@ export default {
|
|
|
// created() {
|
|
|
// this.bugGetEnum()
|
|
|
// },
|
|
|
+ mounted() {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.showClass = true
|
|
|
+ })
|
|
|
+ },
|
|
|
methods: {
|
|
|
handleClick(row) {
|
|
|
console.log(row)
|
|
|
},
|
|
|
getTimeLine(val) {
|
|
|
console.log(val, 'vfvdv')
|
|
|
+ this.getTableData(this.Statistics.yaxis[0].idList[val.value])
|
|
|
},
|
|
|
- async getTableData() {
|
|
|
+ async getTableData(taskIdList) {
|
|
|
+ const data = {
|
|
|
+ ids: taskIdList,
|
|
|
+ ...this.paging
|
|
|
+ }
|
|
|
// if (this.Statistics.idList !== undefined && this.Statistics.idList.length > 0) {
|
|
|
// this.paging.ids = this.Statistics.idList
|
|
|
// if (this.Statistics.typeStr === '需求') {
|
|
|
- // const res = await getRequirement(this.paging)
|
|
|
- // if (res.code === 200) {
|
|
|
- // this.tableData = res.data.list
|
|
|
- // this.total = res.data.total
|
|
|
- // }
|
|
|
+ const res = await getRequirement(data)
|
|
|
+ if (res.code === 200) {
|
|
|
+ console.log(res, '农村科技大厦')
|
|
|
+ this.tableData = res.data.list
|
|
|
+ // this.total = res.data.total
|
|
|
+ }
|
|
|
// } else if (this.Statistics.typeStr === '任务') {
|
|
|
// const res = await taskList(this.paging)
|
|
|
// if (res.code === 200) {
|
|
@@ -158,11 +152,11 @@ export default {
|
|
|
// this.tableData = []
|
|
|
// }
|
|
|
},
|
|
|
- // jumper(val) {
|
|
|
- // const bizId_id = EncryptId(`${val.bizId}_${val.id}`)
|
|
|
- // const newTab = this.$router.resolve({ name: this.Statistics.typeStr + '详情', query: { bizId_id: bizId_id }})
|
|
|
- // window.open(newTab.href, '_blank')
|
|
|
- // },
|
|
|
+ jumper(val) {
|
|
|
+ const bizId_id = EncryptId(`${val.bizId}_${val.id}`)
|
|
|
+ const newTab = this.$router.resolve({ name: this.Statistics.typeStr + '详情', query: { bizId_id: bizId_id }})
|
|
|
+ window.open(newTab.href, '_blank')
|
|
|
+ },
|
|
|
// async bugGetEnum() {
|
|
|
// const res = await bugGetEnum()
|
|
|
// if (res.code === 200) {
|
|
@@ -170,14 +164,14 @@ export default {
|
|
|
// this.showClass = true
|
|
|
// }
|
|
|
// },
|
|
|
- // handleSizeChange(val) {
|
|
|
- // this.paging.pageSize = val
|
|
|
- // this.getTableData()
|
|
|
- // },
|
|
|
- // handleCurrentChange(val) {
|
|
|
- // this.paging.curIndex = val
|
|
|
- // this.getTableData()
|
|
|
- // },
|
|
|
+ handleSizeChange(val) {
|
|
|
+ this.paging.pageSize = val
|
|
|
+ this.getTableData()
|
|
|
+ },
|
|
|
+ handleCurrentChange(val) {
|
|
|
+ this.paging.curIndex = val
|
|
|
+ this.getTableData()
|
|
|
+ },
|
|
|
handleClose(done) {
|
|
|
this.$emit('clone')
|
|
|
}
|
|
@@ -193,10 +187,12 @@ export default {
|
|
|
min-height: 120px;
|
|
|
margin: 20px 30px;
|
|
|
padding: 1px 0;
|
|
|
+ overflow: hidden;
|
|
|
+ overflow-x: auto;
|
|
|
}
|
|
|
>>> :focus{outline:0;}
|
|
|
.integration-num {
|
|
|
- margin: 20px;
|
|
|
+ margin: 20px 30px;
|
|
|
}
|
|
|
|
|
|
.drawer-name:hover {
|