diff --git a/src/views/bi/dataset_form.vue b/src/views/bi/dataset_form.vue index fe0d57e6..8ee8eaa4 100644 --- a/src/views/bi/dataset_form.vue +++ b/src/views/bi/dataset_form.vue @@ -31,7 +31,8 @@ - + + @@ -46,7 +47,9 @@ - + diff --git a/src/views/pm/mtask.vue b/src/views/pm/mtask.vue index 2383c8e8..6516c49d 100644 --- a/src/views/pm/mtask.vue +++ b/src/views/pm/mtask.vue @@ -78,6 +78,7 @@ stripe :height="topHeight" :params="paramsUtask7" + @row-click="rowclick" @selection-change="handleSelectionChange" > @@ -139,6 +140,7 @@ stripe :height="topHeight" :params="paramsUtask10" + @row-click="rowclick" @selection-change="handleSelectionChange" > @@ -241,12 +243,12 @@ - + @@ -375,23 +377,22 @@ export default { let endDate = year+'-'+month+'-'+day; this.query.date = [startDate,endDate]; let heights = document.getElementById('topContainer').clientHeight; - console.log('heights',heights) this.topHeight = (heights-45)+'px'; this.bottomHeight = (heights-65)+'px'; }, methods: { // 动态绑定Class bindClass(row){ - let count01 = row.count01; - let count02 = row.count02; - let count03 = row.count03; + let count = row.count; + let countok = row.count_ok; + let countreal = row.count_real; let classInfo = {countBlock:true, redColor: false, greenColor: false, orangeColor:false }; - if(count01+count02=count){ classInfo.greenColor = true; - }else if(count01+count02>count03){ + }else if(countreal>=count){ classInfo.orangeColor = true; + }else{ + classInfo.redColor = true; } return classInfo }, @@ -523,6 +524,24 @@ export default { this.apiObj = this.$API.pm.mtask.list; this.visibleRecord = true; }, + rowclick(val){ + let that = this; + console.log(val); + let utask = val.id; + that.dataList.push(val) + this.$API.pm.mtask.list.req({utask:utask,page:0}).then(res=>{ + res.forEach(item=>{ + console.log(item) + let obj = {}; + obj.data = item.start_date; + obj.count = item.count; + obj.count_ok = item.count_ok; + obj.count_real = item.count_real; + obj.count_notok = item.count_notok; + that.columList.push(obj); + }) + }) + }, }, };