修改报警请求间隔

master
夜笙歌 2 years ago
parent 5d890e8411
commit 0b5b30fd87

@ -9,3 +9,10 @@ export function alarmList(query) {
params: query
})
}
// 报警处理
export function alarmProcessing(query) {
return request({
url: '/basetyre/CollectMachineGps/handle/'+query,
method: 'get',
})
}

@ -30,6 +30,17 @@
<!-- 顶部操作按钮-->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
v-hasPermi="['basetyre:CollectMachineGps:handle']"
:disabled="single"
icon="Edit"
plain
type="success"
@click="handleUpdate"
>报警处理
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
v-hasPermi="['test:test:export']"
@ -84,10 +95,11 @@
</template>
<script name="Test" setup>
import {alarmList} from "@/api/realTimeMonitoring/alarmStatistics";
import {alarmList,alarmProcessing} from "@/api/realTimeMonitoring/alarmStatistics";
import {useI18n} from 'vue-i18n';
import Cookies from "js-cookie";
import {delBaseDevice, getBaseDevice} from "@/api/deviceManagement/info";
const {t} = useI18n();
@ -108,8 +120,6 @@ const showSearch = ref(true);
const ids = ref([]);
//
const single = ref(true);
//
const multiple = ref(true);
//
const total = ref(0);
//
@ -150,6 +160,19 @@ function handleExport() {
...queryParams.value
}, `post_${new Date().getTime()}.xlsx`);
}
/** 多选框选中数据 */
function handleSelectionChange(selection) {
ids.value = selection.map(item => item.id);
single.value = selection.length !== 1;
}
function handleUpdate(row) {
const postId = row.id || ids.value;
alarmProcessing(postId).then(() => {
proxy.$modal.msgSuccess('处理完成');
getList();
})
}
getList();
</script>

Loading…
Cancel
Save