瀏覽代碼

Merge branch 'zdsz3.0' of http://192.168.10.18:3000/wangtong/zd_wechatApp into zdsz3.0

menchuang 1 年之前
父節點
當前提交
591a1858ae

+ 1 - 1
App.vue

@@ -30,5 +30,5 @@
 </script>
 
 <style lang="scss">
-  @import '@/static/scss/index.scss'
+  @import '@/static/scss/index.scss';
 </style>

+ 19 - 0
components/dengrq-datetime-picker/customPickerView/index.css

@@ -0,0 +1,19 @@
+.picker-view {
+  height: 356rpx;
+}
+
+.picker-view-column {
+  font-size: 14px;
+  line-height: 34px;
+  text-align: center;
+  color: #333;
+}
+
+/* 覆盖默认样式,样式可以按需自己改 */
+.uni-picker-view-indicator {
+  background-color: rgba(106, 123, 255, 0.1);
+}
+.uni-picker-view-indicator::before,
+.uni-picker-view-indicator::after {
+  content: none;
+}

+ 53 - 0
components/dengrq-datetime-picker/customPickerView/index.js

@@ -0,0 +1,53 @@
+export default {
+  data() {
+    return {};
+  },
+  props: {
+    // 所有列选项数据
+    columns: {
+      type: Array,
+      default: () => []
+    },
+    // 每一列默认选中值数组,不传默认选中第一项
+    selectVals: {
+      type: Array,
+      default: () => []
+    }
+  },
+  computed: {
+    // 每一列选中项的索引,当默认选中值变化的时候这个值也要变化
+    indexArr: {
+      // 多维数组,深度监听
+      cache: false,
+      get() {
+        if (this.selectVals.length > 0) {
+          return this.columns.map((col, cIdx) => {
+            return col.findIndex((i) => i == this.selectVals[cIdx]);
+          });
+        } else {
+          return [].fill(0, 0, this.columns.length);
+        }
+      }
+    }
+  },
+  methods: {
+    onChange(e) {
+      const { value } = e.detail;
+
+      let ret = this.columns.map((item, index) => {
+        let idx = value[index];
+        if (idx < 0) {
+          idx = 0;
+        }
+        if (idx > item.length - 1) {
+          idx = item.length - 1;
+        }
+        return item[idx];
+      });
+
+      this.$emit('onChange', {
+        value: ret
+      });
+    }
+  }
+};

+ 11 - 0
components/dengrq-datetime-picker/customPickerView/index.vue

@@ -0,0 +1,11 @@
+<template>
+  <picker-view class="picker-view" :value="indexArr" @change="onChange">
+    <picker-view-column class="picker-view-column" v-for="(col, colIdx) in columns" :key="colIdx">
+      <view v-for="(item, idx) in col" :key="idx">{{ item }}</view>
+    </picker-view-column>
+  </picker-view>
+</template>
+
+<script src="./index.js"></script>
+
+<style lang="css" scoped src="./index.css"></style>

+ 57 - 0
components/dengrq-datetime-picker/dateSelector/index.css

