Commit 8e9e49b1 authored by huai.li's avatar huai.li

修复项目清单相关

parent 6978a0e9
......@@ -8,7 +8,8 @@ export default {
},
getMembersById: {
url: '/vue/task/get-member-of-task'
// url: '/vue/task/get-member-of-task'
url: '/vue/task/get-member-of-group'
},
saveNewTask: {
......
......@@ -14,12 +14,22 @@
{{item.name}}
</span>
</span>
<el-select v-model="clientForm[item.key]" placeholder="请选择" v-if="item.key !== 'Filter[sort]'">
<el-select v-model="clientForm[item.key]" placeholder="请选择" v-if="!item.itemKey && item.key !== 'Filter[sort]'">
<el-option v-for="(option, optKey) in item.value"
:key="optKey"
:label="option.name"
:value="option.key"></el-option>
</el-select>
<el-cascader
:ref="'elCasc' + key"
v-model="item.cascader"
:props="props"
clearable
change-on-select
v-if="item.itemKey"
:options="item.value"
@change="setCascader(item, key)"
></el-cascader>
</el-form-item>
</el-col>
</el-form>
......@@ -35,11 +45,28 @@ export default {
data () {
return {
clientForm: {
},
props: {
label: 'name',
value: 'key',
children: 'child'
}
}
},
props: ['filter'],
methods: {
setCascader (item, key) {
if (item.cascader.length === 1) {
this.clientForm[item.key] = item.cascader[0]
this.clientForm[item.itemKey] = ''
} else if (item.cascader.length === 2) {
this.clientForm[item.itemKey] = item.cascader[0]
this.clientForm[item.key] = item.cascader[1]
} else {
this.clientForm[item.itemKey] = ''
this.clientForm[item.key] = ''
}
},
setSortIcon () {
if (this.clientForm['Filter[sort]'] === '') {
return 'fa-sort-amount-desc'
......
......@@ -34,7 +34,8 @@ export default {
title: '',
is_important: '',
target_completed_at: '',
description: ''
description: '',
head_of: ''
}
}
},
......
......@@ -4,8 +4,8 @@
<el-col :span="8" :xs="24" class="obear-schedule-left" :style="{background: item.bgcolor}">
<el-row :gutter="10">
<el-col :span="24">
<el-checkbox v-model="checked" :label="item.id" @change="checkBoxChange(item.id)">
<span class="obear-schedule-left__checkbox">普通</span>
<el-checkbox v-model="checked" :label="item.id" :disabled="!item.can_select" @change="checkBoxChange(item.id)">
<span class="obear-schedule-left__checkbox" :style="{color: is_important_color}">{{ item.is_important_display }}</span>
</el-checkbox>
<span>{{ item.title }}</span>
</el-col>
......@@ -37,7 +37,7 @@
<span class="obear-schedule-right__content">截至日期</span><span>{{ item.target_completed_at }}</span>
</el-col>
<el-col :span="6" :xs="24">
<span class="obear-schedule-right__content">完成时间</span><span>{{ item.target_completed_at }}</span>
<span class="obear-schedule-right__content" v-if="!!item.completed_at">完成时间</span><span v-if="!!item.completed_at">{{ item.completed_at }}</span>
</el-col>
<el-col :span="6" :xs="24">
</el-col>
......@@ -70,6 +70,9 @@ export default {
},
computed: {
is_important_color () {
return !this.item.is_important ? '#4592d2' : '#EB7567'
}
},
mounted () {
......@@ -85,7 +88,6 @@ export default {
}
requestAPI(api.closeTask, { id, type })
.then((res) => {
this.$message.success('操作成功')
this.$parent._reload()
})
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment