范围配置入口
This commit is contained in:
parent
c31551eaf7
commit
94a4fb6726
@ -69,11 +69,6 @@ const list = reactive([
|
|||||||
label: '发布管理',
|
label: '发布管理',
|
||||||
icon: 'app_registration',
|
icon: 'app_registration',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: '/dataManage/rangeManage',
|
|
||||||
label: '范围配置',
|
|
||||||
icon: 'app_registration',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: '/dataManage/lineInfo',
|
path: '/dataManage/lineInfo',
|
||||||
label: '线路信息管理',
|
label: '线路信息管理',
|
||||||
|
@ -33,6 +33,12 @@
|
|||||||
label="预览"
|
label="预览"
|
||||||
:to="`/linemap/${props.row.lineId}/${props.row.type}`"
|
:to="`/linemap/${props.row.lineId}/${props.row.type}`"
|
||||||
/>
|
/>
|
||||||
|
<q-btn
|
||||||
|
color="primary"
|
||||||
|
:disable="operateDisabled"
|
||||||
|
label="范围配置"
|
||||||
|
:to="`/dataManage/publish`"
|
||||||
|
/>
|
||||||
<q-btn
|
<q-btn
|
||||||
color="red"
|
color="red"
|
||||||
:disable="operateDisabled"
|
:disable="operateDisabled"
|
||||||
|
@ -1,100 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import { QTable, QTableColumn } from 'quasar';
|
|
||||||
import { onMounted, ref } from 'vue';
|
|
||||||
import { getDeviceAreaList, type IAreaConfigListItem } from '../api/ConfigApi';
|
|
||||||
|
|
||||||
const tableRef = ref<QTable>();
|
|
||||||
const columns: QTableColumn[] = [
|
|
||||||
{
|
|
||||||
name: 'id',
|
|
||||||
label: 'id',
|
|
||||||
field: 'id',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'lineId',
|
|
||||||
label: '线路',
|
|
||||||
field: 'lineId',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'areaName',
|
|
||||||
label: '范围名称',
|
|
||||||
field: 'areaName',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'deviceType',
|
|
||||||
label: '设备类型',
|
|
||||||
field: 'deviceType',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
const rows = ref<IAreaConfigListItem[]>([]);
|
|
||||||
const loading = ref(false);
|
|
||||||
const pagination = ref({
|
|
||||||
sortBy: 'desc',
|
|
||||||
descending: false,
|
|
||||||
page: 1,
|
|
||||||
rowsPerPage: 10,
|
|
||||||
rowsNumber: 10,
|
|
||||||
});
|
|
||||||
|
|
||||||
const onRequest: QTable['onRequest'] = async (props) => {
|
|
||||||
const { page, rowsPerPage } = props.pagination;
|
|
||||||
loading.value = true;
|
|
||||||
const resp = await getDeviceAreaList({ current: page, size: rowsPerPage });
|
|
||||||
pagination.value.page = resp.current;
|
|
||||||
pagination.value.rowsNumber = resp.total;
|
|
||||||
pagination.value.rowsPerPage = resp.size;
|
|
||||||
rows.value = resp.records;
|
|
||||||
loading.value = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
tableRef.value?.requestServerInteraction();
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<div class="q-pa-md">
|
|
||||||
<q-table
|
|
||||||
ref="tableRef"
|
|
||||||
title="范围配置"
|
|
||||||
:rows="rows"
|
|
||||||
:columns="columns"
|
|
||||||
row-key="id"
|
|
||||||
v-model:pagination="pagination"
|
|
||||||
:rows-per-page-options="[10, 20, 50, 100]"
|
|
||||||
:loading="loading"
|
|
||||||
binary-state-sort
|
|
||||||
@request="onRequest"
|
|
||||||
>
|
|
||||||
<!-- <template v-slot:top-right>
|
|
||||||
<q-input
|
|
||||||
dense
|
|
||||||
debounce="1000"
|
|
||||||
v-model="filter.name"
|
|
||||||
label="名称"
|
|
||||||
></q-input>
|
|
||||||
<q-btn flat round color="primary" icon="search" />
|
|
||||||
</template> -->
|
|
||||||
|
|
||||||
<!-- <template v-slot:body-cell-operations="props">
|
|
||||||
<q-td :props="props">
|
|
||||||
<div class="q-gutter-sm row justify-center">
|
|
||||||
<q-btn
|
|
||||||
color="primary"
|
|
||||||
:disable="operateDisabled"
|
|
||||||
label="预览"
|
|
||||||
:to="`/linemap/${props.row.lineId}/${props.row.type}`"
|
|
||||||
/>
|
|
||||||
<q-btn
|
|
||||||
color="red"
|
|
||||||
:disable="operateDisabled"
|
|
||||||
label="删除"
|
|
||||||
@click="deleteData(props.row)"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</q-td>
|
|
||||||
</template> -->
|
|
||||||
</q-table>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
@ -35,11 +35,6 @@ const routes: RouteRecordRaw[] = [
|
|||||||
name: 'publish',
|
name: 'publish',
|
||||||
component: () => import('pages/PublishManage.vue'),
|
component: () => import('pages/PublishManage.vue'),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: 'rangeManage',
|
|
||||||
name: 'rangeManage',
|
|
||||||
component: () => import('pages/RangeManage.vue'),
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: 'lineInfo',
|
path: 'lineInfo',
|
||||||
name: 'lineInfo',
|
name: 'lineInfo',
|
||||||
|
Loading…
Reference in New Issue
Block a user