tsg-app/pages/skInfo/detail/krqx/index.vue

58 lines
1.2 KiB
Vue
Raw Normal View History

2024-11-13 09:42:42 +08:00
<template>
<view>
<view style="height: 250px; ">
<qiun-data-charts :chartData="chartData.chartData" :echartsApp="true" :eopts="chartData.eopts" />
</view>
<view style="margin-top: 20px;">
<Table :tableData="tableData"/>
</view>
</view>
</template>
<script>
import drpOptions from "./chartOptions.js"
import Table from "./jcsjTable.vue"
export default {
components:{
Table
},
data() {
return {
show:false,
chartData:{},
tableData:[]
}
},
methods: {
async getKrData(){
try {
const {data} = await uni.$http.post(
2024-11-15 10:03:41 +08:00
"/gunshiApp/tsg/stZvarlB/list",{
stcd:"716164061"
})
2024-11-13 09:42:42 +08:00
if(data.code == 200){
this.tableData = [...data.data];
}
} catch (error) {
uni.$showMsg();
}
}
},
watch:{
tableData(n,o){
if(n.length > 0){
this.chartData = {...drpOptions(n)}
this.show=true
}
}
},
mounted() {
this.getKrData()
},
}
</script>
<style lang="scss">
</style>