|
|
@@ -10,13 +10,15 @@ export default {
|
|
|
data () {
|
|
|
return {
|
|
|
cdata: {
|
|
|
- indicatorData: [
|
|
|
+ indicatorData :[],
|
|
|
+ dataRadius : []
|
|
|
+ /* indicatorData: [
|
|
|
{ name: "插件", max: 300 },
|
|
|
{ name: "组装", max: 250 },
|
|
|
{ name: "老化", max: 300 },
|
|
|
{ name: "包装", max: 5},
|
|
|
],
|
|
|
- dataBJ: [
|
|
|
+ dataRadius: [
|
|
|
[94, 69, 114, 2.08, 73, 39, 22],
|
|
|
[99, 73, 110, 2.43, 76, 48, 23],
|
|
|
[31, 12, 30, 0.5, 32, 16, 24],
|
|
|
@@ -42,12 +44,52 @@ export default {
|
|
|
[106, 77, 114, 1.07, 55, 51, 5],
|
|
|
[109, 81, 121, 1.28, 68, 51, 6],
|
|
|
[106, 77, 114, 1.07, 55, 51, 7]
|
|
|
- ]
|
|
|
+ ]*/
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
|
Chart,
|
|
|
+ },
|
|
|
+ mounted () {
|
|
|
+ this.drawTimingFn();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ drawTimingFn () {
|
|
|
+ this.setData();
|
|
|
+ setInterval(() => {
|
|
|
+ this.setData(); //获取-数据
|
|
|
+ }, 30000);
|
|
|
+ },
|
|
|
+ async setData () {
|
|
|
+ // 清空轮询数据
|
|
|
+ this.cdata.indicatorData = [];
|
|
|
+ this.cdata.dataRadius = [];
|
|
|
+
|
|
|
+ let dateBase = new Date();
|
|
|
+ this.cdata.year = dateBase.getFullYear();
|
|
|
+ // //雷达图:
|
|
|
+ await this.$http.get("kanban/datalist.action?caller=STEPOKRATE&_noc=1&page=1&pageSize=100&condition=1=1")
|
|
|
+ .then((result)=>{
|
|
|
+ let dataList = JSON.parse(result.data.data);
|
|
|
+ let indicatorData = new Array();
|
|
|
+ let radiusData = new Array();
|
|
|
+ for (let index = 0; index < dataList.length; index++) {
|
|
|
+ const element = dataList[index];
|
|
|
+ let obj = new Object();
|
|
|
+ obj.name = element.name;
|
|
|
+ obj.max = 100;
|
|
|
+ indicatorData.push(obj);
|
|
|
+ //数据
|
|
|
+ radiusData.push(element.value);
|
|
|
+ }
|
|
|
+ this.cdata.indicatorData = indicatorData;
|
|
|
+ this.cdata.dataRadius.push(radiusData);
|
|
|
+ },(result)=>{
|
|
|
+ console.error(result)
|
|
|
+ }
|
|
|
+ );
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|