|
|
|
@ -4,11 +4,11 @@
|
|
|
|
|
<view class="drop-box"> |
|
|
|
|
<van-dropdown-menu active-color="#17C653"> |
|
|
|
|
<van-dropdown-item |
|
|
|
|
:value="queryParams.status" |
|
|
|
|
:options="getDropdownOption('task_state')" |
|
|
|
|
:value="queryParams.createDeptId" |
|
|
|
|
:options="getDropdownOption('dept')" |
|
|
|
|
@change=" |
|
|
|
|
v => { |
|
|
|
|
querySelect(v, 'status') |
|
|
|
|
querySelect(v, 'createDeptId') |
|
|
|
|
} |
|
|
|
|
" |
|
|
|
|
/> |
|
|
|
@ -135,6 +135,7 @@
|
|
|
|
|
marginBottom="12" |
|
|
|
|
v-if="load !== 'nomore'" |
|
|
|
|
/> |
|
|
|
|
<view style="height: 96rpx; width: 100%" v-else></view> |
|
|
|
|
<cs-emty marginTop="24" v-if="list.length == 0"></cs-emty> |
|
|
|
|
</scroll-view> |
|
|
|
|
</view> |
|
|
|
@ -156,7 +157,7 @@ export default {
|
|
|
|
|
pageNo: 1, |
|
|
|
|
zf_lx: '', |
|
|
|
|
priority: '', |
|
|
|
|
status: '', |
|
|
|
|
createDeptId: '', |
|
|
|
|
select_week: '', |
|
|
|
|
tagList: '' |
|
|
|
|
}, |
|
|
|
@ -201,12 +202,13 @@ export default {
|
|
|
|
|
}) |
|
|
|
|
) |
|
|
|
|
this.load = 'loadmore' |
|
|
|
|
if (this.list.length == res.data.total) { |
|
|
|
|
if (this.list.length >= res.data.total) { |
|
|
|
|
this.load = 'nomore' |
|
|
|
|
} |
|
|
|
|
uni.hideToast() |
|
|
|
|
}, |
|
|
|
|
async getDict() { |
|
|
|
|
const dept = await TaskApi.getDept() |
|
|
|
|
const tags = await getTagData(['zf_lx'].join(',')) |
|
|
|
|
const dict = await getDictBatchByType({ |
|
|
|
|
type: ['select_week', 'task_state', 'task_priority'].join(',') |
|
|
|
@ -217,7 +219,8 @@ export default {
|
|
|
|
|
}) |
|
|
|
|
this.dictMap = { |
|
|
|
|
...tagMap, |
|
|
|
|
...dict.data |
|
|
|
|
...dict.data, |
|
|
|
|
dept: dept.data |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
getDropdownOption(key) { |
|
|
|
@ -225,7 +228,7 @@ export default {
|
|
|
|
|
const keyMap = { |
|
|
|
|
task_priority: '按等级', |
|
|
|
|
zf_lx: '按类型', |
|
|
|
|
task_state: '按发布', |
|
|
|
|
dept: '按发布', |
|
|
|
|
select_week: '按周期' |
|
|
|
|
} |
|
|
|
|
if (['zf_lx'].includes(key)) { |
|
|
|
@ -238,7 +241,8 @@ export default {
|
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
] |
|
|
|
|
} else { |
|
|
|
|
} |
|
|
|
|
if (['dept'].includes(key)) { |
|
|
|
|
return [ |
|
|
|
|
{ value: '', text: keyMap[key] }, |
|
|
|
|
...this.dictMap[key].map(d => { |
|
|
|
@ -249,6 +253,16 @@ export default {
|
|
|
|
|
}) |
|
|
|
|
] |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return [ |
|
|
|
|
{ value: '', text: keyMap[key] }, |
|
|
|
|
...this.dictMap[key].map(d => { |
|
|
|
|
return { |
|
|
|
|
value: d.value, |
|
|
|
|
text: d.label |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
querySelect(v, key) { |
|
|
|
|
this.queryParams[key] = v.detail |
|
|
|
@ -292,7 +306,7 @@ export default {
|
|
|
|
|
pageNo: 1, |
|
|
|
|
zf_lx: '', |
|
|
|
|
priority: '', |
|
|
|
|
status: '', |
|
|
|
|
createDeptId: '', |
|
|
|
|
select_week: '', |
|
|
|
|
tagList: '' |
|
|
|
|
} |
|
|
|
|