a01c8a22 by joe

日期控件调整

1 parent df9f5b9a
......@@ -102,7 +102,7 @@
<div class="down-arrow"></div>
<div class="cont">
<div class="ipt-date">
<date-picker v-model="data.contactDate" :pluginActivity="pluginActivityHandler" :formatter="'dd-MM-yyyy'" :filtModel="['future','today']" :check="checkDate" :readonly="true" :cusStyle="{border:'none !important','background-color':'transparent !important','height':'58px', 'color':'#ff6839','font-weight':'bold','text-align': 'center'}"></date-picker>
<date-picker v-model="data.contactDate" :pluginActivity="pluginActivityHandler" :formatter="'dd-MM-yyyy'" :filtModel="['future']" :check="checkDate" :readonly="true" :cusStyle="{border:'none !important','background-color':'transparent !important','height':'58px', 'color':'#ff6839','font-weight':'bold','text-align': 'center'}"></date-picker>
</div>
</div>
</div>
......
......@@ -103,7 +103,7 @@ export default {
visible: false,
hkHolidayDefine: {
// 公历假期,缺少复活节,缺少聖誕節後第一個周日
gl: [[1, 1], [4, 10], [4, 11], [4, 30], [5, 1], [7, 1], [10, 1], [10, 2], [12, 25]],
gl: [[1, 1], [5, 1], [7, 1], [10, 1], [10, 2], [12, 25]],
// 农历假期,缺少清明节
nl: [[1, 1], [1, 2], [1, 3], [5, 5], [8, 15], [9, 9]],
// 清明节
......@@ -112,7 +112,40 @@ export default {
["2020", "2021", "2024", "2025", "2028", "2029", "2032", "2033", "2036", "2037"],
// 4月5号
["2022", "2023", "2026", "2027", "2030", "2031", "2034", "2035", "2038", "2039"]
]
],
pub: {
2020: [[4, 10], [4, 11], [4, 12], [4, 13], [4, 30]],
2021: [[4, 2], [4, 3], [4, 4], [4, 5], [5, 19]],
2022: [[4, 15], [4, 16], [4, 17], [4, 18], [5, 8]],
2023: [[4, 7], [4, 8], [4, 9], [4, 10], [5, 26]],
2024: [[3, 29], [3, 30], [3, 31], [4, 1], [5, 15]],
2025: [[4, 18], [4, 19], [4, 20], [4, 21], [5, 5]],
2026: [[4, 3], [4, 4], [4, 5], [4, 6], [5, 24]],
2027: [[3, 26], [3, 27], [3, 28], [3, 29], [5, 13]],
2028: [[4, 14], [4, 15], [4, 16], [4, 17], [5, 2]],
2029: [[3, 30], [3, 31], [4, 1], [4, 2], [5, 20]],
2030: [[4, 19], [4, 20], [4, 21], [4, 22], [5, 9]],
2031: [[4, 11], [4, 12], [4, 13], [4, 14], [5, 28]],
2032: [[3, 26], [3, 27], [3, 28], [3, 29], [5, 16]],
2033: [[4, 15], [4, 16], [4, 17], [4, 18], [5, 6]],
2034: [[4, 7], [4, 8], [4, 9], [4, 10], [5, 25]],
2035: [[3, 23], [3, 24], [3, 25], [3, 26], [5, 15]],
2036: [[4, 11], [4, 12], [4, 13], [4, 14], [5, 3]],
2037: [[4, 3], [4, 4], [4, 5], [4, 6], [5, 22]],
2038: [[4, 23], [4, 24], [4, 25], [4, 26], [5, 11]],
2039: [[4, 8], [4, 9], [4, 10], [4, 11], [4, 30]],
2040: [[3, 30], [3, 31], [4, 1], [4, 2], [5, 18]],
2041: [[4, 19], [4, 20], [4, 21], [4, 22], [5, 7]],
2042: [[4, 4], [4, 5], [4, 6], [4, 7], [5, 26]],
2043: [[3, 27], [3, 28], [3, 29], [3, 30], [5, 16]],
2044: [[4, 15], [4, 16], [4, 17], [4, 18], [5, 5]],
2045: [[4, 7], [4, 8], [4, 9], [4, 10], [5, 24]],
2046: [[3, 23], [3, 24], [3, 25], [3, 26], [5, 13]],
2047: [[4, 12], [4, 13], [4, 14], [4, 15], [5, 2]],
2048: [[4, 3], [4, 4], [4, 5], [4, 6], [5, 20]],
2049: [[4, 16], [4, 17], [4, 18], [4, 19], [5, 9]],
2050: [[4, 8], [4, 9], [4, 10], [4, 11], [5, 28]]
}
},
// 节假日,key是月份,value是日期列表
// holiday: {
......@@ -171,6 +204,27 @@ export default {
list.push(d);
}
// 不能通过计算的公历
let pubData = this.hkHolidayDefine.pub[year + ""];
if (pubData) {
for (let index = 0; index < pubData.length; index++) {
let m = pubData[index][0];
let d = pubData[index][1];
// 如果是周六/周日,顺延到下周一
let vals = this.checkWeeken(m, d);
m = vals[0];
d = vals[1];
let list = result[m];
if (!list) {
result[m] = [];
list = result[m];
}
list.push(d);
}
}
for (let index = 0; index < hkHolidayDefine.nl.length; index++) {
let m = hkHolidayDefine.nl[index][0];
......@@ -432,8 +486,10 @@ export default {
year: yearPage * 10 + index,
// disable: index == 0 || index == 11,
// gray: index == 0 || index == 11,
disable: index >= 10,
gray: index >= 10,
// disable: index >= 10,
// gray: index >= 10,
disable: false,
gray: false,
});
}
this.yearRange = `${yearPage * 10 + 0}-${yearPage * 10 + 9}`
......