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

修复项目清单相关

parent 6978a0e9
...@@ -8,7 +8,8 @@ export default { ...@@ -8,7 +8,8 @@ export default {
}, },
getMembersById: { getMembersById: {
url: '/vue/task/get-member-of-task' // url: '/vue/task/get-member-of-task'
url: '/vue/task/get-member-of-group'
}, },
saveNewTask: { saveNewTask: {
......
...@@ -14,12 +14,22 @@ ...@@ -14,12 +14,22 @@
{{item.name}} {{item.name}}
</span> </span>
</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" <el-option v-for="(option, optKey) in item.value"
:key="optKey" :key="optKey"
:label="option.name" :label="option.name"
:value="option.key"></el-option> :value="option.key"></el-option>
</el-select> </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-form-item>
</el-col> </el-col>
</el-form> </el-form>
...@@ -35,11 +45,28 @@ export default { ...@@ -35,11 +45,28 @@ export default {
data () { data () {
return { return {
clientForm: { clientForm: {
},
props: {
label: 'name',
value: 'key',
children: 'child'
} }
} }
}, },
props: ['filter'], props: ['filter'],
methods: { 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 () { setSortIcon () {
if (this.clientForm['Filter[sort]'] === '') { if (this.clientForm['Filter[sort]'] === '') {
return 'fa-sort-amount-desc' return 'fa-sort-amount-desc'
......
...@@ -34,7 +34,8 @@ export default { ...@@ -34,7 +34,8 @@ export default {
title: '', title: '',
is_important: '', is_important: '',
target_completed_at: '', target_completed_at: '',
description: '' description: '',
head_of: ''
} }
} }
}, },
......
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
<el-col :span="8" :xs="24" class="obear-schedule-left" :style="{background: item.bgcolor}"> <el-col :span="8" :xs="24" class="obear-schedule-left" :style="{background: item.bgcolor}">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="24"> <el-col :span="24">
<el-checkbox v-model="checked" :label="item.id" @change="checkBoxChange(item.id)"> <el-checkbox v-model="checked" :label="item.id" :disabled="!item.can_select" @change="checkBoxChange(item.id)">
<span class="obear-schedule-left__checkbox">普通</span> <span class="obear-schedule-left__checkbox" :style="{color: is_important_color}">{{ item.is_important_display }}</span>
</el-checkbox> </el-checkbox>
<span>{{ item.title }}</span> <span>{{ item.title }}</span>
</el-col> </el-col>
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<span class="obear-schedule-right__content">截至日期</span><span>{{ item.target_completed_at }}</span> <span class="obear-schedule-right__content">截至日期</span><span>{{ item.target_completed_at }}</span>
</el-col> </el-col>
<el-col :span="6" :xs="24"> <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>
<el-col :span="6" :xs="24"> <el-col :span="6" :xs="24">
</el-col> </el-col>
...@@ -70,6 +70,9 @@ export default { ...@@ -70,6 +70,9 @@ export default {
}, },
computed: { computed: {
is_important_color () {
return !this.item.is_important ? '#4592d2' : '#EB7567'
}
}, },
mounted () { mounted () {
...@@ -85,7 +88,6 @@ export default { ...@@ -85,7 +88,6 @@ export default {
} }
requestAPI(api.closeTask, { id, type }) requestAPI(api.closeTask, { id, type })
.then((res) => { .then((res) => {
this.$message.success('操作成功')
this.$parent._reload() 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