Browse Source

feat(home): 更新个人绩效评分提醒接口参数

- 添加selectType参数值为3
- 添加createBy参数用于筛选创建者
- 添加statusList参数支持动态状态筛选
- 当searchData中存在statusList时使用其值否则使用默认状态列表
- 优化数据赋值逻辑使用逻辑或运算符替代三元运算符
master
qiankanghui 2 weeks ago
parent
commit
617a3e7d24
  1. 23
      src/views/common/home.vue

23
src/views/common/home.vue

@ -111,11 +111,24 @@ export default {
loadMyPerformanceScoreReminder () { loadMyPerformanceScoreReminder () {
const site = this.$store.state.user.site const site = this.$store.state.user.site
const username = this.$store.state.user.name const username = this.$store.state.user.name
myPerformanceScoreReminder({ site, username }).then(({ data }) => {
if (data && data.code === 0 && data.data) {
this.myPerformanceScoreCount = data.data.count != null ? data.data.count : 0
}
}).catch(() => {})
const params = {
site,
username,
selectType: 3,
createBy: username,
statusList: (this.searchData && this.searchData.statusList && this.searchData.statusList.length > 0)
? this.searchData.statusList
: ['未开始', '进行中', '已完成']
}
myPerformanceScoreReminder(params)
.then(({ data }) => {
if (data && data.code === 0 && data.data) {
this.myPerformanceScoreCount = data.data.count || 0
}
})
.catch(() => {})
}, },
goMyPerformanceScoreList () { goMyPerformanceScoreList () {
if (!this.myPerformanceScoreCount) return if (!this.myPerformanceScoreCount) return

Loading…
Cancel
Save