时间筛选器联动

Raod 1 year ago
parent 9d3b3943a3
commit 5f9f09d140

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

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

Loading…
Cancel
Save