一维表转二维表完成
This commit is contained in:
@@ -54,7 +54,13 @@
|
||||
</div>
|
||||
<div class="layout-config__group" v-else>
|
||||
<h2>基础设置</h2>
|
||||
<datasource-picker :options="options" :instance="instance" @input="v=>$emit('change',v)"/>
|
||||
<datasource-picker :options="options" :instance="instance" @input="$emit('change',options)"/>
|
||||
</div>
|
||||
<div class="layout-config__group" v-if="isTable">
|
||||
<h2>表格设置</h2>
|
||||
<code-editor v-model="json" theme="github" width="100%" height="440"
|
||||
placeholder="参照dvScrollBoard设置表格"
|
||||
@change="v=>options.tableConfig=JSON.parse(v)"/>
|
||||
</div>
|
||||
<div v-if="options.dataType!='staticData'&&options.type=='monitor'&&['cmcc','slw'].includes(options.monitorType)"
|
||||
class="layout-config__group">
|
||||
@@ -154,11 +160,12 @@ export default {
|
||||
list: [],
|
||||
showMapEditor: false,
|
||||
form: {},
|
||||
datasource:{}
|
||||
datasource: {}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
markers: v => v.options.staticData?.markers || [],
|
||||
isTable: v => v.options.type == 'table'
|
||||
},
|
||||
components: {
|
||||
DatasourcePicker,
|
||||
@@ -173,6 +180,8 @@ export default {
|
||||
const values = this.$copy(this.options)
|
||||
values.staticData = {markers: this.$copy(this.options.staticData)}
|
||||
this.$emit("change", values)
|
||||
} else if (this.isTable) {
|
||||
this.json = JSON.stringify(this.options.tableConfig)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
@@ -53,7 +53,6 @@ export default {
|
||||
dataLang: v => v.options.dataType == 'htmlData' ? 'html' : 'json',
|
||||
source: {
|
||||
set(v) {
|
||||
console.log(v)
|
||||
this.$emit("input", v)
|
||||
},
|
||||
get() {
|
||||
|
||||
Reference in New Issue
Block a user