diff --git a/data-room-ui/packages/BasicComponents/DateTimePicker/index.vue b/data-room-ui/packages/BasicComponents/DateTimePicker/index.vue
index cd43e446..5350515d 100644
--- a/data-room-ui/packages/BasicComponents/DateTimePicker/index.vue
+++ b/data-room-ui/packages/BasicComponents/DateTimePicker/index.vue
@@ -1,13 +1,14 @@
diff --git a/data-room-ui/packages/BasicComponents/DateTimePicker/settingConfig.js b/data-room-ui/packages/BasicComponents/DateTimePicker/settingConfig.js
index fc580d74..e74e3c84 100644
--- a/data-room-ui/packages/BasicComponents/DateTimePicker/settingConfig.js
+++ b/data-room-ui/packages/BasicComponents/DateTimePicker/settingConfig.js
@@ -22,15 +22,14 @@ const customConfig = {
},
// 自定义属性
customize: {
- value: '',
// 选择框背景颜色
bgColor: '#35393F',
// 选择框文字颜色
fontColor: '#FFFFFF',
// 选择框文字大小
fontSize: 20,
- // 显示类型 year/month/date/week/ datetime/datetimerange/daterange
- type: 'datetime',
+ // 显示类型 year/month/date/ datetime/datetimerange/daterange
+ type: 'datetimerange',
// 时间格式化类型:时间戳(timestamp),自定义(custom)
formatType: 'custom',
// 绑定值的格式
diff --git a/data-room-ui/packages/BasicComponents/TimePicker/index.vue b/data-room-ui/packages/BasicComponents/TimePicker/index.vue
index 9fac689d..0a3024d8 100644
--- a/data-room-ui/packages/BasicComponents/TimePicker/index.vue
+++ b/data-room-ui/packages/BasicComponents/TimePicker/index.vue
@@ -7,6 +7,7 @@
:class="['basic-component-time-picker', `time-picker-${config.code}`]"
:popper-class="'basic-component-time-picker time-picker-popper-' + config.code"
:value-format="config.customize.valueFormat"
+ :default-value="config.customize.value"
@focus="focusEvent"
@change="changeValue"
@mouseenter.native="mouseenter"
@@ -47,32 +48,16 @@ export default {
return (this.$route.path === window?.BS_CONFIG?.routers?.previewUrl) || (this.$route.path === '/big-screen/preview')
}
},
- watch: {
- config: {
- handler: function (val) {
- if (val && val.customize && val.customize.formatType === 'custom') {
- this.$nextTick(() => {
- this.config.customize.value = toString(this.config.customize.value)
- })
- }
- },
- deep: true
- }
- },
+ watch: { },
created () { },
mounted () {
if (!this.isPreview) {
- // document.querySelector(`.time-picker-${this.config.code}`).style.pointerEvents = 'none'
+ document.querySelector(`.time-picker-${this.config.code}`).style.pointerEvents = 'none'
+ }
+ if (this.config.customize.value === '') {
+ this.config.customize.value = moment(new Date()).format(this.config.customize.valueFormat)
}
this.changeStyle(this.config)
- // 将config.customize.value设置值为当前时间 :HH:mm:ss
- // if (this.config.customize.value === '') {
- // this.config.customize.valueFormat = 'HH:mm:ss'
- // this.$nextTick(() => {
- // this.config.customize.value = moment(new Date()).format('HH:mm:ss')
- // console.log(this.config.customize.value)
- // })
- // }
},
beforeDestroy () { },
methods: {
@@ -130,6 +115,7 @@ export default {
},
// 组件联动
changeValue (val) {
+ console.log('val', val)
this.linkage({ [this.config.code]: val })
},
focusEvent () {
diff --git a/data-room-ui/packages/BasicComponents/TimePicker/setting.vue b/data-room-ui/packages/BasicComponents/TimePicker/setting.vue
index 44937fc6..81b9fab0 100644
--- a/data-room-ui/packages/BasicComponents/TimePicker/setting.vue
+++ b/data-room-ui/packages/BasicComponents/TimePicker/setting.vue
@@ -184,6 +184,7 @@ export default {
this.config.customize.valueFormat = 'timestamp'
} else if (type === 'custom') {
this.config.customize.valueFormat = 'HH:mm:ss'
+ this.config.customize.value = ''
}
}
}
diff --git a/data-room-ui/packages/BizComponent/index.vue b/data-room-ui/packages/BizComponent/index.vue
index 27b3820d..87eedb4f 100644
--- a/data-room-ui/packages/BizComponent/index.vue
+++ b/data-room-ui/packages/BizComponent/index.vue
@@ -140,7 +140,7 @@