上传附件

This commit is contained in:
zhangyc
2022-12-24 00:10:55 +08:00
parent ea31837912
commit c730b97898
11 changed files with 185 additions and 31 deletions

View File

@@ -102,7 +102,8 @@
<div class="btnbox">
<a-range-picker
style="width: 400px; height: 40px; border-radius: 8px"
show-time
show-time="{format:'hh:mm'}"
:disabled-date="disabledDate" :disabled-time="disabledRangeTime"
format="YYYY/MM/DD HH:mm"
v-model:value="test.chooseTime"
:placeholder="[' 开始时间', ' 结束时间']"
@@ -661,7 +662,30 @@ export default {
state.id = value.id;
state.testName = value.testName;
};
const range = (start, end) => {
const result = [];
for (let i = start; i < end; i++) {
result.push(i);
}
return result;
};
const disabledDate = (current) => {
// Can not select days before today and today
console.log('1111', dayjs().endOf('day'))
return current && current < dayjs().startOf('day');
};
const disabledDateTime = () => {
return {
disabledHours: () => range(0, 24).splice(4, 20),
disabledMinutes: () => range(30, 60),
disabledSeconds: () => [55, 56],
};
};
return {
afterVisibleChange,
closeDrawer,
@@ -671,7 +695,7 @@ export default {
cloradio2,
cloradio3,
cloradio4,
disabledDateTime,
clearAll,
delTag,
@@ -683,7 +707,7 @@ export default {
chooseTest,
closeTag,
getData,
disabledDate,
...toRefs(state),
};
},