@@ -0,0 +1,57 @@
+.date-selector {
+  width: 100%;
+  font-size: 12px;
+  color: #333;
+}
+
+.select-date-wrapper {
+  margin-bottom: 8px;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+
+.select-date {
+  padding: 10px;
+  flex: 1;
+  border-radius: 2px;
+  border: 1px solid rgba(6, 7, 46, 0.05);
+  font-size: 12px;
+}
+
+.select-date.active {
+  border-color: #6a7bff;
+}
+
+.select-date-placeholder {
+  color: rgba(6, 7, 46, 0.3);
+}
+
+.btn-group {
+  display: flex;
+  margin: 48rpx 0;
+  justify-content: space-between;
+}
+
+.btn-confirm {
+  width: 180px;
+  height: 40px;
+  line-height: 40px;
+  background: rgba(33, 58, 255, 0.85);
+  border-radius: 4px;
+  font-size: 14px;
+  color: #fff;
+  text-align: center;
+}
+
+.btn-cancel {
+  width: 144px;
+  height: 40px;
+  line-height: 38px;
+  text-align: center;
+  background: #fff;
+  border-radius: 4px;
+  border: 1px solid #979797;
+  font-size: 14px;
+  color: #06072e;
+}

+ 209 - 0
components/dengrq-datetime-picker/dateSelector/index.js

@@ -0,0 +1,209 @@
+import DateTimePicker from '../dateTimePicker/index.vue';
+import DateUtil from '../dateTimePicker/dateUtil';
+import { DATE_TYPES } from '../dateTimePicker/constant';
+
+export default {
+  components: {
+    DateTimePicker
+  },
+  data() {
+    return {
+      showStartDatePicker: false,
+      showEndDatePicker: false,
+      startDate: '',
+      endDate: '',
+      activeDate: 'startDate' // 正在处理哪一个日期值,startDate/endDate
+    };
+  },
+  props: {
+    // 日期筛选模式,1:年月日(默认),2:年月,3:年,4:年月日时分秒,5:时分秒,6:时分
+    mode: {
+      type: Number,
+      default: DATE_TYPES.YMD
+    },
+    // 默认开始日期
+    defaultStartDate: {
+      type: String,
+      default: ''
+    },
+    // 默认结束日期
+    defaultEndDate: {
+      type: String,
+      default: ''
+    },
+    // 可选的最小日期
+    minDate: {
+      type: String,
+      default: ''
+    },
+    // 可选的最大日期
+    maxDate: {
+      type: String,
+      default: ''
+    }
+  },
+  watch: {
+    mode() {
+      // 筛选模式更换时清空一下数据
+      this.resetData();
+    },
+    startDate() {
+      this.$emit('onChange', {
+        startDate: this.startDate,
+        endDate: this.endDate
+      });
+    },
+    endDate() {
+      this.$emit('onChange', {
+        startDate: this.startDate,
+        endDate: this.endDate
+      });
+    },
+    defaultStartDate: {
+      handler(defaultStartDate) {
+        if (!defaultStartDate) {
+          return;
+        }
+
+        if (this.mode == DATE_TYPES.HMS || this.mode == DATE_TYPES.HM) {
+          console.error('时分秒/时分模式不支持设置默认开始时间');
+          return;
+        }
+
+        if (DateUtil.isBefore(defaultStartDate, this.minDate)) {
+          console.warn(
+            `默认开始日期不可小于最小可选日期,已把默认开始日期设为最小可选日期。默认开始日期:${defaultStartDate},最小可选日期:${this.minDate}`
+          );
+          this.startDate = this.getModeFormatDateString(this.minDate);
+        } else {
+          this.startDate = this.getModeFormatDateString(defaultStartDate);
+        }
+      },
+      immediate: true
+    },
+    defaultEndDate: {
+      handler(defaultEndDate) {
+        if (!defaultEndDate) {
+          return;
+        }
+
+        if (this.mode == DATE_TYPES.HMS || this.mode == DATE_TYPES.HM) {
+          console.error('时分秒/时分模式不支持设置默认结束时间');
+          return;
+        }
+
+        if (DateUtil.isAfter(defaultEndDate, this.maxDate)) {
+          console.warn(
+            `默认结束日期不可大于最大可选日期,已把默认结束日期设为最大可选日期。默认结束日期:${defaultEndDate},最大可选日期:${this.maxDate}`
+          );
+          this.endDate = this.getModeFormatDateString(this.maxDate);
+        } else {
+          this.endDate = this.getModeFormatDateString(defaultEndDate);
+        }
+      },
+      immediate: true
+    },
+    minDate(val) {
+      if ((val && this.mode == DATE_TYPES.HMS) || this.mode == DATE_TYPES.HM) {
+        console.error('时分秒/时分模式不支持设置最小可选时间');
+        return;
+      }
+    },
+    maxDate(val) {
+      if ((val && this.mode == DATE_TYPES.HMS) || this.mode == DATE_TYPES.HM) {
+        console.error('时分秒/时分模式不支持设置最大可选时间');
+        return;
+      }
+    }
+  },
+  methods: {
+    onTapStartDate() {
+      this.showEndDatePicker = false;
+      if (!this.startDate) {
+        this.startDate = this.getModeFormatDateString(new Date());
+      }
+      this.activeDate = 'startDate';
+      this.showStartDatePicker = true;
+    },
+    onTapEndDate() {
+      this.showStartDatePicker = false;
+      if (!this.endDate) {
+        this.endDate = this.startDate;
+      }
+      this.activeDate = 'endDate';
+      this.showEndDatePicker = true;
+    },
+    onChangeStartDate(date) {
+      this.startDate = date;
+    },
+    onChangeEndDate(date) {
+      this.endDate = date;
+    },
+    validateInput() {
+      if (!this.startDate) {
+        uni.showToast({
+          title: '请选择开始时间',
+          icon: 'none'
+        });
+        return false;
+      } else if (!this.endDate) {
+        uni.showToast({
+          title: '请选择结束时间',
+          icon: 'none'
+        });
+        return false;
+      } else if (DateUtil.isAfter(this.startDate, this.endDate)) {
+        uni.showToast({
+          title: '结束时间不能小于开始时间',
+          icon: 'none'
+        });
+        return false;
+      }
+      return true;
+    },
+    onCancel() {
+      this.resetData();
+    },
+    onConfirm() {
+      if (this.validateInput()) {
+        this.$emit('onSubmit', {
+          startDate: this.startDate,
+          endDate: this.endDate
+        });
+        this.showStartDatePicker = false;
+        this.showEndDatePicker = false;
+      }
+    },
+    resetData() {
+      this.startDate = '';
+      this.endDate = '';
+      this.activeDate = 'startDate';
+      this.showStartDatePicker = false;
+      this.showEndDatePicker = false;
+    },
+    // 返回对应日期模式的时间字符串
+    getModeFormatDateString(date) {
+      let fmt = 'YYYY-MM-DD';
+      switch (this.mode) {
+        case DATE_TYPES.YM:
+          fmt = 'YYYY-MM';
+          break;
+        case DATE_TYPES.Y:
+          fmt = 'YYYY';
+          break;
+        case DATE_TYPES['YMD-HMS']:
+          fmt = 'YYYY-MM-DD HH:mm:ss';
+          break;
+        case DATE_TYPES.HMS:
+          fmt = 'HH:mm:ss';
+          break;
+        case DATE_TYPES.HM:
+          fmt = 'HH:mm';
+          break;
+        default:
+          break;
+      }
+      return DateUtil.formatDate(date, fmt);
+    }
+  }
+};

+ 41 - 0
components/dengrq-datetime-picker/dateSelector/index.vue

@@ -0,0 +1,41 @@
+<template>
+  <view class="date-selector">
+    <view class="select-date-wrapper">
+      <view class="select-date" :class="{ active: activeDate == 'startDate' }" @tap="onTapStartDate">
+        <view class="select-date-value" v-if="startDate">{{ startDate }}</view>
+        <view class="select-date-placeholder" v-else>请选择时间</view>
+      </view>
+      <view style="margin: 0 16px">至</view>
+      <view class="select-date" :class="{ active: activeDate == 'endDate' }" @tap="onTapEndDate">
+        <view class="select-date-value" v-if="endDate">{{ endDate }}</view>
+        <view class="select-date-placeholder" v-else>请选择时间</view>
+      </view>
+    </view>
+
+    <DateTimePicker
+      v-if="showStartDatePicker"
+      @onChange="onChangeStartDate"
+      :defaultDate="startDate"
+      :minDate="minDate || ''"
+      :maxDate="endDate || maxDate || ''"
+      :mode="mode"
+    />
+    <DateTimePicker
+      v-if="showEndDatePicker"
+      @onChange="onChangeEndDate"
+      :defaultDate="endDate"
+      :minDate="startDate || minDate || ''"
+      :maxDate="maxDate || ''"
+      :mode="mode"
+    />
+
+    <view class="btn-group" v-if="showStartDatePicker || showEndDatePicker">
+      <view class="btn-cancel" @tap="onCancel">取消</view>
+      <view class="btn-confirm" @tap="onConfirm">确定</view>
+    </view>
+  </view>
+</template>
+
+<script src="./index.js"></script>
+
+<style lang="css" scoped src="./index.css"></style>

+ 19 - 0
package.json

@@ -0,0 +1,19 @@
+{
+    "id": "dengrq-datetime-picker",
+    "name": "日期时间选择器组件",
+    "displayName": "日期时间选择器组件",
+    "version": "1.0.6",
+    "description": "适用于 uni-app 的日期时间选择器组件,兼容 H5 和小程序。支持多种日期模式,包括年月日 / 年月日时分秒 / 年月 / 年份 / 时分秒 / 时分,支持配置默认选中日期与最小最大日期范围。",
+    "keywords": [
+        "日期选择器",
+        "时间选择器",
+        "日期时间选择器",
+        "日期范围选择"
+    ],
+    "dcloudext": {
+        "category": [
+            "前端组件",
+            "通用组件"
+        ]
+    }
+}

File diff suppressed because it is too large
+ 253 - 533
pages/oldrenovation/courtyard/courtyard.vue


+ 7 - 7
pages/oldrenovation/indoor/indoor.vue

@@ -435,13 +435,13 @@
 				if ('params' in options) {
 					this.objValue = JSON.parse(decodeURIComponent(options.params));
 
-					if (this.objValue.enginType == `old_renovation` && this.objValue.enginClassification == 'indoor_engin') {
-						this.title = '旧改工程-室内'
-
-					} else {
-						this.title = '新建工程-室内'
-
-					}
+				if (this.objValue.enginType == `old_renovation`) {
+					this.title = '旧改工程-室内'
+				
+				} else if (this.objValue.enginType == `new_built`) {
+					this.title = '新建工程-室内'
+				}
+				
 					uni.setNavigationBarTitle({
 						title: this.title
 					})

+ 0 - 1
uni.scss

@@ -1,7 +1,6 @@
 /**
  * uni-app内置的常用样式变量
  */
-
 /* 行为相关颜色 */
 $uni-color-primary: #007aff;
 $uni-color-success: #4cd964;

+ 82 - 0
uni_modules/yt-dateTimePicker/changelog.md

@@ -0,0 +1,82 @@
+## 1.1.7(2023-11-07)
+修改示例链接
+## 1.1.6(2023-11-07)
+增加示例链接
+## 1.1.5(2023-11-06)
+怎加联系方式
+## 1.1.4(2023-11-06)
+标签修改
+## 1.1.3(2023-11-06)
+介绍修改
+## 1.1.2(2023-11-06)
+名称修改
+## 1.1.0(2023-11-06)
+时间选择
+## 1.0.9(2023-11-06)
+修改bug
+## 1.0.8(2023-11-06)
+上传示例项目
+## 1.0.7(2023-11-06)
+删除图片
+## 1.0.6(2023-11-06)
+修改说明文档
+## 1.0.5(2023-11-04)
+更新说明文档
+## 1.0.4\5(2023-11-04)
+更新说明文档
+## 1.0.4\5(2023-11-04)
+更新说明文档
+## 1.0.4\5(2023-11-04)
+更新说明文档
+## 1.0.4(2023-11-03)
+修改bug
+## 1.0.3(2023-11-03)
+更新使用说明
+## 1.0.2(2023-11-03)
+修复bug
+## 1.0.1(2023-11-03)
+修改变量名
+## 1.0.0(2023-11-03)
+修复时间回显问题
+# CHANGELOG
+## 0.7.0(2023-07-11)
+- 增加`time-init`属性, 自定义初始时间, 默认为当前时间, 值为时间戳
+## 0.6.0(2023-07-11)
+
+- 增加对秒的选择
+- 增加`timeHidden`属性, 自定义年月日时分秒自由显示
+- 增加`timeLabel`属性, 自定义界面时间单位,默认为 `["年", "月", "日", "时", "分", "秒"]`
+- 修复微信小程序中无法定位到当前时间
+
+## 0.5.0(2021-08-17)
+
+- refactor
+
+## 0.4.1(2021-08-17)
+
+- update readme.md
+
+## 0.4.0(2021-08-17)
+
+- 移除组件 `color` 属性
+- update readme.md
+
+## 0.3.3(2021-08-15)
+
+- 修改插件基本信息
+
+## 0.3.2(2021-08-15)
+
+- 更新文档
+
+## 0.3.1(2021-08-15)
+
+- fix
+
+## 0.3.0(2019-07-22)
+
+- 增加 color 属性,可以更换按钮颜色
+
+## 0.0.4(2019-07-17)
+
+- 增加从 npm 安装方式

+ 341 - 0
uni_modules/yt-dateTimePicker/components/yt-dateTimePicker/yt-dateTimePicker.vue

@@ -0,0 +1,341 @@
+<template>
+	<view class="yt-dateTimePicker" v-if="done">
+		<view class="mask" :class="{ show: open }" @touchmove.stop.prevent catchtouchmove="true">
+		</view>
+		<view class="wrap" :class="{ show: open }">
+			<view class="picker-header" @touchmove.stop.prevent catchtouchmove="true">
+				<view class="btn-picker cancel" @click="open = false">取消</view>
+				<view>请选择时间</view>
+				<view class="btn-picker submit" @click="_onSubmit">确定</view>
+			</view>
+			<view class="picker-body">
+				<picker-view :value="value" @change="_onChange">
+					<picker-view-column v-if="timeHide[0]">
+						<view class="column-item" v-for="item in years" :key="item">
+							{{ item + timeLabel[0] }}
+						</view>
+					</picker-view-column>
+					<picker-view-column v-if="timeHide[1]">
+						<view class="column-item" v-for="item in months" :key="item">
+							{{ formatNum(item) + timeLabel[1] }}
+						</view>
+					</picker-view-column>
+					<picker-view-column v-if="timeHide[2]">
+						<view class="column-item" v-for="item in days" :key="item">
+							{{ formatNum(item) + timeLabel[2] }}
+						</view>
+					</picker-view-column>
+					<picker-view-column v-if="timeHide[3]">
+						<view class="column-item" v-for="item in hours" :key="item">
+							{{ formatNum(item) + timeLabel[3] }}
+						</view>
+					</picker-view-column>
+					<picker-view-column v-if="timeHide[4]">
+						<view class="column-item" v-for="item in minutes" :key="item">
+							{{ formatNum(item) + timeLabel[4] }}
+						</view>
+					</picker-view-column>
+					<picker-view-column v-if="timeHide[5]">
+						<view class="column-item" v-for="item in seconds" :key="item">
+							{{ formatNum(item) + timeLabel[5] }}
+						</view>
+					</picker-view-column>
+				</picker-view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: "yt-dateTimePicker",
+		props: {
+			startYear: {
+				type: Number,
+				default: 2000,
+			},
+			endYear: {
+				type: Number,
+				default: 2099,
+			},
+			timeLabel: {
+				type: Array,
+				default: () => ["年", "月", "日", "时", "分", "秒"],
+			},
+			timeHide: {
+				type: Array,
+				default: () => [true, true, true, true, true, true],
+			},
+			timeInit: {
+				type: Number,
+				default: new Date().valueOf(),
+			},
+		},
+
+		data() {
+			return {
+				open: false,
+				years: [],
+				months: [],
+				days: [],
+				hours: [],
+				minutes: [],
+				seconds: [],
+				year: "",
+				month: "",
+				day: "",
+				hour: "",
+				minute: "",
+				second: "",
+				value: [0, 0, 0, 0, 0, 0],
+				done: false,
+			};
+		},
+
+		computed: {
+			currentDatetime() {
+				return new Date(this.timeInit);
+			},
+		},
+
+		mounted() {
+			this.init();
+		},
+
+		watch: {
+			month() {
+				this.initDays();
+			},
+		},
+
+		methods: {
+			init() {
+				this.initYears();
+				this.initMonths();
+				this.initDays();
+				this.initHours();
+				this.initMinutes();
+				this.initSeconds();
+				this.setSelectValue();
+				this.done = true;
+			},
+
+			initYears() {
+				const years = [];
+				for (let year = this.startYear; year <= this.endYear; year++) {
+					years.push(year);
+					if (this.currentDatetime.getFullYear() === year) {
+						this.$set(this.value, 0, year - this.startYear);
+					}
+				}
+				this.years = years;
+			},
+
+			initMonths() {
+				const months = [];
+				for (let month = 1; month <= 12; month++) {
+					months.push(month);
+					if (this.currentDatetime.getMonth() + 1 === month) {
+						this.$set(this.value, 1, month - 1);
+					}
+				}
+				this.months = months;
+			},
+
+			initDays() {
+				const value = this.value;
+				const selectedYear = this.years[value[0]];
+				const selectedMonth = this.months[value[1]];
+				const days = [];
+				const totalDays = new Date(selectedYear, selectedMonth, 0).getDate();
+				for (let day = 1; day <= totalDays; day++) {
+					days.push(day);
+					if (this.currentDatetime.getDate() === day) {
+						this.$set(value, 2, day - 1);
+					}
+				}
+				this.days = days;
+			},
+
+			initHours() {
+				const hours = [];
+				for (let hour = 0; hour <= 23; hour++) {
+					hours.push(hour);
+					if (this.currentDatetime.getHours() === hour) {
+						this.$set(this.value, 3, hour);
+					}
+				}
+				this.hours = hours;
+			},
+
+			initMinutes() {
+				const minutes = [];
+				for (let minute = 0; minute < 60; minute++) {
+					minutes.push(minute);
+					if (this.currentDatetime.getMinutes() === minute) {
+						this.$set(this.value, 4, minute);
+					}
+				}
+				this.minutes = minutes;
+			},
+
+			initSeconds() {
+				const seconds = [];
+				for (let second = 0; second < 60; second++) {
+					seconds.push(second);
+					if (this.currentDatetime.getSeconds() === second) {
+						this.$set(this.value, 5, second);
+					}
+				}
+				this.seconds = seconds;
+			},
+
+			show() {
+				this.init();
+				this.open = true;
+			},
+
+			hide() {
+				this.open = false;
+			},
+
+			_onChange(e) {
+				this.value = e.detail.value;
+				this.setSelectValue();
+			},
+
+			setSelectValue() {
+				const v = this.value;
+
+				this.year = this.years[v[0]];
+				this.month = this.months[v[1]];
+				this.day = this.days[v[2]];
+				this.hour = this.hours[v[3]];
+				this.minute = this.minutes[v[4]];
+				this.second = this.seconds[v[5]];
+			},
+
+			_onSubmit() {
+				const {
+					year,
+					month,
+					day,
+					hour,
+					minute,
+					second,
+					formatNum,
+					timeHide,
+					timeLabel,
+				} = this;
+				const result = {
+					year: timeHide[0] ? formatNum(year) : "",
+					month: timeHide[1] ? formatNum(month) : "",
+					day: timeHide[2] ? formatNum(day) : "",
+					hour: timeHide[3] ? formatNum(hour) : "",
+					minute: timeHide[4] ? formatNum(minute) : "",
+					second: timeHide[5] ? formatNum(second) : "",
+				};
+				this.$emit("submit", result);
+				this.hide();
+			},
+
+			formatNum(num) {
+				return num < 10 ? "0" + num : num + "";
+			},
+		},
+	};
+</script>
+
+<style lang="scss">
+	$transition: all 0.3s ease;
+	$primary: #54cf4c;
+
+	.yt-dateTimePicker {
+		position: relative;
+		z-index: 999;
+
+		picker-view {
+			height: 100%;
+		}
+
+		.mask {
+			position: fixed;
+			z-index: 1000;
+			top: 0;
+			right: 0;
+			bottom: 0;
+			left: 0;
+			background-color: rgba(0, 0, 0, 0.4);
+			visibility: hidden;
+			opacity: 0;
+			transition: $transition;
+
+			&.show {
+				visibility: visible;
+				opacity: 1;
+			}
+		}
+
+		.wrap {
+			z-index: 1001;
+			position: fixed;
+			bottom: 0;
+			left: 0;
+			width: 100%;
+			transition: $transition;
+			transform: translateY(100%);
+
+			&.show {
+				transform: translateY(0);
+			}
+		}
+
+		.picker-header {
+			display: flex;
+			flex-direction: row;
+			justify-content: space-between;
+			align-items: center;
+			padding: 8px 8px;
+			background-color: darken(#fff, 2%);
+			background-color: #fff;
+		}
+
+		.picker-body {
+			width: 100%;
+			height: 420rpx;
+			overflow: hidden;
+			background-color: #fff;
+		}
+
+		.column-item {
+			text-overflow: ellipsis;
+			white-space: nowrap;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+		}
+
+		.btn-picker {
+			position: relative;
+			display: inline-block;
+			padding-left: 10px;
+			padding-right: 10px;
+			box-sizing: border-box;
+			text-align: center;
+			text-decoration: none;
+			line-height: 2;
+			-webkit-tap-highlight-color: transparent;
+			overflow: hidden;
+			background-color: #eee;
+			font-size: 14px;
+			border-radius: 3px;
+			color: #000;
+			cursor: pointer;
+		}
+
+		.btn-picker.submit {
+			background-color: $primary;
+			color: #fff;
+		}
+	}
+</style>

+ 77 - 0
uni_modules/yt-dateTimePicker/package.json

@@ -0,0 +1,77 @@
+{
+  "id": "yt-dateTimePicker",
+  "displayName": "日期时间选择器(超级好用)",
+  "version": "1.1.7",
+  "description": "这个选择器允许用户选择年、月、日、时、分和秒,提供了丰富的样式和配置选项。通过设置起始时间和结束时间范围,用户可以方便地进行精准的日期和时间选择。是开发uni-app应用程序的理想选择之一,",
+  "keywords": [
+    "时间",
+    "日期",
+    "年月日",
+    "时间选择器",
+    "日期时间选择器"
+],
+  "repository": "",
+  "engines": {
+    "HBuilderX": "^3.6.1"
+  },
+"dcloudext": {
+    "sale": {
+      "regular": {
+        "price": "0.00"
+      },
+      "sourcecode": {
+        "price": "0.00"
+      }
+    },
+    "contact": {
+      "qq": "3190136675"
+    },
+    "declaration": {
+      "ads": "无",
+      "data": "无",
+      "permissions": "无"
+    },
+    "npmurl": "",
+    "type": "component-vue"
+  },
+  "uni_modules": {
+    "dependencies": [],
+    "encrypt": [],
+    "platforms": {
+      "cloud": {
+        "tcb": "y",
+        "aliyun": "y"
+      },
+      "client": {
+        "App": {
+          "app-vue": "y",
+          "app-nvue": "u"
+        },
+        "H5-mobile": {
+          "Safari": "y",
+          "Android Browser": "y",
+          "微信浏览器(Android)": "y",
+          "QQ浏览器(Android)": "y"
+        },
+        "H5-pc": {
+          "Chrome": "y",
+          "IE": "n",
+          "Edge": "y",
+          "Firefox": "y",
+          "Safari": "y"
+        },
+        "小程序": {
+          "微信": "y",
+          "阿里": "u",
+          "百度": "u",
+          "字节跳动": "u",
+          "QQ": "u"
+        },
+        "快应用": {
+          "华为": "u",
+          "联盟": "u"
+        }
+      }
+    }
+  }
+}

+ 85 - 0
uni_modules/yt-dateTimePicker/readme.md

@@ -0,0 +1,85 @@
+# uniApp 简单的日期时间选择器
+
+uniApp 日期时间选择器, 可选择年, 月, 日, 时, 分, 秒.
+
+
+## 示例链接
+
+[计算你来到这个世界多少天了](https://tinyurl.com/yangtao-age)
+
+## 演示效果图
+
+<p>
+  <img align=top src="https://7072-prod-4gapv4gl33a8a0ff-1305990777.tcb.qcloud.la/%E9%87%8D%E8%A6%81%E5%9B%BE%E7%89%87%E5%AD%98%E5%82%A8/uniappcj.png?sign=67f6bd2b9d1e5f5bbdecc5ffdf9b923d&t=1699237042" width="500px" height="auto">
+</p>
+
+
+## 用法
+
+在 template 中:
+
+```vue
+<template>
+  <view>
+    <button type="default" @click="openDatetimePicker">时间选择</button>
+    <yt-dateTimePicker
+      ref="myPicker"
+      @submit="handleSubmit"
+      :start-year="2000"
+      :end-year="2099"
+      :time-init="1688860800000"
+      :time-hide="[true, true, true, true, true, false]"
+      :time-label="['年', '月', '日', '时', '分', '秒']"
+    />
+  </view>
+</template>
+```
+
+在 script 中:
+
+- 该插件遵循 easycom 规范, 不用显式导入就可以使用 `<yt-dateTimePicker />`
+- 如需显式导入可以使用`import SimpleDateTimePicker from "uni_modules/yt-dateTimePicker/components/yt-dateTimePicker/yt-dateTimePicker.vue";`
+
+```javascript
+export default {
+  data() {
+    return {
+      birthday: "",
+    };
+  },
+  methods: {
+    // 打开picker
+    openDatetimePicker() {
+      this.$refs.myPicker.show();
+    },
+
+    // 关闭picker
+    closeDatetimePicker() {
+      this.$refs.myPicker.hide();
+    },
+
+    handleSubmit(e) {
+      this.birthday = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}:${e.seconds}`;
+    },
+  },
+};
+```
+
+> Note: 不要把组件放 swiper 里面或者 v-for 里面等, 最好放在页面根部. 通常情况下打开 picker 需要调用`this.$refs.refName.show()`, 在选择完毕后 picker 会自动隐藏,不需要调用`this.$refs.refName.hide()`来手动隐藏。
+
+## 属性说明
+
+| 属性		| 是否必填	|  值类型	| 默认值	| 说明			|
+| --------- | -------- 	| -----: 	| --: 	| :------------:|
+| start-year|	是  		| Number	|2000	| 选择开始年份	|
+| end-year	|	是 		| Number	|2099	| 选择结束年份	|
+| time-init	|	否 		| Number	|new Date().valueOf()	| 自定义初始时间, 默认为当前时间, 值为时间戳	|
+| time-hidden|	是 		| Array	|[true, true, true, true, true, true]| 自定义时间列显示,默认显示年月日日分 |
+| time-label|	否 		| Array	|['年', '月', '日', '时', '分', '秒']	| 自定义各个时间单位	|
+| @submit	|	否 		| Function	|Object	|  监听选择事件, 回调函数的第一个参数包含了选择时间的完整信息|
+
+| `QQ交流群(906392632)`  |
+
+|<p><img align=top src="https://7072-prod-4gapv4gl33a8a0ff-1305990777.tcb.qcloud.la/%E9%87%8D%E8%A6%81%E5%9B%BE%E7%89%87%E5%AD%98%E5%82%A8/Snipaste_2023-11-06_16-50-56.png?sign=ed27f09cfeabb33e24835fecdd4108db&t=1699260686" width="500px" height="auto"></p>|
+| QQ群号:906392632      |
+