|
@@ -1,20 +1,31 @@
|
|
|
<template>
|
|
|
<el-dialog :visible.sync="visibleplanning" class="dialogBack" style=" background: #F2F3F6; color: #333B4A;" fullscreen :modal="false" :show="show" title="规划迭代" width="60%" @close="OnClose()">
|
|
|
<el-container>
|
|
|
- <el-main style="padding: 0;" class="public_main Layout_space_between">
|
|
|
+ <el-main style="padding: 0px;margin: 10px;" class="public_main Layout_space_between">
|
|
|
<div class="boxShadow">
|
|
|
<div style="margin: 0 10px;" class="Layout_space_between">
|
|
|
<div class="Layout_flex_start">
|
|
|
<el-checkbox v-model="checkAllLeft" :indeterminate="isIndeterminateLeft" class="titNameX" style="margin: 10px; line-height: 32px;" @change="handleCheckAllChange1" />未规划的需求
|
|
|
</div>
|
|
|
- <el-input v-model="value1" style="width:30%;" clearable size="small" placeholder="搜索需求名称或ID" @input="search(value1)" />
|
|
|
+ <el-input v-model="value1" style="width:30%;" clearable size="small" suffix-icon="el-icon-search" placeholder="搜索需求名称或ID" @input="search(value1)" />
|
|
|
</div>
|
|
|
<el-divider />
|
|
|
<el-container>
|
|
|
- <el-main class="scroll" style="height: calc(100vh - 370px);">
|
|
|
+ <el-main class="scroll" style="height: calc(100vh - 279px);" @scroll.native="getScroll($event)">
|
|
|
<el-checkbox-group v-if="citiesLeft.length>0" v-model="checkedCitiesLeft" @change="handleCheckedCitiesChange1">
|
|
|
<el-checkbox v-for="item in citiesLeft" :key="item.id" :label="item" class="Layout_flex_start" style="margin: 10px 0;">
|
|
|
- <span class="priority">{{ item.priorityName }}</span>
|
|
|
+ <span
|
|
|
+ class="priority"
|
|
|
+ :class="{
|
|
|
+ 'priority_color': item.priority === 0,
|
|
|
+ 'priority_color1': item.priority === 1,
|
|
|
+ 'priority_color2': item.priority === 2,
|
|
|
+ 'priority_color3': item.priority === 3,
|
|
|
+ 'priority_color4': item.priority === 4,
|
|
|
+ 'priority_color5': item.priority === 5,
|
|
|
+ 'priority_color6': item.priority === 6
|
|
|
+ }"
|
|
|
+ >{{ item.priorityName }}</span>
|
|
|
<span class="Requirement">{{ item.name | ellipsis }}</span>
|
|
|
<span class="RequirementId">{{ item.requirementDisplayId }}</span>
|
|
|
<span class="RequirementName">{{ item.pm.name }}</span>
|
|
@@ -27,33 +38,44 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-main>
|
|
|
- <el-footer style="text-align: center;">
|
|
|
- <div v-if="citiesLeft.length > 15" class="solt" @click="LoadMore">加载更多 </div>
|
|
|
+ <el-footer v-show="scrollBottom === 0" style="text-align: center; height: 35px;">
|
|
|
+ <el-button class="solt public_Jump" type="text" :loading="loadingBtn" :disabled="Load === '没有更多了'" @click="LoadMore">{{ Load }}</el-button>
|
|
|
</el-footer>
|
|
|
</el-container>
|
|
|
</div>
|
|
|
|
|
|
<div>
|
|
|
- <div class="rectangle">
|
|
|
- <svg-icon v-if="leftArray.length === 0" icon-class="右箭头" />
|
|
|
- <svg-icon v-if="leftArray.length > 0" icon-class="右箭头1" @click="torightLeft(1)" />
|
|
|
+ <div :class="{'rectangleTow': leftArray.length !== 0, 'rectangle': leftArray.length === 0}">
|
|
|
+ <svg-icon v-if="leftArray.length === 0" class="inlineBlock" icon-class="右箭头" />
|
|
|
+ <svg-icon v-if="leftArray.length > 0" class="inlineBlock" icon-class="右箭头1" @click="torightLeft(1)" />
|
|
|
</div>
|
|
|
- <div class="rectangle">
|
|
|
- <svg-icon v-if="rightArray.length === 0" icon-class="左箭头" />
|
|
|
- <svg-icon v-if="rightArray.length > 0" icon-class="左箭头1" @click="torightLeft(2)" />
|
|
|
+ <div :class="{'rectangleTow': rightArray.length !== 0, 'rectangle': rightArray.length === 0}">
|
|
|
+ <svg-icon v-if="rightArray.length === 0" class="inlineBlock" icon-class="左箭头" />
|
|
|
+ <svg-icon v-if="rightArray.length > 0" class="inlineBlock" icon-class="左箭头1" @click="torightLeft(2)" />
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<div class="boxShadow">
|
|
|
<div class="Layout_flex_start" style="margin-left: 10px;">
|
|
|
- <el-checkbox v-model="checkAll" :indeterminate="isIndeterminate" class="titNameX" style="margin: 10px; line-height: 32px;" @change="handleCheckAllChange" />迭代
|
|
|
+ <el-checkbox v-model="checkAll" :indeterminate="isIndeterminate" class="titNameX" style="margin: 10px; line-height: 32px;" @change="handleCheckAllChange" />{{ iterationData.name }}
|
|
|
</div>
|
|
|
<el-divider />
|
|
|
<el-container>
|
|
|
- <el-main class="scroll" style="height: calc(100vh - 370px);">
|
|
|
+ <el-main class="scroll" style="height: calc(100vh - 279px);" @scroll.native="getScrollTow($event)">
|
|
|
<el-checkbox-group v-if="cities.length>0" v-model="checkedCities" @change="handleCheckedCitiesChange">
|
|
|
<el-checkbox v-for="item in cities" :key="item.id" :label="item" class="Layout_flex_start" style="margin: 10px 0;">
|
|
|
- <span class="priority">{{ item.priorityName }}</span>
|
|
|
+ <span
|
|
|
+ class="priority"
|
|
|
+ :class="{
|
|
|
+ 'priority_color': item.priority === 0,
|
|
|
+ 'priority_color1': item.priority === 1,
|
|
|
+ 'priority_color2': item.priority === 2,
|
|
|
+ 'priority_color3': item.priority === 3,
|
|
|
+ 'priority_color4': item.priority === 4,
|
|
|
+ 'priority_color5': item.priority === 5,
|
|
|
+ 'priority_color6': item.priority === 6
|
|
|
+ }"
|
|
|
+ >{{ item.priorityName }}</span>
|
|
|
<span class="Requirement">{{ item.name | ellipsis }}</span>
|
|
|
<span class="RequirementId">{{ item.requirementDisplayId }}</span>
|
|
|
<span class="RequirementName">{{ item.pm.name }}</span>
|
|
@@ -66,13 +88,13 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-main>
|
|
|
- <el-footer style="text-align: center;">
|
|
|
- <div v-if="cities.length > 15" class="solt" @click="LoadMore">加载更多 </div>
|
|
|
+ <el-footer v-show="scrollBottomRight === 0" style="text-align: center; height: 35px;">
|
|
|
+ <el-button class="solt public_Jump" type="text" :loading="loadingBtn" :disabled="LoadTow === '没有更多了'" @click="LoadMore">{{ LoadTow }}</el-button>
|
|
|
</el-footer>
|
|
|
</el-container>
|
|
|
</div>
|
|
|
</el-main>
|
|
|
- <el-footer class="public_footer">
|
|
|
+ <el-footer style="background: #FFF; text-align: right; padding: 10px;">
|
|
|
<el-button @click="OnClose">取 消</el-button>
|
|
|
<el-button type="primary" @click="addRequired()">确 定</el-button>
|
|
|
</el-footer>
|
|
@@ -83,9 +105,8 @@
|
|
|
|
|
|
<script>
|
|
|
import '@/styles/PublicStyle/index.scss'
|
|
|
-import { iterationRequire, iterationUpdateBelongingIteration, requirementQueryRequirementInfoList } from '@/api/iteration.js'
|
|
|
+import { iterationRequire, iterationUpdateBelongingIteration, requirementQueryRequirementInfoList, iterationList } from '@/api/iteration.js'
|
|
|
export default {
|
|
|
- name: 'TemplateDialog',
|
|
|
filters: {
|
|
|
ellipsis(value) {
|
|
|
if (!value) return ''
|
|
@@ -97,7 +118,8 @@ export default {
|
|
|
},
|
|
|
props: {
|
|
|
show: { type: Boolean, default: false },
|
|
|
- iterationIds: { type: Number, default: null }
|
|
|
+ iterationId: { type: Number, default: null },
|
|
|
+ title: { type: Object, default: null }
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -112,10 +134,19 @@ export default {
|
|
|
checkedLeft: '',
|
|
|
visibleplanning: this.show,
|
|
|
value1: '',
|
|
|
+ Load: '加载更多',
|
|
|
+ LoadTow: '加载更多',
|
|
|
+ iterationData: {}, // 当前迭代数据
|
|
|
leftArray: [],
|
|
|
rightArray: [],
|
|
|
+ scrollBottom: '', // 滚动条(左)
|
|
|
+ scrollBottomRight: '', // 滚动条(右)
|
|
|
+ loadingBtn: false, // 更多loading
|
|
|
+ citiesLeftTotal: '', // 左total
|
|
|
+ citiesTotal: '', // 右total
|
|
|
reqRight: [],
|
|
|
- size: 50
|
|
|
+ size: 50,
|
|
|
+ bizId: localStorage.getItem('bizId')
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -130,13 +161,18 @@ export default {
|
|
|
this.getRequirement()
|
|
|
},
|
|
|
methods: {
|
|
|
- getRequirement() { // 获取需求
|
|
|
+ async getRequirement() { // 获取需求/迭代
|
|
|
this.leftArray = []
|
|
|
this.rightArray = []
|
|
|
- iterationRequire({ id: this.iterationIds, curIndex: 1, pageSize: 50 }).then(res => {
|
|
|
- this.citiesLeft = res.data.left.list // 无归属需求
|
|
|
- this.cities = res.data.right.list // 迭代下需求
|
|
|
- })
|
|
|
+ const list = iterationList({ id: this.iterationId, curIndex: 1, pageSize: 15, bizId: this.bizId })
|
|
|
+ const listRes = await list
|
|
|
+ this.iterationData = listRes.data.list[0]
|
|
|
+ const iterationRequireList = iterationRequire({ id: this.iterationId, curIndex: 1, pageSize: 50, bizId: this.bizId })
|
|
|
+ const iterationRequireRes = await iterationRequireList
|
|
|
+ this.citiesLeft = iterationRequireRes.data.left.list // 无归属需求
|
|
|
+ this.citiesLeftTotal = iterationRequireRes.data.left.total
|
|
|
+ this.cities = iterationRequireRes.data.right.list // 迭代下需求
|
|
|
+ this.citiesTotal = iterationRequireRes.data.right.total // 迭代下需求total
|
|
|
},
|
|
|
|
|
|
handleCheckAllChange(val) { // 迭代下需求全选
|
|
@@ -195,6 +231,23 @@ export default {
|
|
|
this.checkedCitiesLeft = []
|
|
|
this.checkedCities = []
|
|
|
},
|
|
|
+
|
|
|
+ getScroll(event) { // 左侧滚动条监控
|
|
|
+ const scrollBottom = event.target.scrollHeight - event.target.scrollTop - event.target.clientHeight // 滚动条距离底部的距离scrollBottom
|
|
|
+ this.scrollBottom = scrollBottom
|
|
|
+ if (this.scrollBottom === 0) {
|
|
|
+ this.citiesLeft.length === this.citiesLeftTotal ? this.Load = '没有更多了' : ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ getScrollTow(event) { // 右侧滚动条监控
|
|
|
+ const scrollBottom = event.target.scrollHeight - event.target.scrollTop - event.target.clientHeight // 滚动条距离底部的距离scrollBottom
|
|
|
+ this.scrollBottomRight = scrollBottom
|
|
|
+ if (this.scrollBottomRight === 0) {
|
|
|
+ this.cities.length === this.citiesTotal ? this.LoadTow = '没有更多了' : ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
addRequired() { // 保存迭代下需求
|
|
|
const requirementIds = []
|
|
|
const requiredArr = []
|
|
@@ -206,25 +259,28 @@ export default {
|
|
|
})
|
|
|
const data = [
|
|
|
{ id: -1, requirementIds: requiredArr.toString() },
|
|
|
- { id: this.iterationIds, name: '测试', requirementIds: requirementIds.toString() }
|
|
|
+ { id: this.iterationId, bizId: this.bizId, requirementIds: requirementIds.toString() }
|
|
|
]
|
|
|
iterationUpdateBelongingIteration(data).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
this.$emit('update:show', false)
|
|
|
+ this.$emit('iteratioFilter')
|
|
|
this.$message({ showClose: true, message: '保存成功', type: res.msg })
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
|
|
|
LoadMore() { // 加载更多
|
|
|
- requirementQueryRequirementInfoList({ name: '', curIndex: 1, pageSize: this.size + 50, iterationId: -1, bizId: '' }).then(res => {
|
|
|
+ this.loadingBtn = true
|
|
|
+ requirementQueryRequirementInfoList({ name: '', curIndex: 1, pageSize: this.size + 50, iterationId: -1, bizId: this.bizId }).then(res => {
|
|
|
this.citiesLeft = res.data.list
|
|
|
this.size = this.size + 50
|
|
|
+ this.loadingBtn = false
|
|
|
})
|
|
|
},
|
|
|
|
|
|
search(value) { // 需求查询
|
|
|
- requirementQueryRequirementInfoList({ name: value, curIndex: 1, pageSize: this.size + 50, iterationId: -1, bizId: '' }).then(res => {
|
|
|
+ requirementQueryRequirementInfoList({ name: value, curIndex: 1, pageSize: this.size + 50, iterationId: -1, bizId: this.bizId }).then(res => {
|
|
|
this.citiesLeft = res.data.list
|
|
|
})
|
|
|
},
|
|
@@ -249,8 +305,10 @@ export default {
|
|
|
}
|
|
|
|
|
|
.dialogBack {
|
|
|
+ font-family: MicrosoftYaHei;
|
|
|
+
|
|
|
/deep/ .el-dialog__body {
|
|
|
- padding: 10px;
|
|
|
+ padding: 0px;
|
|
|
font-size: 14px;
|
|
|
word-break: break-all;
|
|
|
background: #F2F3F6;
|
|
@@ -280,17 +338,14 @@ export default {
|
|
|
opacity:1;
|
|
|
border-radius:7px;
|
|
|
width: 45%;
|
|
|
- min-height: calc(100vh - 240px);
|
|
|
- margin-bottom: 30px;
|
|
|
+ min-height: calc(100vh - 190px);
|
|
|
}
|
|
|
|
|
|
.solt {
|
|
|
font-size: 12px;
|
|
|
- font-family: MicrosoftYaHei;
|
|
|
line-height: 14px;
|
|
|
color: #999999;
|
|
|
opacity: 1;
|
|
|
- cursor: pointer;
|
|
|
position: relative;
|
|
|
top: 50%;
|
|
|
transform: translateY(-50%);
|
|
@@ -308,21 +363,30 @@ export default {
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
|
|
|
+ .rectangleTow {
|
|
|
+ width:50px;
|
|
|
+ height:146px;
|
|
|
+ line-height: 146px;
|
|
|
+ margin: 10px 0;
|
|
|
+ text-align: center;
|
|
|
+ background:rgba(255,255,255,1);
|
|
|
+ box-shadow:0px 0px 11px #409EFF ;
|
|
|
+ opacity:1;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+
|
|
|
.titNameX {
|
|
|
width:13px;
|
|
|
font-size:14px;
|
|
|
- font-family:PingFangSC-Medium;
|
|
|
color:rgba(74,74,74,1);
|
|
|
opacity:1;
|
|
|
}
|
|
|
|
|
|
.Layout_space_between .priority {
|
|
|
width:40px;
|
|
|
- background:rgba(245,108,108,1);
|
|
|
opacity:1;
|
|
|
border-radius:4px;
|
|
|
- font-size:14px;
|
|
|
- font-family:MicrosoftYaHei;
|
|
|
+ font-size:12px;
|
|
|
line-height:17px;
|
|
|
color:rgba(255,255,255,1);
|
|
|
text-align: center;
|
|
@@ -331,8 +395,7 @@ export default {
|
|
|
|
|
|
.Requirement {
|
|
|
width:187px;
|
|
|
- font-size:14px;
|
|
|
- font-family:MicrosoftYaHei;
|
|
|
+ font-size:12px;
|
|
|
line-height:17px;
|
|
|
color:rgba(51,51,51,1);
|
|
|
opacity:1;
|
|
@@ -340,17 +403,15 @@ export default {
|
|
|
|
|
|
.RequirementId {
|
|
|
width:150px;
|
|
|
- font-size:14px;
|
|
|
- font-family:MicrosoftYaHei;
|
|
|
+ font-size:12px;
|
|
|
line-height:17px;
|
|
|
color:rgba(102,102,102,1);
|
|
|
opacity:1;
|
|
|
}
|
|
|
|
|
|
.RequirementName {
|
|
|
- width:46px;
|
|
|
- font-size:14px;
|
|
|
- font-family:MicrosoftYaHei;
|
|
|
+ width:100px;
|
|
|
+ font-size:12px;
|
|
|
line-height:17px;
|
|
|
color:rgba(102,102,102,1);
|
|
|
opacity:1;
|
|
@@ -369,11 +430,15 @@ export default {
|
|
|
|
|
|
.TipsName {
|
|
|
font-size:12px;
|
|
|
- font-family:MicrosoftYaHei;
|
|
|
line-height:14px;
|
|
|
color:rgba(191,198,220,1);
|
|
|
opacity:1;
|
|
|
}
|
|
|
+
|
|
|
+ .inlineBlock {
|
|
|
+ width: 26px;
|
|
|
+ display: inline-block;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
</style>
|