a686fb34 by yangwei

bug2796,2800

1 parent 41b5527c
......@@ -117,7 +117,9 @@ export function timeFormat (date, end) {
}
var y = date.getFullYear(); //年
var m = date.getMonth() + 1; //月
m < 10 && (m = '0' + m)
var d = date.getDate(); //日
d < 10 && (d = '0' + d)
if (end) {
return y + "/" + m + "/" + d + ' 23:59:59';
} else {
......
......@@ -11,7 +11,7 @@
<el-col :span="4">
<el-form-item label="开始日期" prop="startTime">
<el-date-picker
type="datetime"
type="date"
class="width100"
placeholder="开始日期"
:picker-options="pickerOptionsStart"
......@@ -24,11 +24,12 @@
<el-form-item label="结束日期" prop="endTime">
<el-date-picker
class="width100"
type="datetime"
type="date"
placeholder="结束日期"
:picker-options="pickerOptionsEnd"
v-model="form.endTime"
value-format="yyyy/MM/dd HH:mm:ss"
@change="endTimeChange"
></el-date-picker>
</el-form-item>
</el-col>
......@@ -60,7 +61,7 @@ export default {
pickerOptionsStart: {
disabledDate: (time) => {
if (this.form.endTime) {
return time.getTime() >= new Date(this.form.endTime).getTime();
return time.getTime() > new Date(this.form.endTime).getTime();
}
},
},
......@@ -68,7 +69,7 @@ export default {
pickerOptionsEnd: {
disabledDate: (time) => {
if (this.form.startTime) {
return time.getTime() <= new Date(this.form.startTime).getTime();
return time.getTime() < new Date(this.form.startTime).getTime();
}
},
},
......@@ -88,6 +89,9 @@ export default {
...mapGetters(["dicData"]),
},
methods: {
endTimeChange(val){
this.form.endTime = timeFormat(new Date(val),true)
},
//查询各区县办件数量
async getProcessCounts () {
this.pieChartsData = [];
......
......@@ -29,7 +29,7 @@
<el-col :span="4">
<el-form-item label="开始日期" prop="startTime">
<el-date-picker
type="datetime"
type="date"
class="width100"
placeholder="开始日期"
:picker-options="pickerOptionsStart"
......@@ -41,12 +41,13 @@
<el-col :span="4">
<el-form-item label="结束日期" prop="endTime">
<el-date-picker
type="datetime"
type="date"
class="width100"
placeholder="结束日期"
:picker-options="pickerOptionsEnd"
v-model="form.endTime"
value-format="yyyy/MM/dd HH:mm:ss"
@change="endTimeChange"
></el-date-picker>
</el-form-item>
</el-col>
......@@ -78,7 +79,7 @@ export default {
pickerOptionsStart: {
disabledDate: (time) => {
if (this.form.endTime) {
return time.getTime() >= new Date(this.form.endTime).getTime();
return time.getTime() > new Date(this.form.endTime).getTime();
}
},
},
......@@ -86,7 +87,7 @@ export default {
pickerOptionsEnd: {
disabledDate: (time) => {
if (this.form.startTime) {
return time.getTime() <= new Date(this.form.startTime).getTime();
return time.getTime() < new Date(this.form.startTime).getTime();
}
},
},
......@@ -108,6 +109,9 @@ export default {
...mapGetters(["dicData"]),
},
methods: {
endTimeChange(val){
this.form.endTime = timeFormat(new Date(val),true)
},
async getSuucessRate () {
this.recTypeArr = [];
this.chartData = [];
......
......@@ -30,7 +30,7 @@
<el-form-item label="开始日期">
<el-date-picker
class="width100"
type="datetime"
type="date"
placeholder="开始日期"
:picker-options="pickerOptionsStart"
v-model="form.startTime"
......@@ -42,11 +42,12 @@
<el-form-item label="结束日期">
<el-date-picker
class="width100"
type="datetime"
type="date"
placeholder="结束日期"
:picker-options="pickerOptionsEnd"
v-model="form.endTime"
value-format="yyyy/MM/dd HH:mm:ss"
@change="endTimeChange"
></el-date-picker>
</el-form-item>
</el-col>
......@@ -78,7 +79,7 @@ export default {
pickerOptionsStart: {
disabledDate: (time) => {
if (this.form.endTime) {
return time.getTime() >= new Date(this.form.endTime).getTime();
return time.getTime() > new Date(this.form.endTime).getTime();
}
},
},
......@@ -86,7 +87,7 @@ export default {
pickerOptionsEnd: {
disabledDate: (time) => {
if (this.form.startTime) {
return time.getTime() <= new Date(this.form.startTime).getTime();
return time.getTime() < new Date(this.form.startTime).getTime();
}
},
},
......@@ -109,6 +110,9 @@ export default {
...mapGetters(["dicData"]),
},
methods: {
endTimeChange(val){
this.form.endTime = timeFormat(new Date(val),true)
},
async getProcessCounts(){
this.chartData = [];
let { result: res } = await efficient.getProcessCounts(
......