时间筛选器联动

Raod 2 years ago
parent 9d3b3943a3
commit 5f9f09d140

@ -12,6 +12,16 @@ export const lickageParamsConfig = [
// code: 'widgetButtonGroup', // code: 'widgetButtonGroup',
// paramsKey: [] // 40@remarks 动态:[...row, index] // paramsKey: [] // 40@remarks 动态:[...row, index]
// }, // },
{
name: '下拉框',
code: 'widget-select',
paramsKey: ['label','value']
},
{
name: '时间筛选器',
code: 'widget-form-time',
paramsKey: ['startTime','endTime']
},
{ {
name: '柱图', name: '柱图',
code: 'widget-barchart', code: 'widget-barchart',

@ -14,11 +14,20 @@
/> />
</template> </template>
<script> <script>
import {
originWidgetLinkageLogic,
targetWidgetLinkageLogic,
} from "@/views/bigscreenDesigner/designer/linkageLogic";
export default { export default {
name: "WidgetSelect", name: "WidgetFormTime",
props: { props: {
value: Object, value: Object,
ispreview: Boolean, ispreview: Boolean,
widgetIndex: {
type: Number,
default: 0,
},
}, },
data() { data() {
return { return {
@ -43,6 +52,9 @@ export default {
eventChange() { eventChange() {
return this.optionsSetup.event || "change"; return this.optionsSetup.event || "change";
}, },
allComponentLinkage() {
return this.$store.state.designer.allComponentLinkage;
},
}, },
watch: { watch: {
value: { value: {
@ -60,18 +72,18 @@ export default {
this.optionsData = this.value.data; this.optionsData = this.value.data;
this.optionsStyle = this.value.position; this.optionsStyle = this.value.position;
this.setOptions(); this.setOptions();
targetWidgetLinkageLogic(this); // -
}, },
methods: { methods: {
change(event) { change(event) {
console.log(event); console.log(event);
const optionsSetup = this.optionsSetup; const formTimeData = {}
const params = {}; formTimeData['startTime'] = event[0] //startTime
params[optionsSetup.field] = event; formTimeData['endTime'] = event[1] //endTime
params["assChart"] = optionsSetup.assChart; originWidgetLinkageLogic(this, true, {
console.log(event); currentData: formTimeData,
// console.log(params) }); // -
const optionsData = this.optionsData;
console.log(optionsData);
}, },
setOptions() { setOptions() {
const optionsData = this.optionsData; const optionsData = this.optionsData;

Loading…
Cancel
Save