解决大屏拖拽卡顿的问题

This commit is contained in:
aixianling
2022-11-09 14:40:36 +08:00
parent 8e7a8488b3
commit d39f1d793b
2 changed files with 22 additions and 30 deletions

View File

@@ -122,14 +122,13 @@
import 'bin-code-editor/lib/styles/index.css'
export default {
name: 'dataCofing',
name: 'dataConfig',
props: {
options: Object,
instance: Function,
dict: Object,
params: Object,
urlPrefix: String
},
data () {
@@ -168,7 +167,7 @@
this.getDataList()
if ((this.options.dataY && this.options.dataY.length && this.options.dataX) || this.options.type === 'monitor') {
const api = this.options.dataType === 'apiData' ? this.options.api : `${this.urlPrefix}/appdiylargescreen/statisticsByLsid?id=${this.options.sourceDataId}`
const api = this.options.dataType === 'apiData' ? this.options.api : `/app/appdiylargescreen/statisticsByLsid?id=${this.options.sourceDataId}`
this.instance.post(api).then(res => {
if (res.code == 0) {
if (res.data.length && this.options.type !== 'monitor') {
@@ -201,7 +200,7 @@
},
onMoniterId (e) {
this.instance.post(`${this.urlPrefix}/appzyvideoequipment/getWebSdkUrl?deviceId=${e}`).then(res => {
this.instance.post(`/app/appzyvideoequipment/getWebSdkUrl?deviceId=${e}`).then(res => {
if (res.code == 0) {
this.options.src = JSON.parse(res.data).url
}
@@ -209,7 +208,7 @@
},
getDataList () {
this.instance.post(`${this.urlPrefix}/appdiylargescreen/allDatasourceByPage`, null, {
this.instance.post(`/app/appdiylargescreen/allDatasourceByPage`, null, {
params: {
current: 1,
size: 10000
@@ -286,7 +285,7 @@
onDataChange (e) {
this.options.dataX = ''
this.options.dataY = []
this.instance.post(`${this.urlPrefix}/appdiylargescreen/statisticsByLsid?id=${e}`).then(res => {
this.instance.post(`/app/appdiylargescreen/statisticsByLsid?id=${e}`).then(res => {
if (res.code == 0) {
if (res.data.length) {
if (this.options.type === 'table') {