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

master
wws 1 year ago
parent 9b6faad2ff
commit 1d04746ae8

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