|
@@ -1,11 +1,12 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div>
|
|
<div>
|
|
|
- <div class="full-width flex flex-center flex-justify-start">
|
|
|
|
|
|
|
+ <div class="full-width flex flex-center flex-justify-between">
|
|
|
<el-button type="primary" icon="el-icon-plus" @click="addTask"
|
|
<el-button type="primary" icon="el-icon-plus" @click="addTask"
|
|
|
>新增任务
|
|
>新增任务
|
|
|
</el-button>
|
|
</el-button>
|
|
|
|
|
+ <el-button circle icon="Refresh" @click="refresh" />
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="header flex flex-justify-between full-width">
|
|
|
|
|
|
|
+ <div class="header flex flex-justify-between full-width mt-10">
|
|
|
<div
|
|
<div
|
|
|
v-for="(item, index) in option.column"
|
|
v-for="(item, index) in option.column"
|
|
|
:key="item.label"
|
|
:key="item.label"
|
|
@@ -16,7 +17,7 @@
|
|
|
class="flex-child-shrink flex flex-justify-start first"
|
|
class="flex-child-shrink flex flex-justify-start first"
|
|
|
:style="`width:` + item.width + 'px'"
|
|
:style="`width:` + item.width + 'px'"
|
|
|
>
|
|
>
|
|
|
- {{ item.label }}
|
|
|
|
|
|
|
+ 共 {{ total }}个任务
|
|
|
</div>
|
|
</div>
|
|
|
<div v-else class="flex-child-average">
|
|
<div v-else class="flex-child-average">
|
|
|
{{ item.label }}
|
|
{{ item.label }}
|
|
@@ -43,8 +44,20 @@
|
|
|
<div
|
|
<div
|
|
|
class="full-width full-height flex flex-justify-start flex-align-center"
|
|
class="full-width full-height flex flex-justify-start flex-align-center"
|
|
|
>
|
|
>
|
|
|
- <div class="level" />
|
|
|
|
|
- <wt-tag :data="status" @change="changeStatus()" />
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="level"
|
|
|
|
|
+ :style="
|
|
|
|
|
+ `background-color:` + row && row.currentLevel
|
|
|
|
|
+ ? row.currentLevel.color
|
|
|
|
|
+ : 'white'
|
|
|
|
|
+ "
|
|
|
|
|
+ ></div>
|
|
|
|
|
+ <wt-tag
|
|
|
|
|
+ :data="status"
|
|
|
|
|
+ :status="row.taskStatus"
|
|
|
|
|
+ :disabled="true"
|
|
|
|
|
+ @change="changeStatus()"
|
|
|
|
|
+ />
|
|
|
{{ row[column.prop] }}
|
|
{{ row[column.prop] }}
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -53,8 +66,9 @@
|
|
|
class="flex-child-average full-height full-width flex flex-center"
|
|
class="flex-child-average full-height full-width flex flex-center"
|
|
|
>
|
|
>
|
|
|
<div>
|
|
<div>
|
|
|
- <el-tag>新编</el-tag>
|
|
|
|
|
- <el-tag class="ml-5">项目建议书</el-tag>
|
|
|
|
|
|
|
+ <el-tag v-for="tag in row.tagsArray" :key="tag" class="mr-10">{{
|
|
|
|
|
+ tag
|
|
|
|
|
+ }}</el-tag>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div
|
|
<div
|
|
@@ -110,18 +124,23 @@ export default {
|
|
|
option: {
|
|
option: {
|
|
|
type: Object,
|
|
type: Object,
|
|
|
default: null
|
|
default: null
|
|
|
|
|
+ },
|
|
|
|
|
+ total: {
|
|
|
|
|
+ type: Number,
|
|
|
|
|
+ default: 0
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ watch: {
|
|
|
|
|
+ data: {
|
|
|
|
|
+ handler(val) {
|
|
|
|
|
+ val.forEach(item => {
|
|
|
|
|
+ const tmp = this.level.find(ele => ele.value === item.level)
|
|
|
|
|
+ item.currentLevel = tmp
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ immediate: true
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- // watch: {
|
|
|
|
|
- // data: {
|
|
|
|
|
- // handler(val) {
|
|
|
|
|
- // if (val) {
|
|
|
|
|
- // this.status = this.fetchIndex(this.status, val[0].taskStatus)
|
|
|
|
|
- // }
|
|
|
|
|
- // },
|
|
|
|
|
- // immediate: true
|
|
|
|
|
- // }
|
|
|
|
|
- // },
|
|
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
task: null,
|
|
task: null,
|
|
@@ -159,6 +178,32 @@ export default {
|
|
|
color: '#C72A29',
|
|
color: '#C72A29',
|
|
|
checked: false
|
|
checked: false
|
|
|
}
|
|
}
|
|
|
|
|
+ ],
|
|
|
|
|
+ level: [
|
|
|
|
|
+ {
|
|
|
|
|
+ title: 'P1',
|
|
|
|
|
+ value: 0,
|
|
|
|
|
+ color: '#C72A29',
|
|
|
|
|
+ checked: true
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: 'P2',
|
|
|
|
|
+ value: 1,
|
|
|
|
|
+ color: '#E89D42',
|
|
|
|
|
+ checked: false
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: 'P3',
|
|
|
|
|
+ value: 2,
|
|
|
|
|
+ color: '#47A6EA',
|
|
|
|
|
+ checked: false
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: 'P4',
|
|
|
|
|
+ value: 3,
|
|
|
|
|
+ color: '#A0A0A0',
|
|
|
|
|
+ checked: false
|
|
|
|
|
+ }
|
|
|
]
|
|
]
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -186,6 +231,9 @@ export default {
|
|
|
this.info.taskStatus = res.value
|
|
this.info.taskStatus = res.value
|
|
|
this.submit()
|
|
this.submit()
|
|
|
},
|
|
},
|
|
|
|
|
+ refresh() {
|
|
|
|
|
+ this.$emit('refresh')
|
|
|
|
|
+ },
|
|
|
submit() {
|
|
submit() {
|
|
|
this.$api.task.addTask(this.info).then(res => {
|
|
this.$api.task.addTask(this.info).then(res => {
|
|
|
this.showDialog = false
|
|
this.showDialog = false
|