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

报警信息列表页

parent 95deac6b
......@@ -215,7 +215,6 @@ export default {
this.deviceAlarmList = response.rows;
this.total = response.total;
this.loading = false;
console.log("this.deviceAlarmList",this.deviceAlarmList)
});
},
getInspectorList(){
......@@ -233,100 +232,74 @@ export default {
this.open = false;
this.reset();
},
data() {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
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" }
],
}
// 表单重置
reset() {
this.form = {
orderId: null,
orderType: null,
orderName: null,
orderStatus: "0",
createTime: null,
appointInspector: null,
allotTime: null,
actualInspector: null,
actualTime: null,
remarks: null
};
this.resetForm("form");
},
created() {
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
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',
query: {
alarmId: row.alarmId
}
}) //带参跳转
/** 提交按钮 */
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) {
},
}
};
</script>
\ No newline at end of file
this.$router.push({
path: '/deviceAlarm/alarmdetail',
query: {
alarmId: row.alarmId
}
}) //带参跳转
},
}
};
</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