Compare commits

...

2 Commits

3 changed files with 74 additions and 10 deletions

View File

@ -19,6 +19,9 @@ public class EquipInfoPageReqVO extends PageParam {
@Schema(description = "机床设备编号")
private String equipNo;
@Schema(description = "机床设备名称")
private String equipName;
@Schema(description = "机床状态")
private Integer status;

View File

@ -27,6 +27,7 @@ public interface EquipInfoMapper extends BaseMapperX<EquipInfoDO> {
return selectPage(reqVO, new LambdaQueryWrapperX<EquipInfoDO>()
.eqIfPresent(EquipInfoDO::getModelId, reqVO.getModelId())
.eqIfPresent(EquipInfoDO::getCustomerId, reqVO.getCustomerId())
.likeIfPresent(EquipInfoDO::getEquipName, reqVO.getEquipName())
.likeIfPresent(EquipInfoDO::getEquipNo, reqVO.getEquipNo())
.eqIfPresent(EquipInfoDO::getStatus, reqVO.getStatus())
.groupBy(EquipInfoDO::getCustomerId, EquipInfoDO::getModelId)

View File

@ -11,6 +11,54 @@
style="text-align:right"
>
<el-form-item
label="机床设备名称"
prop="equipName"
label-width="100px"
>
<el-input
v-model="queryParams.equipName"
placeholder="请输入机床设备名称"
clearable
/>
</el-form-item>
<el-form-item
label="客户信息"
prop="customerId"
>
<el-select
v-model="queryParams.customerId"
placeholder="请选择客户信息"
clearable
size="small"
>
<el-option
v-for="item in customerSelection"
:key="item.customerId"
:label="item.customerName"
:value="item.customerId"
/>
</el-select>
</el-form-item>
<el-form-item
label="机床轴承状态"
prop="status"
label-width="100px"
>
<el-select
v-model="queryParams.status"
placeholder="请选择机床状态"
clearable
size="small"
>
<el-option
v-for="dict in this.getDictDatas(DICT_TYPE.EQUIP_STATUS)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<!-- <el-form-item
label="机床设备"
prop="equipId"
>
@ -21,7 +69,7 @@
clearable
@change="cascaderChange"
></el-cascader>
</el-form-item>
</el-form-item> -->
<!-- <el-form-item
label="机床组件id"
prop="componentId"
@ -38,7 +86,7 @@
/>
</el-select>
</el-form-item> -->
<el-form-item
<!-- <el-form-item
label="报警等级"
prop="alarmLevel"
>
@ -71,7 +119,7 @@
end-placeholder="结束日期"
:default-time="['00:00:00', '23:59:59']"
/>
</el-form-item>
</el-form-item> -->
<!-- <el-form-item
label="最新报警时间"
prop="latestAlarmTime"
@ -285,6 +333,7 @@
import * as EquipAlarmDataApi from "@/api/system/alarm/equipalarmdata";
import EquipAlarmDataForm from "./EquipAlarmDataForm.vue";
import * as EquipInfoApi from "@/api/system/equip/equipInfo";
import { getCustomerSelection } from "@/api/system/baseData/customerInfo";
import {
getEquipCascader,
getEquipSelection,
@ -318,22 +367,32 @@ export default {
queryParams: {
pageNo: 1,
pageSize: 10,
equipId: null,
componentId: null,
alarmLevel: null,
alarmType: 1,
firstAlarmTime: [],
latestAlarmTime: [],
customerId: null,
equipNo: null,
status: null,
equipAnalyseStatus: null,
// equipId: null,
// componentId: null,
// alarmLevel: null,
// alarmType: 1,
// firstAlarmTime: [],
// latestAlarmTime: [],
// status: null,
// equipAnalyseStatus: null,
},
equipSelection: [],
customerSelection: [],
};
},
created() {
this.getList();
this.getCustomerSelect();
},
methods: {
getCustomerSelect() {
getCustomerSelection().then((res) => {
this.customerSelection = res;
});
},
cascaderChange(value) {
if (value.length > 0) {
this.queryParams.equipId = value[1];
@ -348,6 +407,7 @@ export default {
// const res = await EquipAlarmDataApi.getEquipAlarmDataPage(
// this.queryParams
// );
console.log("查询参数:", this.queryParams);
const res = await EquipInfoApi.getEquipInfoPage(this.queryParams);
await getEquipCascader().then((res) => {
res.forEach((item) => {