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

yangwl
wws 1 year ago
parent 9b6faad2ff
commit 1d04746ae8

@ -75,36 +75,48 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item v-if="false" label="创建人" prop="createBy"> <el-form-item label="创建人" prop="createBy">
<el-input <el-input
class="my-select-input"
v-model="queryParams.createBy" v-model="queryParams.createBy"
placeholder="请输入创建人" placeholder="请输入创建人"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item v-if="false" label="创建时间" prop="createTime"> <el-form-item label="创建时间" prop="createTime">
<el-date-picker clearable <el-date-picker
v-model="queryParams.createTime" v-model="queryParams.createTimeArray"
type="date" type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
placeholder="请选择创建时间"> :picker-options="pickerOptions">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item v-if="false" label="更新人" prop="updateBy"> <el-form-item label="更新人" prop="updateBy">
<el-input <el-input
class="my-select-input"
v-model="queryParams.updateBy" v-model="queryParams.updateBy"
placeholder="请输入更新人" placeholder="请输入更新人"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item v-if="false" label="更新时间" prop="updateTime"> <el-form-item label="更新时间" prop="updateTime">
<el-date-picker clearable <el-date-picker
v-model="queryParams.updateTime" v-model="queryParams.updateTimeArray"
type="date" type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
placeholder="请选择更新时间"> :picker-options="pickerOptions">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -266,6 +278,34 @@ export default {
dicts: ['device_fault_type'], dicts: ['device_fault_type'],
data() { data() {
return { 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, loading: true,
// //
@ -300,7 +340,9 @@ export default {
createBy: null, createBy: null,
createTime: null, createTime: null,
updateBy: null, updateBy: null,
updateTime: null updateTime: null,
createTimeArray: [],
updateTimeArray: [],
}, },
// //
form: {}, form: {},
@ -355,6 +397,9 @@ export default {
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.resetForm("queryForm"); this.resetForm("queryForm");
//
this.queryParams.createTimeArray = [];
this.queryParams.updateTimeArray = [];
this.handleQuery(); this.handleQuery();
}, },
// //

Loading…
Cancel
Save