|
@@ -45,6 +45,7 @@
|
|
|
popper-class="select-observe"
|
|
|
size="medium"
|
|
|
filterable
|
|
|
+ multiple
|
|
|
remote
|
|
|
reserve-keyword
|
|
|
:placeholder="selectBy==='requirement'?'按需求名称或ID搜索':'按任务名称或ID搜索'"
|
|
@@ -224,7 +225,7 @@ export default {
|
|
|
detailDayList: [], // 详细的日期
|
|
|
schedule: '',
|
|
|
selectBy: 'task', // 通过什么选择任务
|
|
|
- selectTask: null, // 选择的任务id
|
|
|
+ selectTask: [], // 选择的任务id
|
|
|
selectPages: { // 选择任务的分页
|
|
|
pageSize: 10,
|
|
|
curIndex: 1
|
|
@@ -399,7 +400,7 @@ export default {
|
|
|
name: query,
|
|
|
...this.selectPages
|
|
|
})
|
|
|
- if (res.code === 200) {
|
|
|
+ if (res.code === 200 && res.data) {
|
|
|
this.taskTotal = res.total
|
|
|
this.tasksOptions = this.tasksOptions.concat(res.data)
|
|
|
if (this.taskTotal <= this.tasksOptions.length) this.loadMore = false// 全部数据已加载完成
|
|
@@ -432,11 +433,13 @@ export default {
|
|
|
const res = list.find(item => item.id === val.id)
|
|
|
return !!res
|
|
|
},
|
|
|
- tasksChange(id) { // 任务列表变动
|
|
|
+ tasksChange(ids) { // 任务列表变动
|
|
|
+ if (ids.length < 0) return
|
|
|
+ const id = ids[0]
|
|
|
const isEx = this.tasksDetailList.find(item => item.id === id)
|
|
|
if (isEx) {
|
|
|
this.$message({ message: '任务已存在', type: 'warning', duration: 1000, offset: 150 })
|
|
|
- this.selectTask = null
|
|
|
+ this.selectTask = []
|
|
|
return false
|
|
|
}
|
|
|
let res
|
|
@@ -450,7 +453,7 @@ export default {
|
|
|
}
|
|
|
this.tasksDetailList.push(res)
|
|
|
this.form.taskList.push(res.id)
|
|
|
- this.selectTask = null
|
|
|
+ this.selectTask = []
|
|
|
this.$nextTick(() => {
|
|
|
document.getElementById(`task${res.id}`).scrollIntoView({ block: 'start', behavior: 'smooth' })
|
|
|
})
|
|
@@ -515,6 +518,16 @@ export default {
|
|
|
}
|
|
|
</script>
|
|
|
<style scoped lang="scss">
|
|
|
+article::-webkit-scrollbar {
|
|
|
+ -webkit-appearance: none;
|
|
|
+ width: 7px;
|
|
|
+}
|
|
|
+
|
|
|
+article::-webkit-scrollbar-thumb {
|
|
|
+ border-radius: 4px;
|
|
|
+ background-color: rgba(0, 0, 0, .5);
|
|
|
+ box-shadow: 0 0 1px rgba(255, 255, 255, .5);
|
|
|
+}
|
|
|
article {
|
|
|
max-height: 450px;
|
|
|
overflow: scroll;
|
|
@@ -603,22 +616,16 @@ article {
|
|
|
}
|
|
|
.task-list-show {
|
|
|
width: 100%;
|
|
|
- padding: 0 60px;
|
|
|
+ padding: 0 156px 0 60px;
|
|
|
.task-list-item {
|
|
|
width: 100%;
|
|
|
display: flex;
|
|
|
margin: 10px 0;
|
|
|
.item-id {
|
|
|
- width: 15%;
|
|
|
+ width: 105px;
|
|
|
}
|
|
|
.item-name {
|
|
|
- width: 85%;
|
|
|
- }
|
|
|
- .item-qa {
|
|
|
- width: 20%;
|
|
|
- }
|
|
|
- .item-rd {
|
|
|
- width: 20%;
|
|
|
+ width: calc(100% - 105px);
|
|
|
}
|
|
|
.item-cancel {
|
|
|
font-size: 20px;
|