qianlishi 3 years ago
parent b31e629c6b
commit ce6efacbbb

@ -108,6 +108,7 @@ export default {
// widget-piechart 饼图、widget-hollow-piechart 空心饼图、widget-funnel 漏斗图
// widget-gauge 仪表盘
// widget-text 文本框
// widge-table 表格(数据不要转)
const chartType = params.chartType
if (
chartType == "widget-barchart" ||
@ -126,7 +127,7 @@ export default {
} else if (chartType == "widget-text") {
return this.widgettext(params.chartProperties, data)
} else {
return data
}
},
// 柱状图、折线图、折柱图

@ -150,6 +150,7 @@
<dynamic-add-table
v-if="item.type == 'dynamic-add-table' && inputShow[item.name]"
v-model="formData[item.name]"
:chart-type="item.chartType"
@change="changed($event, item.name)"
/>
</div>

@ -1105,7 +1105,7 @@ const widgetTools = [
placeholder: 'px',
relactiveDom: 'dataType',
relactiveDomValue: 'dynamicData',
chartType: 'widget-barchart',
chartType: 'widget-table',
value: '',
},
],

@ -129,13 +129,29 @@ export default {
console.log(tableData);
tableData.dataType == "staticData"
? this.handlerStaticData(tableData.staticData)
: this.handlerDymaicData();
: this.handlerDymaicData(tableData.dynamicData, tableData.refreshTime);
},
handlerStaticData(data) {
console.log(data);
this.list = data;
},
handlerDymaicData() {},
handlerDymaicData(data, refreshTime) {
if (!data) return;
if (this.ispreview) {
this.getEchartData(data);
this.flagInter = setInterval(() => {
this.getEchartData(data);
}, refreshTime);
} else {
this.getEchartData(data);
}
},
getEchartData(val) {
const data = this.queryEchartsData(val);
data.then(res => {
this.list = res;
});
},
// vue hack
hackResetFun() {
this.hackReset = false;
@ -174,6 +190,9 @@ export default {
line-height: 50px;
width: 100%;
}
.txtScroll-top .bd {
width: 100%;
}
.txtScroll-top .infoList li {
height: 50px;
line-height: 50px;

Loading…
Cancel
Save