diff --git a/src/views/device/faultType/index.vue b/src/views/device/faultType/index.vue
index 47e7e0f3..07dfef57 100644
--- a/src/views/device/faultType/index.vue
+++ b/src/views/device/faultType/index.vue
@@ -75,38 +75,50 @@
@keyup.enter.native="handleQuery"
/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
搜索
重置
@@ -266,6 +278,34 @@ export default {
dicts: ['device_fault_type'],
data() {
return {
+ // 日期范围选择快捷
+ pickerOptions: {
+ shortcuts: [{
+ text: '最近一周',
+ onClick(picker) {
+ const end = new Date();
+ const start = new Date();
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+ picker.$emit('pick', [start, end]);
+ }
+ }, {
+ text: '最近一个月',
+ onClick(picker) {
+ const end = new Date();
+ const start = new Date();
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+ picker.$emit('pick', [start, end]);
+ }
+ }, {
+ text: '最近三个月',
+ onClick(picker) {
+ const end = new Date();
+ const start = new Date();
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
+ picker.$emit('pick', [start, end]);
+ }
+ }]
+ },
// 遮罩层
loading: true,
// 选中数组
@@ -300,7 +340,9 @@ export default {
createBy: null,
createTime: null,
updateBy: null,
- updateTime: null
+ updateTime: null,
+ createTimeArray: [],
+ updateTimeArray: [],
},
// 表单参数
form: {},
@@ -355,6 +397,9 @@ export default {
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
+ // 重置日期范围
+ this.queryParams.createTimeArray = [];
+ this.queryParams.updateTimeArray = [];
this.handleQuery();
},
// 多选框选中数据