故障类型维护(优化查询)

master
wws 1 year ago
parent 9b6faad2ff
commit 1d04746ae8

@ -75,36 +75,48 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item v-if="false" label="创建人" prop="createBy">
<el-form-item label="创建人" prop="createBy">
<el-input
class="my-select-input"
v-model="queryParams.createBy"
placeholder="请输入创建人"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item v-if="false" label="创建时间" prop="createTime">
<el-date-picker clearable
v-model="queryParams.createTime"
type="date"
<el-form-item label="创建时间" prop="createTime">
<el-date-picker
v-model="queryParams.createTimeArray"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
placeholder="请选择创建时间">
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
<el-form-item v-if="false" label="更新人" prop="updateBy">
<el-form-item label="更新人" prop="updateBy">
<el-input
class="my-select-input"
v-model="queryParams.updateBy"
placeholder="请输入更新人"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item v-if="false" label="更新时间" prop="updateTime">
<el-date-picker clearable
v-model="queryParams.updateTime"
type="date"
<el-form-item label="更新时间" prop="updateTime">
<el-date-picker
v-model="queryParams.updateTimeArray"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
placeholder="请选择更新时间">
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
<el-form-item>
@ -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();
},
//

Loading…
Cancel
Save