Commit 624e1196 authored by 王晓倩's avatar 王晓倩

报警信息列表页

parent 95deac6b
...@@ -215,7 +215,6 @@ export default { ...@@ -215,7 +215,6 @@ export default {
this.deviceAlarmList = response.rows; this.deviceAlarmList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
console.log("this.deviceAlarmList",this.deviceAlarmList)
}); });
}, },
getInspectorList(){ getInspectorList(){
...@@ -233,100 +232,74 @@ export default { ...@@ -233,100 +232,74 @@ export default {
this.open = false; this.open = false;
this.reset(); this.reset();
}, },
data() { // 表单重置
return { reset() {
// 遮罩层 this.form = {
loading: true, orderId: null,
// 导出遮罩层 orderType: null,
exportLoading: false, orderName: null,
// 选中数组 orderStatus: "0",
ids: [], createTime: null,
// 非单个禁用 appointInspector: null,
single: true, allotTime: null,
// 非多个禁用 actualInspector: null,
multiple: true, actualTime: null,
// 显示搜索条件 remarks: null
showSearch: true,
// 总条数
total: 0,
// 报警信息表格数据
deviceAlarmList: [],
// 报警类型字典
typeOptions: [],
// 设备级联
options: [],
props: {
multiple: true,
value: "id",
label: "name",
level: "level",
children: "childList",
},
devices: null,
// 巡检员列表
inspector: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
deviceId: null,
orderId: null,
alarmType: null,
alarmValue: null,
startTime: null,
endTime: null,
dealStatus: null
},
// 表单参数
form: {},
// 表单校验
rules: {
orderName: [
{ required: true, message: "工单名称不能为空", trigger: "blur" }
],
appointInspector: [
{ required: true, message: "请选择巡检人员", trigger: "blur" }
],
}
}; };
this.resetForm("form");
}, },
created() { /** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList(); this.getList();
this.getDicts("t_alarm_type").then(response => { },
this.typeOptions = response.data; /** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.alarmId)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 下发按钮操作 */
handleIssue(row) {
this.reset();
this.getInspectorList();
const alarmId = row.alarmId || this.ids
getDeviceAlarm(alarmId).then(response => {
this.form = response.data;
this.open = true;
this.title = "填写工单信息";
}); });
}, },
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
this.form.resourceId = this.form.alarmId;
this.form.orderType = "3";
addBasicsInfo(this.form).then(response => {
this.msgSuccess("生成工单成功");
this.open = false;
this.getList();
});
}
});
},
/** 工单详细信息跳转 */
showDetail(row) {
this.$router.push({ /** 提交按钮 */
path: '/deviceAlarm/alarmdetail', submitForm() {
query: { this.$refs["form"].validate(valid => {
alarmId: row.alarmId if (valid) {
} this.form.resourceId = this.form.alarmId;
}) //带参跳转 this.form.orderType = "3";
addBasicsInfo(this.form).then(response => {
this.msgSuccess("生成工单成功");
this.open = false;
this.getList();
});
}
});
},
/** 工单详细信息跳转 */
showDetail(row) {
}, this.$router.push({
} path: '/deviceAlarm/alarmdetail',
}; query: {
</script> alarmId: row.alarmId
\ No newline at end of file }
}) //带参跳转
},
}
};
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment