update--form表单配置项

qianming 1 year ago
parent 5b508f51c1
commit 178ae53530

@ -20,16 +20,8 @@ export const widgetFormTime = {
},
{
type: 'vue-color',
label: '字体颜色',
name: 'select_color',
required: false,
placeholder: '',
value: '#FAD400',
},
{
type: 'vue-color',
label: '字体背景',
name: 'select_fontSize',
label: '背景',
name: 'select_background',
required: false,
placeholder: '',
value: 'rgba(115,170,229,.5)',
@ -60,57 +52,7 @@ export const widgetFormTime = {
]
}]
],
data: [
{
type: 'el-radio-group',
label: '数据类型',
name: 'dataType',
require: false,
placeholder: '',
selectValue: true,
selectOptions: [
{
code: 'staticData',
name: '静态数据',
},
{
code: 'dynamicData',
name: '动态数据',
},
],
value: 'staticData',
},
{
type: 'el-input-number',
label: '刷新时间(毫秒)',
name: 'refreshTime',
relactiveDom: 'dataType',
relactiveDomValue: 'dynamicData',
value: 600000
},
{
type: 'el-button',
label: '静态数据',
name: 'staticData',
required: false,
placeholder: '',
relactiveDom: 'dataType',
relactiveDomValue: 'staticData',
value: [],
},
{
type: 'dycustComponents',
label: '',
name: 'dynamicData',
required: false,
placeholder: '',
relactiveDom: 'dataType',
relactiveDomValue: 'dynamicData',
chartType: 'widget-select',
dictKey: 'SELECT_PROPERTIES',
value: '',
},
],
data: [],
position: [
{
type: 'el-input-number',
@ -134,7 +76,7 @@ export const widgetFormTime = {
name: 'width',
required: false,
placeholder: '该容器在1920px大屏中的宽度',
value: 200,
value: 400,
},
{
type: 'el-input-number',

@ -25,7 +25,7 @@ export const widgetInput = {
{
type: 'vue-color',
label: '字体背景',
name: 'select_fontSize',
name: 'select_background',
required: false,
placeholder: '',
value: 'rgba(115,170,229,.5)',

@ -33,7 +33,7 @@ export const widgetSelect = {
{
type: 'vue-color',
label: '字体背景',
name: 'select_fontSize',
name: 'select_background',
required: false,
placeholder: '',
value: 'rgba(115,170,229,.5)',
@ -144,7 +144,7 @@ export const widgetSelect = {
name: 'width',
required: false,
placeholder: '该容器在1920px大屏中的宽度',
value: 100,
value: 200,
},
{
type: 'el-input-number',

@ -91,13 +91,12 @@ export default {
height: this.optionsStyle.height + "px",
left: this.optionsStyle.left + "px",
top: this.optionsStyle.top + "px",
background: this.optionsSetup.select_fontSize,
color: this.optionsSetup.select_color,
background: this.optionsSetup.select_background,
};
},
/* eventChange() {
return this.optionsSetup.event || "change";
},*/
eventChange() {
return "change";
},
allComponentLinkage() {
return this.$store.state.designer.allComponentLinkage;
},
@ -108,7 +107,6 @@ export default {
this.optionsSetup = val.setup;
this.optionsData = val.data;
this.optionsStyle = val.position;
this.setOptions();
},
deep: true,
},
@ -117,13 +115,11 @@ export default {
this.optionsSetup = this.value.setup;
this.optionsData = this.value.data;
this.optionsStyle = this.value.position;
this.setOptions();
targetWidgetLinkageLogic(this); // -
},
methods: {
change(event) {
console.log(event);
const formTimeData = {}
formTimeData['startTime'] = event[0] //startTime
formTimeData['endTime'] = event[1] //endTime
@ -131,36 +127,6 @@ export default {
currentData: formTimeData,
}); // -
},
setOptions() {
const optionsData = this.optionsData;
return optionsData.dataType == "staticData"
? this.staticData(optionsData.staticData)
: this.dynamicDataFn(optionsData.dynamicData, optionsData.refreshTime);
},
staticData(data) {
this.options = data;
},
//
dynamicDataFn(val, refreshTime) {
if (!val) return;
if (this.ispreview) {
this.getEchartData(val);
this.flagInter = setInterval(() => {
this.getEchartData(val);
}, refreshTime);
} else {
this.getEchartData(val);
}
},
getEchartData(val) {
const data = this.queryEchartsData(val);
data.then((res) => {
this.renderingFn(res);
});
},
renderingFn(val) {
this.options = val;
},
},
};
</script>

@ -32,13 +32,13 @@ export default {
height: this.optionsStyle.height + "px",
left: this.optionsStyle.left + "px",
top: this.optionsStyle.top + "px",
background: this.optionsSetup.select_fontSize,
background: this.optionsSetup.select_background,
color: this.optionsSetup.select_color,
};
},
/* eventChange() {
return this.optionsSetup.event || "change";
},*/
eventChange() {
return "change";
},
},
watch: {
value: {

@ -42,13 +42,13 @@ export default {
height: this.optionsStyle.height + "px",
left: this.optionsStyle.left + "px",
top: this.optionsStyle.top + "px",
background: this.optionsSetup.select_fontSize,
background: this.optionsSetup.select_background,
color: this.optionsSetup.select_color,
};
},
/* eventChange() {
return this.optionsSetup.event || "change";
},*/
eventChange() {
return "change";
},
allComponentLinkage() {
return this.$store.state.designer.allComponentLinkage;
},

Loading…
Cancel
Save