update StatusAndParams
This commit is contained in:
@@ -105,7 +105,12 @@ export default {
|
||||
}
|
||||
this.listEq.splice(0);
|
||||
},
|
||||
handleSearch() {},
|
||||
handleSearch() {
|
||||
this.$emit('action', {
|
||||
action: 'search',
|
||||
payload: this.form,
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 搜索工作栏 -->
|
||||
<SearchBarNew v-model="searchBarForm" />
|
||||
<SearchBarNew v-model="searchBarForm" @action="handleSearchBarActions" />
|
||||
|
||||
<!-- 列表 -->
|
||||
<base-table
|
||||
@@ -128,13 +128,31 @@ export default {
|
||||
list: [],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
handleEmitFun(val) {
|
||||
console.log('你好', val);
|
||||
if (val.action === '状态可视化') {
|
||||
/**
|
||||
* 处理表格按钮点击事件
|
||||
* @param {string} action 按钮名称
|
||||
* @param {object} value 按钮数据(行数据) { equipmentId, equipmentCode, equipmentName, inQuantity, outQuantity, run, status, error, quantityRecordTime, statusRecordTime}
|
||||
*/
|
||||
handleEmitFun({ action, value: row } = {}) {
|
||||
if (action === '状态可视化') {
|
||||
// 状态可视化
|
||||
} else {
|
||||
} else if (action === '参数监控') {
|
||||
// 参数监控
|
||||
// 接口需要 equipmentId recordTime workOrderId 工单id
|
||||
this.$router.push({
|
||||
// path: '/equipment/monitor/full-params',
|
||||
name: 'EquipmentFullParams',
|
||||
params: {
|
||||
equipmentId: row.equipmentId,
|
||||
equipmentCode: row.equipmentCode,
|
||||
equipmentName: row.equipmentName,
|
||||
},
|
||||
});
|
||||
} else {
|
||||
}
|
||||
},
|
||||
/** 查询列表 */
|
||||
@@ -172,9 +190,25 @@ export default {
|
||||
// };
|
||||
// this.resetForm('form');
|
||||
// },
|
||||
handleSearchBarActions({ action, payload }) {
|
||||
switch (action) {
|
||||
case 'search':
|
||||
this.handleQuery();
|
||||
break;
|
||||
case 'reset':
|
||||
this.resetQuery();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNo = 1;
|
||||
this.queryParams = {
|
||||
...this.queryParams,
|
||||
...this.searchBarForm,
|
||||
pageNo: 1,
|
||||
};
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
|
||||
Reference in New Issue
Block a user