Bläddra i källkod

预警列表搜索

master
wwp 3 månader sedan
förälder
incheckning
352858d95c
1 ändrade filer med 13 tillägg och 10 borttagningar
  1. +13
    -10
      SafeCampus.WEB/src/views/warn/zjrq/index.vue

+ 13
- 10
SafeCampus.WEB/src/views/warn/zjrq/index.vue Visa fil

@@ -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>


Laddar…
Avbryt
Spara