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

68 lines
1.9 KiB
Vue
Raw Normal View History

2024-11-13 09:42:42 +08:00
<template>
2024-11-15 16:40:47 +08:00
<view>
<view v-if="tableData.length != 0">
<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>
<view
style="height:calc(100vh - 160px);display: flex;align-items: center;justify-content: center;background-color: #fff;margin-top:10px"
v-else>
<image src="../../../../static/empty.png" mode=""></image>
</view>
2024-11-13 09:42:42 +08:00
</view>
2024-11-15 16:40:47 +08:00
2024-11-13 09:42:42 +08:00
</template>
<script>
2024-11-15 16:40:47 +08:00
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(
"/gunshiApp/tsg/stZvarlB/list", {
stcd: "716164061"
})
if (data.code == 200) {
this.tableData = [...data.data];
}
} catch (error) {
uni.$showMsg();
}
2024-11-13 09:42:42 +08:00
}
2024-11-15 16:40:47 +08:00
},
watch: {
tableData(n, o) {
if (n.length > 0) {
this.chartData = {
...drpOptions(n)
}
this.show = true
}
2024-11-13 09:42:42 +08:00
}
2024-11-15 16:40:47 +08:00
},
mounted() {
this.getKrData()
},
}
2024-11-13 09:42:42 +08:00
</script>
<style lang="scss">
2024-11-15 16:40:47 +08:00
2024-11-13 09:42:42 +08:00
</style>