湖里大屏(质量管理):频发问题接口对接

This commit is contained in:
骆乐 2022-08-09 18:29:02 +08:00
parent 0d08300bc6
commit 95fdb21e9e
2 changed files with 28 additions and 0 deletions

View File

@ -303,6 +303,7 @@ export default {
data.selectType = this.dataType2 data.selectType = this.dataType2
} }
selectDangerTypeQualityCountApi(data).then(res => { selectDangerTypeQualityCountApi(data).then(res => {
console.log('-----zhiliang ',res)
var arr = res.result.list var arr = res.result.list
if (opType == 1) { if (opType == 1) {
if (arr.length == 0) { if (arr.length == 0) {

View File

@ -10,6 +10,7 @@
<script> <script>
import JBarChart from '../jChart/bar/JBarChart.vue' import JBarChart from '../jChart/bar/JBarChart.vue'
import { selectDangerTypeQualityCountApi } from '@/assets/js/api/dataBoard'
export default { export default {
components: { JBarChart }, components: { JBarChart },
props: { props: {
@ -23,6 +24,32 @@ export default {
xData: ['地理老师', '地理老师', '地理老师', '地理老师', '地理老师', '地理老师', '地理老师', '地理老师', '地理老师', '地理老师'], xData: ['地理老师', '地理老师', '地理老师', '地理老师', '地理老师', '地理老师', '地理老师', '地理老师', '地理老师', '地理老师'],
yData: [100, 235, 232, 532, 112, 532, 449, 269, 998, 33] yData: [100, 235, 232, 532, 112, 532, 449, 269, 998, 33]
} }
},
mounted(){
this.getData(2);
},
methods:{
getData(opType){
let data = {
projectSn: this.$store.state.projectSn,
opType: opType
}
selectDangerTypeQualityCountApi(data).then(res => {
console.log('-----------',res)
var arr = res.result.list
var xdata = []
var ydata=[]
arr.forEach(item => {
xdata.push(item.dangerName)
ydata.push(item.num)
})
this.xData = xdata
this.yData = ydata
console.log('xdata',this.xData)
console.log('ydata',this.yData)
})
}
} }
} }
</script> </script>