bug2796,2800
Showing
4 changed files
with
26 additions
and
12 deletions
... | @@ -117,7 +117,9 @@ export function timeFormat (date, end) { | ... | @@ -117,7 +117,9 @@ export function timeFormat (date, end) { |
117 | } | 117 | } |
118 | var y = date.getFullYear(); //年 | 118 | var y = date.getFullYear(); //年 |
119 | var m = date.getMonth() + 1; //月 | 119 | var m = date.getMonth() + 1; //月 |
120 | m < 10 && (m = '0' + m) | ||
120 | var d = date.getDate(); //日 | 121 | var d = date.getDate(); //日 |
122 | d < 10 && (d = '0' + d) | ||
121 | if (end) { | 123 | if (end) { |
122 | return y + "/" + m + "/" + d + ' 23:59:59'; | 124 | return y + "/" + m + "/" + d + ' 23:59:59'; |
123 | } else { | 125 | } else { | ... | ... |
... | @@ -11,7 +11,7 @@ | ... | @@ -11,7 +11,7 @@ |
11 | <el-col :span="4"> | 11 | <el-col :span="4"> |
12 | <el-form-item label="开始日期" prop="startTime"> | 12 | <el-form-item label="开始日期" prop="startTime"> |
13 | <el-date-picker | 13 | <el-date-picker |
14 | type="datetime" | 14 | type="date" |
15 | class="width100" | 15 | class="width100" |
16 | placeholder="开始日期" | 16 | placeholder="开始日期" |
17 | :picker-options="pickerOptionsStart" | 17 | :picker-options="pickerOptionsStart" |
... | @@ -24,11 +24,12 @@ | ... | @@ -24,11 +24,12 @@ |
24 | <el-form-item label="结束日期" prop="endTime"> | 24 | <el-form-item label="结束日期" prop="endTime"> |
25 | <el-date-picker | 25 | <el-date-picker |
26 | class="width100" | 26 | class="width100" |
27 | type="datetime" | 27 | type="date" |
28 | placeholder="结束日期" | 28 | placeholder="结束日期" |
29 | :picker-options="pickerOptionsEnd" | 29 | :picker-options="pickerOptionsEnd" |
30 | v-model="form.endTime" | 30 | v-model="form.endTime" |
31 | value-format="yyyy/MM/dd HH:mm:ss" | 31 | value-format="yyyy/MM/dd HH:mm:ss" |
32 | @change="endTimeChange" | ||
32 | ></el-date-picker> | 33 | ></el-date-picker> |
33 | </el-form-item> | 34 | </el-form-item> |
34 | </el-col> | 35 | </el-col> |
... | @@ -60,7 +61,7 @@ export default { | ... | @@ -60,7 +61,7 @@ export default { |
60 | pickerOptionsStart: { | 61 | pickerOptionsStart: { |
61 | disabledDate: (time) => { | 62 | disabledDate: (time) => { |
62 | if (this.form.endTime) { | 63 | if (this.form.endTime) { |
63 | return time.getTime() >= new Date(this.form.endTime).getTime(); | 64 | return time.getTime() > new Date(this.form.endTime).getTime(); |
64 | } | 65 | } |
65 | }, | 66 | }, |
66 | }, | 67 | }, |
... | @@ -68,7 +69,7 @@ export default { | ... | @@ -68,7 +69,7 @@ export default { |
68 | pickerOptionsEnd: { | 69 | pickerOptionsEnd: { |
69 | disabledDate: (time) => { | 70 | disabledDate: (time) => { |
70 | if (this.form.startTime) { | 71 | if (this.form.startTime) { |
71 | return time.getTime() <= new Date(this.form.startTime).getTime(); | 72 | return time.getTime() < new Date(this.form.startTime).getTime(); |
72 | } | 73 | } |
73 | }, | 74 | }, |
74 | }, | 75 | }, |
... | @@ -88,6 +89,9 @@ export default { | ... | @@ -88,6 +89,9 @@ export default { |
88 | ...mapGetters(["dicData"]), | 89 | ...mapGetters(["dicData"]), |
89 | }, | 90 | }, |
90 | methods: { | 91 | methods: { |
92 | endTimeChange(val){ | ||
93 | this.form.endTime = timeFormat(new Date(val),true) | ||
94 | }, | ||
91 | //查询各区县办件数量 | 95 | //查询各区县办件数量 |
92 | async getProcessCounts () { | 96 | async getProcessCounts () { |
93 | this.pieChartsData = []; | 97 | this.pieChartsData = []; | ... | ... |
... | @@ -29,7 +29,7 @@ | ... | @@ -29,7 +29,7 @@ |
29 | <el-col :span="4"> | 29 | <el-col :span="4"> |
30 | <el-form-item label="开始日期" prop="startTime"> | 30 | <el-form-item label="开始日期" prop="startTime"> |
31 | <el-date-picker | 31 | <el-date-picker |
32 | type="datetime" | 32 | type="date" |
33 | class="width100" | 33 | class="width100" |
34 | placeholder="开始日期" | 34 | placeholder="开始日期" |
35 | :picker-options="pickerOptionsStart" | 35 | :picker-options="pickerOptionsStart" |
... | @@ -41,12 +41,13 @@ | ... | @@ -41,12 +41,13 @@ |
41 | <el-col :span="4"> | 41 | <el-col :span="4"> |
42 | <el-form-item label="结束日期" prop="endTime"> | 42 | <el-form-item label="结束日期" prop="endTime"> |
43 | <el-date-picker | 43 | <el-date-picker |
44 | type="datetime" | 44 | type="date" |
45 | class="width100" | 45 | class="width100" |
46 | placeholder="结束日期" | 46 | placeholder="结束日期" |
47 | :picker-options="pickerOptionsEnd" | 47 | :picker-options="pickerOptionsEnd" |
48 | v-model="form.endTime" | 48 | v-model="form.endTime" |
49 | value-format="yyyy/MM/dd HH:mm:ss" | 49 | value-format="yyyy/MM/dd HH:mm:ss" |
50 | @change="endTimeChange" | ||
50 | ></el-date-picker> | 51 | ></el-date-picker> |
51 | </el-form-item> | 52 | </el-form-item> |
52 | </el-col> | 53 | </el-col> |
... | @@ -78,7 +79,7 @@ export default { | ... | @@ -78,7 +79,7 @@ export default { |
78 | pickerOptionsStart: { | 79 | pickerOptionsStart: { |
79 | disabledDate: (time) => { | 80 | disabledDate: (time) => { |
80 | if (this.form.endTime) { | 81 | if (this.form.endTime) { |
81 | return time.getTime() >= new Date(this.form.endTime).getTime(); | 82 | return time.getTime() > new Date(this.form.endTime).getTime(); |
82 | } | 83 | } |
83 | }, | 84 | }, |
84 | }, | 85 | }, |
... | @@ -86,7 +87,7 @@ export default { | ... | @@ -86,7 +87,7 @@ export default { |
86 | pickerOptionsEnd: { | 87 | pickerOptionsEnd: { |
87 | disabledDate: (time) => { | 88 | disabledDate: (time) => { |
88 | if (this.form.startTime) { | 89 | if (this.form.startTime) { |
89 | return time.getTime() <= new Date(this.form.startTime).getTime(); | 90 | return time.getTime() < new Date(this.form.startTime).getTime(); |
90 | } | 91 | } |
91 | }, | 92 | }, |
92 | }, | 93 | }, |
... | @@ -108,6 +109,9 @@ export default { | ... | @@ -108,6 +109,9 @@ export default { |
108 | ...mapGetters(["dicData"]), | 109 | ...mapGetters(["dicData"]), |
109 | }, | 110 | }, |
110 | methods: { | 111 | methods: { |
112 | endTimeChange(val){ | ||
113 | this.form.endTime = timeFormat(new Date(val),true) | ||
114 | }, | ||
111 | async getSuucessRate () { | 115 | async getSuucessRate () { |
112 | this.recTypeArr = []; | 116 | this.recTypeArr = []; |
113 | this.chartData = []; | 117 | this.chartData = []; | ... | ... |
... | @@ -30,7 +30,7 @@ | ... | @@ -30,7 +30,7 @@ |
30 | <el-form-item label="开始日期"> | 30 | <el-form-item label="开始日期"> |
31 | <el-date-picker | 31 | <el-date-picker |
32 | class="width100" | 32 | class="width100" |
33 | type="datetime" | 33 | type="date" |
34 | placeholder="开始日期" | 34 | placeholder="开始日期" |
35 | :picker-options="pickerOptionsStart" | 35 | :picker-options="pickerOptionsStart" |
36 | v-model="form.startTime" | 36 | v-model="form.startTime" |
... | @@ -42,11 +42,12 @@ | ... | @@ -42,11 +42,12 @@ |
42 | <el-form-item label="结束日期"> | 42 | <el-form-item label="结束日期"> |
43 | <el-date-picker | 43 | <el-date-picker |
44 | class="width100" | 44 | class="width100" |
45 | type="datetime" | 45 | type="date" |
46 | placeholder="结束日期" | 46 | placeholder="结束日期" |
47 | :picker-options="pickerOptionsEnd" | 47 | :picker-options="pickerOptionsEnd" |
48 | v-model="form.endTime" | 48 | v-model="form.endTime" |
49 | value-format="yyyy/MM/dd HH:mm:ss" | 49 | value-format="yyyy/MM/dd HH:mm:ss" |
50 | @change="endTimeChange" | ||
50 | ></el-date-picker> | 51 | ></el-date-picker> |
51 | </el-form-item> | 52 | </el-form-item> |
52 | </el-col> | 53 | </el-col> |
... | @@ -78,7 +79,7 @@ export default { | ... | @@ -78,7 +79,7 @@ export default { |
78 | pickerOptionsStart: { | 79 | pickerOptionsStart: { |
79 | disabledDate: (time) => { | 80 | disabledDate: (time) => { |
80 | if (this.form.endTime) { | 81 | if (this.form.endTime) { |
81 | return time.getTime() >= new Date(this.form.endTime).getTime(); | 82 | return time.getTime() > new Date(this.form.endTime).getTime(); |
82 | } | 83 | } |
83 | }, | 84 | }, |
84 | }, | 85 | }, |
... | @@ -86,7 +87,7 @@ export default { | ... | @@ -86,7 +87,7 @@ export default { |
86 | pickerOptionsEnd: { | 87 | pickerOptionsEnd: { |
87 | disabledDate: (time) => { | 88 | disabledDate: (time) => { |
88 | if (this.form.startTime) { | 89 | if (this.form.startTime) { |
89 | return time.getTime() <= new Date(this.form.startTime).getTime(); | 90 | return time.getTime() < new Date(this.form.startTime).getTime(); |
90 | } | 91 | } |
91 | }, | 92 | }, |
92 | }, | 93 | }, |
... | @@ -109,6 +110,9 @@ export default { | ... | @@ -109,6 +110,9 @@ export default { |
109 | ...mapGetters(["dicData"]), | 110 | ...mapGetters(["dicData"]), |
110 | }, | 111 | }, |
111 | methods: { | 112 | methods: { |
113 | endTimeChange(val){ | ||
114 | this.form.endTime = timeFormat(new Date(val),true) | ||
115 | }, | ||
112 | async getProcessCounts(){ | 116 | async getProcessCounts(){ |
113 | this.chartData = []; | 117 | this.chartData = []; |
114 | let { result: res } = await efficient.getProcessCounts( | 118 | let { result: res } = await efficient.getProcessCounts( | ... | ... |
-
Please register or sign in to post a comment