大屏组件开发
This commit is contained in:
@@ -224,7 +224,7 @@ export default {
|
||||
this.instance.post(this.options.api).then(res => {
|
||||
if (res.code == 0) {
|
||||
if (res.data.length) {
|
||||
if (this.options.type === 'table') {
|
||||
if (this.options.type === 'table' || this.options.type === 'AiDvTable') {
|
||||
const keys = Object.keys(res.data[0])
|
||||
const list = res.data
|
||||
this.options.apiData = keys.map(v => {
|
||||
@@ -286,7 +286,7 @@ export default {
|
||||
this.instance.post(`/app/appdiylargescreen/statisticsByLsid?id=${e}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
if (res.data.length) {
|
||||
if (this.options.type === 'table') {
|
||||
if (this.options.type === 'table' || this.options.type === 'AiDvTable') {
|
||||
const keys = Object.keys(res.data[0])
|
||||
const list = res.data
|
||||
this.options.dynamicData = keys.map(v => {
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<template v-if="config.type === 'table'">
|
||||
<template v-if="config.type === 'table' || config.type === 'AiDvTable'">
|
||||
<div class="layout-config__item">
|
||||
<label>显示排名</label>
|
||||
<div class="layout-config__item--right">
|
||||
@@ -166,8 +166,8 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
borderList: ['border0', 'border1', 'border2', 'border3', 'border4', 'border5'],//边框待选项
|
||||
summaryList: ['summary0', 'summary1', 'summary2', 'summary3', 'summary4', 'summary6', 'summary5', 'summary7', 'summary8', 'summary9', 'summary10', 'summary11'],//汇总待选项
|
||||
borderList: ['border0', 'border1', 'border2', 'border3', 'border4', 'border5', 'border6'],//边框待选项
|
||||
summaryList: ['summary0', 'summary1', 'summary2', 'summary3', 'summary4', 'summary6', 'summary5', 'summary7', 'summary8', 'summary9', 'summary10', 'summary11', 'summary12'],//汇总待选项
|
||||
//是否显示排名
|
||||
tableStatus: [
|
||||
{label: '是', value: '1'},
|
||||
|
||||
@@ -488,6 +488,30 @@ const components = [
|
||||
{name: '列2', v: 12, v2: 4},
|
||||
{name: '列2', v: 12, v2: 4}
|
||||
]
|
||||
},
|
||||
{
|
||||
type: 'AiDvTable',
|
||||
label: '新版表格',
|
||||
title: '新版表格',
|
||||
border: 'border6',
|
||||
width: 650,
|
||||
height: 400,
|
||||
zIndex: 1,
|
||||
thumb: 'https://cdn.cunwuyun.cn/dvcp/dv/tpl/table.png',
|
||||
dataX: '',
|
||||
dataY: [],
|
||||
rowNum: 7,
|
||||
isShowIndex: '1',
|
||||
sourceDataId: '',
|
||||
api: '',
|
||||
apiData: [],
|
||||
dataType: 'staticData',
|
||||
dynamicData: [],
|
||||
staticData: [
|
||||
{name: '列1', v: 23, v2: 3},
|
||||
{name: '列2', v: 12, v2: 4},
|
||||
{name: '列2', v: 12, v2: 4}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user