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 = "机床设备编号") @Schema(description = "机床设备编号")
private String equipNo; private String equipNo;
@Schema(description = "机床设备名称")
private String equipName;
@Schema(description = "机床状态") @Schema(description = "机床状态")
private Integer status; private Integer status;

View File

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

View File

@ -11,6 +11,54 @@
style="text-align:right" style="text-align:right"
> >
<el-form-item <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="机床设备" label="机床设备"
prop="equipId" prop="equipId"
> >
@ -21,7 +69,7 @@
clearable clearable
@change="cascaderChange" @change="cascaderChange"
></el-cascader> ></el-cascader>
</el-form-item> </el-form-item> -->
<!-- <el-form-item <!-- <el-form-item
label="机床组件id" label="机床组件id"
prop="componentId" prop="componentId"
@ -38,7 +86,7 @@
/> />
</el-select> </el-select>
</el-form-item> --> </el-form-item> -->
<el-form-item <!-- <el-form-item
label="报警等级" label="报警等级"
prop="alarmLevel" prop="alarmLevel"
> >
@ -71,7 +119,7 @@
end-placeholder="结束日期" end-placeholder="结束日期"
:default-time="['00:00:00', '23:59:59']" :default-time="['00:00:00', '23:59:59']"
/> />
</el-form-item> </el-form-item> -->
<!-- <el-form-item <!-- <el-form-item
label="最新报警时间" label="最新报警时间"
prop="latestAlarmTime" prop="latestAlarmTime"
@ -285,6 +333,7 @@
import * as EquipAlarmDataApi from "@/api/system/alarm/equipalarmdata"; import * as EquipAlarmDataApi from "@/api/system/alarm/equipalarmdata";
import EquipAlarmDataForm from "./EquipAlarmDataForm.vue"; import EquipAlarmDataForm from "./EquipAlarmDataForm.vue";
import * as EquipInfoApi from "@/api/system/equip/equipInfo"; import * as EquipInfoApi from "@/api/system/equip/equipInfo";
import { getCustomerSelection } from "@/api/system/baseData/customerInfo";
import { import {
getEquipCascader, getEquipCascader,
getEquipSelection, getEquipSelection,
@ -318,22 +367,32 @@ export default {
queryParams: { queryParams: {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
equipId: null, customerId: null,
componentId: null, equipNo: null,
alarmLevel: null,
alarmType: 1,
firstAlarmTime: [],
latestAlarmTime: [],
status: null, status: null,
equipAnalyseStatus: null, // equipId: null,
// componentId: null,
// alarmLevel: null,
// alarmType: 1,
// firstAlarmTime: [],
// latestAlarmTime: [],
// status: null,
// equipAnalyseStatus: null,
}, },
equipSelection: [], equipSelection: [],
customerSelection: [],
}; };
}, },
created() { created() {
this.getList(); this.getList();
this.getCustomerSelect();
}, },
methods: { methods: {
getCustomerSelect() {
getCustomerSelection().then((res) => {
this.customerSelection = res;
});
},
cascaderChange(value) { cascaderChange(value) {
if (value.length > 0) { if (value.length > 0) {
this.queryParams.equipId = value[1]; this.queryParams.equipId = value[1];
@ -348,6 +407,7 @@ export default {
// const res = await EquipAlarmDataApi.getEquipAlarmDataPage( // const res = await EquipAlarmDataApi.getEquipAlarmDataPage(
// this.queryParams // this.queryParams
// ); // );
console.log("查询参数:", this.queryParams);
const res = await EquipInfoApi.getEquipInfoPage(this.queryParams); const res = await EquipInfoApi.getEquipInfoPage(this.queryParams);
await getEquipCascader().then((res) => { await getEquipCascader().then((res) => {
res.forEach((item) => { res.forEach((item) => {