diff --git a/data-room-ui/packages/BasicComponents/DateTimePicker/index.vue b/data-room-ui/packages/BasicComponents/DateTimePicker/index.vue new file mode 100644 index 00000000..72ed4a6b --- /dev/null +++ b/data-room-ui/packages/BasicComponents/DateTimePicker/index.vue @@ -0,0 +1,291 @@ + + + + + + + + + diff --git a/data-room-ui/packages/BasicComponents/DateTimePicker/setting.vue b/data-room-ui/packages/BasicComponents/DateTimePicker/setting.vue new file mode 100644 index 00000000..05959523 --- /dev/null +++ b/data-room-ui/packages/BasicComponents/DateTimePicker/setting.vue @@ -0,0 +1,228 @@ + + + + + + + 位置 + + + + 基础 + + + + + + + + + + + + + + + 下拉项 + + + + + + + + + + + + + + + + + + + + + + 时间格式 + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data-room-ui/packages/BasicComponents/DateTimePicker/settingConfig.js b/data-room-ui/packages/BasicComponents/DateTimePicker/settingConfig.js new file mode 100644 index 00000000..c85ec70a --- /dev/null +++ b/data-room-ui/packages/BasicComponents/DateTimePicker/settingConfig.js @@ -0,0 +1,52 @@ + +import { commonConfig, displayOption } from 'data-room-ui/js/config' + +export const settingConfig = { + // text内容 + text: '时间选择器', + // 设置面板属性的显隐 + displayOption: { + ...displayOption, + dataAllocation: { enable: true }, + dataSourceType: { enable: false }, + params: { enable: false } + } +} + +const customConfig = { + type: 'dateTimePicker', + // 名称 + title: '日期时间选择器', + root: { + version: '2023092101' + }, + // 自定义属性 + customize: { + value: '', + // 选择框背景颜色 + backgroundColor: '#35393F', + // 选择框文字颜色 + fontColor: '#FFFFFF', + // 选择框文字大小 + fontSize: 20, + // 下拉框背景颜色 + dropDownBackgroundColor: '#35393F', + // 下拉框字体颜色 + dropDownFontColor: '#FFFFFF', + // 下拉项hover背景颜色 #6A7E9D + dropDownHoverBackgroundColor: 'red', + // 下拉项hover字体颜色 + dropDownHoverFontColor: '#FFFFFF', + // 下拉项激活文字颜色 #409EFF + dropDownSelectedFontColor: 'yellow', + // 显示类型 year/month/date/week/ datetime/datetimerange/daterange + type: 'datetime', + // 时间格式化类型:Date 对象(default),时间戳(timestamp),自定义(custom) + formatType: 'default', + // 绑定值的格式 + valueFormat: '' + } +} +export const dataConfig = { + ...commonConfig(customConfig) +} diff --git a/data-room-ui/packages/BasicComponents/TimePicker/index.vue b/data-room-ui/packages/BasicComponents/TimePicker/index.vue index 523124ee..7760be4c 100644 --- a/data-room-ui/packages/BasicComponents/TimePicker/index.vue +++ b/data-room-ui/packages/BasicComponents/TimePicker/index.vue @@ -4,8 +4,8 @@ :picker-options="config.customize.pickerOptions" placeholder="选择时间" clearable - :class="['basic-component-time-select', `time-picker-${config.code}`]" - :popper-class="'basic-component-time-select time-picker-popper-' + config.code" + :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" @focus="focusEvent" @change="changeValue" @@ -65,13 +65,8 @@ export default { document.querySelector(`.time-picker-${this.config.code}`).style.pointerEvents = 'none' } this.changeStyle(this.config) - EventBus.$on('changeBusinessKey', () => { - window.dataSetFields = [] - }) - }, - beforeDestroy () { - EventBus.$off('changeBusinessKey') }, + beforeDestroy () { }, methods: { dataFormatting (config, data) { // 数据返回成功则赋值 @@ -183,7 +178,7 @@ export default {