echarts-wordcloud
This commit is contained in:
@@ -86,12 +86,15 @@
|
||||
</section>
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
import {mapState} from "vuex"
|
||||
;
|
||||
import {mapState} from "vuex";
|
||||
import AiDetail from "dui/packages/layout/AiDetail.vue";
|
||||
import AiTitle from "dui/packages/basic/AiTitle.vue";
|
||||
import "echarts-wordcloud";
|
||||
// import * as echarts from 'echarts';
|
||||
// import "echarts-wordcloud";
|
||||
|
||||
|
||||
export default {
|
||||
name: "AppSensitiveStatistics",
|
||||
@@ -143,16 +146,29 @@ export default {
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getDeptList()
|
||||
this.getTotal()
|
||||
this.getStatistics()
|
||||
this.$injectLib("https://cdn.bootcdn.net/ajax/libs/echarts/5.3.3/echarts.min.js", () => {
|
||||
if (window.echarts) {
|
||||
this.$nextTick(() => {
|
||||
this.$injectLib("https://cdn.cunwuyun.cn/wechat/echarts-wordcloud.min.js", () => {
|
||||
this.init()
|
||||
})
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.getDeptList()
|
||||
this.getTotal()
|
||||
this.getStatistics()
|
||||
},
|
||||
getTotal() {
|
||||
var totalDepartmentId = this.totalDeptList.length ? this.totalDeptList[this.totalDeptList.length-1] : ''
|
||||
this.instance.post(`/app/appsessionarchivekeywordrecord/statistics1?deptFullId=${totalDepartmentId}`).then(res => {
|
||||
if (res?.data) {
|
||||
console.log(res)
|
||||
this.totalInfo = res.data
|
||||
}
|
||||
})
|
||||
@@ -191,7 +207,6 @@ export default {
|
||||
this.barChartInit(barX, this.barData)
|
||||
})
|
||||
}
|
||||
|
||||
this.info.wordNames.map((item) => {
|
||||
var i = { name: item.wordName, value: item.wordCount };
|
||||
this.wordData.push(i);
|
||||
@@ -213,6 +228,7 @@ export default {
|
||||
},
|
||||
trendChartInit(xData, yData) {
|
||||
this.trendChart = echarts.init(document.getElementById('trendChart'))
|
||||
|
||||
let option = {
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
@@ -289,7 +305,7 @@ export default {
|
||||
this.barChart.setOption(option)
|
||||
},
|
||||
wordChartInit(data) {
|
||||
this.wordChart = echarts.init(document.getElementById('wordChart'))
|
||||
this.wordChart = window.echarts.init(document.getElementById('wordChart'))
|
||||
var option = {
|
||||
series: [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user