提交 1d707bd6 编写于 作者: zhentian.jia's avatar zhentian.jia

排行榜展示问题

上级 24658176
...@@ -8,9 +8,9 @@ export const envConfig = { ...@@ -8,9 +8,9 @@ export const envConfig = {
// baseUrl: 'https://test1-sc.yunqueyi.com/', // baseUrl: 'https://test1-sc.yunqueyi.com/',
// baseUrl: 'https://uat-sc.yunqueyi.com/', // baseUrl: 'https://uat-sc.yunqueyi.com/',
// baseUrl: 'http://10.177.15.150:10401/', baseUrl: 'http://10.177.15.150:10401/',
// baseUrl: 'http://10.177.15.150:11905/', // baseUrl: 'http://10.177.15.150:11905/',
baseUrl: 'https://dev-sc.yunqueyi.com/', // baseUrl: 'https://dev-sc.yunqueyi.com/',
apiUrl: 'https://dev-api.yunqueyi.com/', apiUrl: 'https://dev-api.yunqueyi.com/',
qiniuFileUrl: "https://dev-sc.yunqueyi.com/contents/admin/qiniu/token1", qiniuFileUrl: "https://dev-sc.yunqueyi.com/contents/admin/qiniu/token1",
qiniuResourceUrl: "https://test1-videos.yunqueyi.com", qiniuResourceUrl: "https://test1-videos.yunqueyi.com",
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
<div class="component-content screenSet" id="screenSet"> <div class="component-content screenSet" id="screenSet">
<el-form ref="formInline" :model="formInline" label-width="80px" style="width:50%"> <el-form ref="formInline" :model="formInline" label-width="80px" style="width:50%">
<el-form-item label="选择地区:"> <el-form-item label="选择地区:">
<!-- :props="props" -->
<el-cascader <el-cascader
size="small" size="small"
ref="cascaderRegion" ref="cascaderRegion"
...@@ -12,7 +13,7 @@ ...@@ -12,7 +13,7 @@
@change="handleChange" @change="handleChange"
filterable filterable
change-on-select change-on-select
:props="props"
style="width:330px" style="width:330px"
></el-cascader> ></el-cascader>
</el-form-item> </el-form-item>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</el-card> </el-card>
<div class="line"></div> <div class="line"></div>
</div> </div>
<div class="charts" id="rankChart" ref="rankChart"></div> <div v-if="showChart" class="charts" id="rankChart" ref="rankChart"></div>
<!-- <div class="charts" id="age" ref="age"></div> --> <!-- <div class="charts" id="age" ref="age"></div> -->
<el-table <el-table
v-show="organizationNum < 2" v-show="organizationNum < 2"
...@@ -41,6 +41,7 @@ import { openLoading, closeLoading } from "../../utils/utils"; ...@@ -41,6 +41,7 @@ import { openLoading, closeLoading } from "../../utils/utils";
import * as commonUtil from "../../utils/utils"; import * as commonUtil from "../../utils/utils";
import * as operationData from "../../utils/operation"; import * as operationData from "../../utils/operation";
import echarts from "echarts"; import echarts from "echarts";
import { setTimeout } from "timers";
let vm = null; let vm = null;
export default { export default {
props: { props: {
...@@ -55,7 +56,7 @@ export default { ...@@ -55,7 +56,7 @@ export default {
}, },
organizationList: { organizationList: {
type: Array type: Array
}, }
}, },
data() { data() {
return { return {
...@@ -94,7 +95,7 @@ export default { ...@@ -94,7 +95,7 @@ export default {
unit: "" unit: ""
} }
], ],
showChart: true, showChart: false,
showTable: false showTable: false
}; };
}, },
...@@ -117,17 +118,17 @@ export default { ...@@ -117,17 +118,17 @@ export default {
}, },
methods: { methods: {
search() { search() {
if(vm.formInline.region.length == 0) { if (vm.formInline.region.length == 0) {
vm.$message('请选择地区'); vm.$message("请选择地区");
return; return;
} }
let req = { let req = {
projectId: vm.projectId, projectId: vm.projectId,
ids: operationData.getIds(vm.formInline), ids: operationData.getIds(vm.formInline),
type: operationData.getSearchType(vm.formInline), type: operationData.getSearchType(vm.formInline),
OriginalFlag: vm.formInline.checked == false? 0 : 1, OriginalFlag: vm.formInline.checked == false ? 0 : 1
}; };
console.log('1 req',req); console.log("1 req", req);
openLoading(vm); openLoading(vm);
vm.GET("report/portal/getParticipateInfo", req).then(res => { vm.GET("report/portal/getParticipateInfo", req).then(res => {
closeLoading(vm); closeLoading(vm);
...@@ -158,15 +159,20 @@ export default { ...@@ -158,15 +159,20 @@ export default {
]; ];
}, },
getRank(data) { getRank(data) {
let myChart = echarts.init(this.$refs.rankChart);
let xAxisData = []; let xAxisData = [];
let seriesData = []; let seriesData = [];
for (let i = 0; i < data.top.length; i++) { for (let i = 0; i < data.top.length; i++) {
xAxisData[i] = data.top[i].name; xAxisData[i] = data.top[i].name;
seriesData[i] = data.top[i].value; seriesData[i] = data.top[i].value;
} }
let optionValue = operationData.getRank(xAxisData, seriesData); if (xAxisData.length > 0) {
myChart.setOption(optionValue); vm.showChart = true;
setTimeout(function() {
let myChart = echarts.init(vm.$refs.rankChart);
let optionValue = operationData.getRank(xAxisData, seriesData);
myChart.setOption(optionValue);
}, 200);
}
}, },
getCardData(data) { getCardData(data) {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册