2025-09-22 09:01:41 +08:00
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<div class="titleBox">
|
2025-09-22 14:21:17 +08:00
|
|
|
<page-title title="单位管理" />
|
2025-09-22 09:01:41 +08:00
|
|
|
</div>
|
|
|
|
|
<!-- 搜索 -->
|
|
|
|
|
<div ref="searchBox">
|
|
|
|
|
<Search :searchArr="searchConfiger" @submit="onSearch"></Search>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 表格 -->
|
|
|
|
|
<div class="tabBox">
|
|
|
|
|
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
|
|
|
|
|
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth">
|
|
|
|
|
<template #bxxLx="{ row }">
|
|
|
|
|
<DictTag :value="row.bxxLx" :tag="false" :options="D_BZ_BXDLX" />
|
|
|
|
|
</template>
|
|
|
|
|
<template #bxds="{ row }">
|
|
|
|
|
<div>{{ row.bxds?.length }}</div>
|
|
|
|
|
</template>
|
|
|
|
|
<!-- 操作 -->
|
|
|
|
|
<template #controls="{ row }">
|
2025-09-22 18:11:34 +08:00
|
|
|
<el-link type="primary" @click="addEdit('view', row)">详情</el-link>
|
2025-09-22 09:01:41 +08:00
|
|
|
</template>
|
|
|
|
|
</MyTable>
|
2025-09-22 14:21:17 +08:00
|
|
|
|
2025-09-22 09:01:41 +08:00
|
|
|
<Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="pageData.tableHeight" :pageConfiger="{
|
|
|
|
|
...pageData.pageConfiger,
|
|
|
|
|
total: pageData.total
|
|
|
|
|
}"></Pages>
|
2025-09-22 17:25:44 +08:00
|
|
|
|
2025-09-22 18:11:34 +08:00
|
|
|
<ViewDetailsDialog ref="detailsRef" v-model="visible" />
|
2025-09-22 09:01:41 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
|
import { onMounted, reactive, ref } from "vue";
|
|
|
|
|
import MyTable from '@/components/aboutTable/MyTable.vue';
|
|
|
|
|
import Pages from '@/components/aboutTable/Pages.vue';
|
|
|
|
|
import Search from '@/components/aboutTable/Search.vue';
|
2025-09-22 14:21:17 +08:00
|
|
|
import PageTitle from '@/components/aboutTable/PageTitle.vue';
|
2025-09-22 17:25:44 +08:00
|
|
|
import ViewDetailsDialog from "./components/viewDetailsDialog.vue";
|
2025-09-22 09:01:41 +08:00
|
|
|
import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js";
|
|
|
|
|
|
2025-09-22 17:25:44 +08:00
|
|
|
const visible = ref(false);
|
2025-09-22 09:01:41 +08:00
|
|
|
const searchBox = ref(null);
|
2025-09-22 18:11:34 +08:00
|
|
|
const detailsRef = ref(null);
|
2025-09-22 09:01:41 +08:00
|
|
|
const D_BZ_BXDLX = ref([]);
|
|
|
|
|
const searchConfiger = ref([
|
|
|
|
|
{
|
|
|
|
|
label: "巡逻路线名称",
|
|
|
|
|
prop: "bxxMc",
|
|
|
|
|
placeholder: "巡逻路线名称",
|
|
|
|
|
showType: "input"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "所属辖区",
|
|
|
|
|
prop: "ssbmdm",
|
|
|
|
|
placeholder: "分县局",
|
|
|
|
|
showType: "department"
|
|
|
|
|
}
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
const pageData = reactive({
|
2025-09-22 17:16:08 +08:00
|
|
|
tableData: [{}],
|
2025-09-22 09:01:41 +08:00
|
|
|
keyCount: 0,
|
|
|
|
|
tableConfiger: {
|
|
|
|
|
rowHieght: 61,
|
|
|
|
|
showSelectType: "null",
|
|
|
|
|
loading: false
|
|
|
|
|
},
|
|
|
|
|
total: 0,
|
|
|
|
|
pageConfiger: {
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
pageCurrent: 1
|
|
|
|
|
},
|
|
|
|
|
controlsWidth: 180,
|
|
|
|
|
tableColumn: [
|
|
|
|
|
{ label: "姓名", prop: "bxxMc" },
|
|
|
|
|
{ label: "证件号码", prop: "ssbm" },
|
|
|
|
|
{ label: "巡逻路线类型", prop: "bxxLx", showSolt: true },
|
|
|
|
|
{ label: "巡逻点位数量", prop: "bxds", showSolt: true }
|
|
|
|
|
]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 表格高度计算
|
|
|
|
|
const tabHeightFn = () => {
|
|
|
|
|
pageData.tableHeight =
|
|
|
|
|
window.innerHeight - searchBox.value.offsetHeight - 250;
|
|
|
|
|
window.onresize = function () {
|
|
|
|
|
tabHeightFn();
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const getList = async () => {
|
|
|
|
|
try {
|
|
|
|
|
pageData.tableConfiger.loading = true;
|
|
|
|
|
const res = await qcckGet({
|
|
|
|
|
...pageData.pageConfiger,
|
|
|
|
|
}, `/mosty-base/baxx/dwgl/page`)
|
|
|
|
|
|
|
|
|
|
if(res) {
|
|
|
|
|
pageData.tableData = res.records || [];
|
|
|
|
|
pageData.total = res.total;
|
|
|
|
|
}
|
|
|
|
|
} finally {
|
|
|
|
|
pageData.tableConfiger.loading = false;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2025-09-22 18:11:34 +08:00
|
|
|
const addEdit = (type, row) => {
|
|
|
|
|
detailsRef.value.open(row, type);
|
|
|
|
|
}
|
2025-09-22 09:01:41 +08:00
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
tabHeightFn();
|
|
|
|
|
getList();
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
|
|
|
|
|
</style>
|