添加查询状态-liyuchen

This commit is contained in:
李宇辰 2023-04-27 14:46:07 +08:00
parent 90637718d5
commit 6771a91e40
1 changed files with 12 additions and 1 deletions

View File

@ -5,6 +5,11 @@
v-model="state.search.disasterType">
<el-option v-for="(item, index) in state.dictList" :value="item.dictKey" :key="index" :label="item.dictValue" />
</el-select>
<el-select class="form-select" style="margin-left: 10px;" size="default" clearable placeholder="Disaster Status"
v-model="state.search.disasterStatus">
<el-option value="2" label="Responding"/>
<el-option value="3" label="Responded"/>
</el-select>
<el-input type="text" class="form-control" size="default" clearable placeholder="Disaster Country"
v-model="state.search.disasterCountry" />
<el-button size="default" type="primary" class="ml10" @click="getDisasterTable">
@ -40,7 +45,8 @@ const emit = defineEmits(["click"]);
const props = defineProps({
//
status: {
type: Number
type: Number,
default: 2
},
})
const state = reactive({
@ -76,6 +82,7 @@ const getDictBizData = () => {
}
//
const getDisasterTable = () => {
convert();
getPage(state.disasterData.param.pageNum, state.disasterData.param.pageSize, state.search).then(res => {
state.disasterData.data = res.records;
state.disasterData.data.forEach(item => {
@ -85,6 +92,10 @@ const getDisasterTable = () => {
state.disasterData.total = res.total;
})
}
//
const convert = () => {
state.search.disasterStatus ? state.search.respondStatus = state.search.disasterStatus : state.search.respondStatus = 2
}
//
const onHandleDisasterSizeChange = (val) => {
state.disasterData.param.pageSize = val;