|
|
@@ -80,7 +80,10 @@ export default {
|
|
|
init() {
|
|
|
this.$api.common.dicList({ code: 'edit_task_type' }).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
- this.options = res.data
|
|
|
+ this.options = res.data.map(ele => {
|
|
|
+ ele.type = 'tags'
|
|
|
+ return ele
|
|
|
+ })
|
|
|
if (this.ids.length > 0) {
|
|
|
const tmp = this.options.find(ele => ele.id === this.ids[0])
|
|
|
if (tmp) {
|
|
|
@@ -91,7 +94,10 @@ export default {
|
|
|
})
|
|
|
this.$api.common.dicList({ code: 'edit_task' }).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
- this.options1 = res.data
|
|
|
+ this.options1 = res.data.map(ele => {
|
|
|
+ ele.type = 'category'
|
|
|
+ return ele
|
|
|
+ })
|
|
|
if (this.ids.length > 1) {
|
|
|
const tmp = this.options1.find(ele => ele.id === this.ids[1])
|
|
|
this.tags.push(tmp)
|
|
|
@@ -106,8 +112,7 @@ export default {
|
|
|
]
|
|
|
this.show = false
|
|
|
this.form = {}
|
|
|
- const tmps = this.tags.map(ele => ele.id).join(',')
|
|
|
- this.$emit('submit', tmps)
|
|
|
+ this.$emit('submit', this.tags)
|
|
|
},
|
|
|
remove(res) {
|
|
|
this.tags = this.tags.filter(ele => ele.id !== res.id)
|