设备报警和趋势报警菜单展示更新

This commit is contained in:
zhangjunwen 2024-09-20 15:21:54 +08:00
parent 6603fc3acb
commit 6a19cccaef
2 changed files with 41 additions and 26 deletions

View File

@ -10,13 +10,17 @@
label-width="68px" label-width="68px"
style="text-align:right" style="text-align:right"
> >
<el-form-item label="机床设备" prop="equipId"> <el-form-item
label="机床设备"
prop="equipId"
>
<el-cascader <el-cascader
v-model="cascaderValue" v-model="cascaderValue"
:options="equipCascader" :options="equipCascader"
:props="{ value: 'id',label: 'name',children: 'children'}" :props="{ value: 'id',label: 'name',children: 'children'}"
clearable clearable
@change="cascaderChange"></el-cascader> @change="cascaderChange"
></el-cascader>
</el-form-item> </el-form-item>
<!-- <el-form-item <!-- <el-form-item
label="机床组件id" label="机床组件id"
@ -284,7 +288,10 @@
<script> <script>
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 {getEquipCascader, getEquipSelection} from "@/api/system/equip/equipInfo"; import {
getEquipCascader,
getEquipSelection,
} from "@/api/system/equip/equipInfo";
export default { export default {
name: "EquipAlarmData", name: "EquipAlarmData",
components: { components: {
@ -292,7 +299,7 @@ export default {
}, },
data() { data() {
return { return {
cascaderValue:[], cascaderValue: [],
equipCascader: [], equipCascader: [],
// //
loading: true, loading: true,
@ -321,6 +328,7 @@ export default {
latestAlarmTime: [], latestAlarmTime: [],
status: null, status: null,
equipAnalyseStatus: null, equipAnalyseStatus: null,
alarmType: 0,
}, },
equipSelection: [], equipSelection: [],
}; };
@ -329,10 +337,10 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
cascaderChange(value){ cascaderChange(value) {
if (value.length > 0){ if (value.length > 0) {
this.queryParams.equipId = value[1]; this.queryParams.equipId = value[1];
}else { } else {
this.queryParams.equipId = null; this.queryParams.equipId = null;
} }
}, },
@ -343,14 +351,14 @@ export default {
const res = await EquipAlarmDataApi.getEquipAlarmDataPage( const res = await EquipAlarmDataApi.getEquipAlarmDataPage(
this.queryParams this.queryParams
); );
await getEquipCascader().then(res=>{ await getEquipCascader().then((res) => {
res.forEach(item=>{ res.forEach((item) => {
if (item.children == null){ if (item.children == null) {
item.disabled = true; item.disabled = true;
} }
}) });
this.equipCascader = res; this.equipCascader = res;
}) });
this.list = res.data.list; this.list = res.data.list;
this.total = res.data.total; this.total = res.data.total;
} finally { } finally {

View File

@ -10,13 +10,17 @@
label-width="68px" label-width="68px"
style="text-align:right" style="text-align:right"
> >
<el-form-item label="机床设备" prop="equipId"> <el-form-item
label="机床设备"
prop="equipId"
>
<el-cascader <el-cascader
v-model="cascaderValue" v-model="cascaderValue"
:options="equipCascader" :options="equipCascader"
:props="{ value: 'id',label: 'name',children: 'children'}" :props="{ value: 'id',label: 'name',children: 'children'}"
clearable clearable
@change="cascaderChange"></el-cascader> @change="cascaderChange"
></el-cascader>
</el-form-item> </el-form-item>
<!-- <el-form-item <!-- <el-form-item
label="机床组件id" label="机床组件id"
@ -202,7 +206,7 @@
<span>{{ parseTime(scope.row.latestAlarmTime) }}</span> <span>{{ parseTime(scope.row.latestAlarmTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <!-- <el-table-column
label="状态" label="状态"
align="center" align="center"
prop="status" prop="status"
@ -213,7 +217,7 @@
:value="scope.row.status" :value="scope.row.status"
/> />
</template> </template>
</el-table-column> </el-table-column> -->
<el-table-column <el-table-column
label="状态" label="状态"
align="center" align="center"
@ -275,7 +279,10 @@
<script> <script>
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 {getEquipCascader, getEquipSelection} from "@/api/system/equip/equipInfo"; import {
getEquipCascader,
getEquipSelection,
} from "@/api/system/equip/equipInfo";
export default { export default {
name: "EquipAlarmData", name: "EquipAlarmData",
components: { components: {
@ -283,7 +290,7 @@ export default {
}, },
data() { data() {
return { return {
cascaderValue:[], cascaderValue: [],
equipCascader: [], equipCascader: [],
// //
loading: true, loading: true,
@ -321,10 +328,10 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
cascaderChange(value){ cascaderChange(value) {
if (value.length > 0){ if (value.length > 0) {
this.queryParams.equipId = value[1]; this.queryParams.equipId = value[1];
}else { } else {
this.queryParams.equipId = null; this.queryParams.equipId = null;
} }
}, },
@ -335,14 +342,14 @@ export default {
const res = await EquipAlarmDataApi.getEquipAlarmDataPage( const res = await EquipAlarmDataApi.getEquipAlarmDataPage(
this.queryParams this.queryParams
); );
await getEquipCascader().then(res=>{ await getEquipCascader().then((res) => {
res.forEach(item=>{ res.forEach((item) => {
if (item.children == null){ if (item.children == null) {
item.disabled = true; item.disabled = true;
} }
}) });
this.equipCascader = res; this.equipCascader = res;
}) });
this.list = res.data.list; this.list = res.data.list;
this.total = res.data.total; this.total = res.data.total;
} finally { } finally {