bug
This commit is contained in:
@@ -91,7 +91,7 @@
|
|||||||
<div class="coordinate-top"></div>
|
<div class="coordinate-top"></div>
|
||||||
<div class="coordinate-label">{{ item.left }}, {{ item.top }}</div>
|
<div class="coordinate-label">{{ item.left }}, {{ item.top }}</div>
|
||||||
</div>
|
</div>
|
||||||
<ai-dv-render :data="item" :theme="dashboard.theme" :index="index"/>
|
<ai-dv-render :data="item" :theme="dashboard.theme" :index="index" :instance="instance" />
|
||||||
</vue-draggable-resizable>
|
</vue-draggable-resizable>
|
||||||
</div>
|
</div>
|
||||||
</ai-dv-wrapper>
|
</ai-dv-wrapper>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
<div class="layout-config__code" v-if="options.dataType === 'staticData'">
|
<div class="layout-config__code" v-if="options.dataType === 'staticData'">
|
||||||
<el-button @click="showEditor" class="layout-config__code--btn" title="编辑" type="text" icon="iconfont iconjdq_led_edit"></el-button>
|
<el-button @click="showEditor" class="layout-config__code--btn" title="编辑" type="text" icon="iconfont iconjdq_led_edit"></el-button>
|
||||||
<vue-json-editor
|
<vue-json-editor
|
||||||
:value="options.staticData"
|
:value="options.staticData"
|
||||||
:show-btns="false"
|
:show-btns="false"
|
||||||
mode="view"
|
mode="view"
|
||||||
lang="zh">
|
lang="zh">
|
||||||
@@ -206,7 +206,7 @@
|
|||||||
this.options.src = JSON.parse(res.data).url
|
this.options.src = JSON.parse(res.data).url
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
getDataList () {
|
getDataList () {
|
||||||
this.instance.post(`${this.urlPrefix}/appdiylargescreen/allDatasourceByPage`, null, {
|
this.instance.post(`${this.urlPrefix}/appdiylargescreen/allDatasourceByPage`, null, {
|
||||||
@@ -227,7 +227,7 @@
|
|||||||
this.instance.post(this.options.api).then(res => {
|
this.instance.post(this.options.api).then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
if (res.data.length) {
|
if (res.data.length) {
|
||||||
if (this.options.type === 'table') {
|
if (this.options.type === 'table') {
|
||||||
const keys = Object.keys(res.data[0])
|
const keys = Object.keys(res.data[0])
|
||||||
const list = res.data
|
const list = res.data
|
||||||
this.options.apiData = keys.map(v => {
|
this.options.apiData = keys.map(v => {
|
||||||
@@ -259,6 +259,8 @@
|
|||||||
this.keys = Object.keys(res.data[0])
|
this.keys = Object.keys(res.data[0])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
this.options.dynamicData = []
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -312,6 +314,8 @@
|
|||||||
this.list = res.data
|
this.list = res.data
|
||||||
this.keys = Object.keys(res.data[0])
|
this.keys = Object.keys(res.data[0])
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
this.options.dynamicData = []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -157,9 +157,13 @@ export default {
|
|||||||
...obj
|
...obj
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
} else dynamicData = res.data
|
} else {
|
||||||
|
dynamicData = res.data
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.$set(this.componentList[index], item.dataType, dynamicData)
|
this.$set(this.componentList[index], item.dataType, dynamicData)
|
||||||
|
} else {
|
||||||
|
this.$set(this.componentList[index], item.dataType, [])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user