feat: 调整管理页面代码

This commit is contained in:
niedongsheng 2026-04-27 15:28:20 +08:00
parent bdb22d2f15
commit 5981d19c6a
2 changed files with 16 additions and 9 deletions

View File

@ -63,12 +63,10 @@
</el-form-item>
</el-col>
<el-col :xs="24" :sm="24" :md="24" :lg="24">
<el-form-item>
<el-button type="primary" @click="handleQuery">查询</el-button>
<el-button @click="toReport">新增</el-button>
<!-- <el-button type="success" @click="handleExport">导出Excel</el-button> -->
<el-button @click="resetFilters">重置</el-button>
</el-form-item>
<div class="filter-button">
<el-button type="primary" @click="toReport">新增填报</el-button>
<el-button type="primary" color="#952DE6" @click="">导出</el-button>
</div>
</el-col>
</el-row>
</el-form>
@ -160,7 +158,7 @@
</template>
<script setup>
import { ref, reactive, onMounted } from 'vue'
import { ref, reactive, onMounted, watch } from 'vue'
import { ElMessage } from 'element-plus'
import { useRouter } from 'vue-router'
import { request } from '@/utils/request'
@ -201,6 +199,10 @@ const pagination = reactive({
total: 0
})
watch(() => filterForm, () => {
handleQuery()
}, { deep: true })
const getDistrictName = (districtId) => {
if (!options.value.area?.length) return '-'
return options.value.area.find((item) => item.value === districtId)?.label || '-'
@ -428,4 +430,9 @@ onMounted(() => {
border-top: 1px solid #ebeef5;
}
}
.filter-button {
display: flex;
justify-content: flex-end;
}
</style>

View File

@ -50,8 +50,8 @@ export function useOptions() {
options.value['disposalMeasures'] = [
{ label: '全幅封闭', value: '全幅封闭' },
{ label: '半幅封闭', value: '半幅封闭' },
{ label: '正常通行', value: '正常通行' },
{ label: '限制通行', value: '限制通行' }
{ label: '便道通行', value: '便道通行' },
{ label: '正常通行', value: '正常通行' }
]
// 冰灾 处理措施