Commit 23ed2387 authored by 仇晓婷's avatar 仇晓婷

时间控件

parent 8bbe81be
<template> <template>
<div class="time-view" v-if="timeValue.startDate && timeValue.endDate"> <div class="time-view" v-if="timeValue.startDate && timeValue.endDate">
<span>{{ timeValue.startDate }}</span <div>{{ timeValue.startDate }}</div>
>&nbsp; <span class="line">————</span>&nbsp; <div class="jian-tou">
<!-- {{ date }} --> <div>{{ date }}</div>
<span>{{ timeValue.endDate }}</span> </div>
<div class="jian-tou"></div> <div>{{ timeValue.endDate }}</div>
<div class="day-time">{{ date }}</div>
</div> </div>
</template> </template>
<script> <script>
...@@ -69,7 +68,7 @@ export default { ...@@ -69,7 +68,7 @@ export default {
} else if (this.work == 1) { } else if (this.work == 1) {
result = "" + parseInt(dayC) + "天"; result = "" + parseInt(dayC) + "天";
} else if (this.work == 0) { } else if (this.work == 0) {
result = "" + parseInt(hourC) + "小时"; result = "" + parseInt(hourC) + " h";
} }
// if (monthC >= 1) { // if (monthC >= 1) {
// result = "" + parseInt(monthC) + "月"; // result = "" + parseInt(monthC) + "月";
...@@ -96,25 +95,21 @@ export default { ...@@ -96,25 +95,21 @@ export default {
</script> </script>
<style lang="less"> <style lang="less">
.time-view { .time-view {
width: 300px; // width: 600px;
position: relative; display: -webkit-flex;
.day-time { display: flex;
position: absolute;
bottom: 11px;
left: 83px;
}
.line {
font-size: 18px;
}
.jian-tou { .jian-tou {
position: absolute; width: 55px;
bottom: 9px; text-align: center;
left: 144px; margin: 5px;
width: 7px; background-image: url("../../assets/imgicon/range.png");
height: 7px; background-size: 100%;
border-top: 2px solid #666; background-repeat: no-repeat;
border-right: 2px solid #666; margin-top: 7px;
transform: rotate(45deg); div {
margin-top: -13px;
}
} }
} }
</style> </style>
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
style="width: 300px" style="width: 300px"
></DatePicker> </FormItem ></DatePicker> </FormItem
></Col> ></Col>
<!-- <TimeDifference :timeValue="timeValue" :wrok="1"></TimeDifference> --> <!-- <DateDRange :timeValue="timeValue" :wrok="1"></DateDRange> -->
<Col :span="12" <Col :span="12"
><FormItem :label="l('type')" prop="type"> ><FormItem :label="l('type')" prop="type">
<Dictionary <Dictionary
......
...@@ -76,7 +76,7 @@ import InputCode from '@/components/page/inputCode.vue' ...@@ -76,7 +76,7 @@ import InputCode from '@/components/page/inputCode.vue'
import Pictrue from '@/components/page/pictrue.vue' import Pictrue from '@/components/page/pictrue.vue'
import WordTree from '@/components/page/wordTree.vue' import WordTree from '@/components/page/wordTree.vue'
import Actions from '@/components/page/actions.vue' import Actions from '@/components/page/actions.vue'
import TimeDifference from '@/components/page/timeDifference.vue' import DateDRange from '@/components/page/dateRange.vue'
import FilesViewer from '@/components/page/filesViewer.vue' import FilesViewer from '@/components/page/filesViewer.vue'
...@@ -158,7 +158,7 @@ Vue.component("InputCode", InputCode) ...@@ -158,7 +158,7 @@ Vue.component("InputCode", InputCode)
Vue.component("Pictrue", Pictrue) Vue.component("Pictrue", Pictrue)
Vue.component("WordTree", WordTree) Vue.component("WordTree", WordTree)
Vue.component("Actions", Actions) Vue.component("Actions", Actions)
Vue.component("TimeDifference", TimeDifference) Vue.component("DateDRange", DateDRange)
Vue.component("Life", Life) Vue.component("Life", Life)
Vue.component("FilesViewer",FilesViewer) Vue.component("FilesViewer",FilesViewer)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment