|
|
@@ -17,8 +17,8 @@ |
|
|
|
<TreeFilter |
|
|
|
ref="treeFilters" |
|
|
|
title="预警类型" |
|
|
|
label="name" |
|
|
|
id="code" |
|
|
|
label="label" |
|
|
|
id="value" |
|
|
|
:isData="true" |
|
|
|
width="300px" |
|
|
|
:data="warnOptions" |
|
|
@@ -26,7 +26,7 @@ |
|
|
|
></TreeFilter> |
|
|
|
|
|
|
|
<div class="table-box"> |
|
|
|
<ProTable ref="proTable" :searchCol="3" title="预警列表" :columns="columns" :request-api="warnZJRQApi.page"> |
|
|
|
<ProTable ref="proTable" :searchCol="3" title="预警列表" :columns="columns" :request-api="warnZJRQApi.page" @reset="resetRecords"> |
|
|
|
<!-- 表格 header 按钮 --> |
|
|
|
<template #tableHeader="scope"> |
|
|
|
<!-- <s-button suffix="预警" @click="onOpen(FormOptEnum.ADD)" /> --> |
|
|
@@ -177,18 +177,18 @@ function toHandle(opt: FormOptEnum, record: {} | ZJRQ.WarnInfo= {}) { |
|
|
|
} |
|
|
|
let warnOptions = ref([]); |
|
|
|
function getWarnTypeList() { |
|
|
|
warnOptions.value = [] |
|
|
|
setTimeout(async ()=> { |
|
|
|
await warnZJRQApi.warnType({}).then((res:any) => { |
|
|
|
let { code, data } = res; |
|
|
|
|
|
|
|
if (code == 200) { |
|
|
|
warnOptions.value = data; |
|
|
|
// warnOptions.value = data.map((item:any) => { |
|
|
|
// return { |
|
|
|
// label: item.name, |
|
|
|
// value: item.code |
|
|
|
// }; |
|
|
|
// }) |
|
|
|
warnOptions.value = data.map((item:any) => { |
|
|
|
return { |
|
|
|
label: item.name, |
|
|
|
value: item.code |
|
|
|
}; |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
}); |
|
|
@@ -373,6 +373,9 @@ function changeType(val: number | string) { |
|
|
|
proTable.value!.searchParam.alarmType = val; |
|
|
|
proTable.value!.search(); |
|
|
|
} |
|
|
|
function resetRecords() { |
|
|
|
getWarnTypeList() |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|