This commit is contained in:
13684185576
2025-07-16 19:44:39 +08:00
parent 224fddb6af
commit 46fb5f3ce5
1122 changed files with 243510 additions and 0 deletions

View File

@ -0,0 +1,123 @@
<template>
<div class="dialog" v-if="dialogForm">
<div class="head_box">
<span class="title">详情</span>
<div>
<el-button size="small" @click="close">关闭</el-button>
</div>
</div>
<div class="cntinfo">
<FormMessage ref="FormRef" v-model="listQuery" :rules="rules" :formList="formList" @change="handleChange">
</FormMessage>
</div>
</div>
</template>
<script setup>
import { qcckGet } from "@/api/qcckApi.js";
import FormMessage from "@/components/aboutTable/FormMessage.vue";
import MyTable from "@/components/aboutTable/MyTable.vue";
import { ref, reactive } from 'vue';
const dialogForm = ref(false);
const listQuery = ref({});
const formList = reactive([
[
{ label: "日期", prop: "sbrq", type: "input" },
{ label: "所属辖区", prop: "ssxq", type: "input" },
],
[
{ label: "巡逻路线", prop: "xllx", type: "input" },
{ label: "地址", prop: "dz", type: "input" },
],
[
{ label: "上报人", prop: "sbrxm", type: "input" },
{ label: "街面状况", prop: "jmzk", type: "date" },
],
[
{ label: "状况描述", prop: "zkms", type: "input" },
],
])
// 初始化数据
const init = (row) => {
dialogForm.value = true;
pageData.tableConfiger.loading = true;
qcckGet({}, `/mosty-jbld/jbjmzk/${row.id}`).then(res => {
listQuery.value = res || [];
pageData.tableConfiger.loading = false;
pageData.tableData = [...res.mjList, ...res.baList]
}).catch(() => {
pageData.tableConfiger.loading = false;
})
};
const close = () => {
dialogForm.value = false;
};
defineExpose({ init })
</script>
<style lang="scss" scoped>
.dialog {
padding: 20px;
:deep(.el-form-item__label) {
background-color: #F7FAFB;
padding: 0px 8px;
color: #000;
font-weight: 500;
border: 1px solid #E3E7ED;
}
.head_box {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
}
.cntinfo {
height: calc(100% - 70px);
overflow: hidden;
overflow-y: auto;
}
.form-row {
display: flex;
.el-form-item {
flex: 1;
}
}
.image-group {
display: flex;
gap: 10px;
flex-wrap: wrap;
.image-item {
width: 150px;
height: 150px;
border: 1px solid #dcdfe6;
.el-image {
width: 100%;
height: 100%;
}
}
}
::v-deep .el-input__inner {
height: 36px !important;
line-height: 36px !important;
border-radius: 0;
color: #777575;
}
}
.el-form-item--default {
margin-bottom: 0px;
}
</style>

View File

@ -0,0 +1,120 @@
<template>
<div class="titleBox">
<PageTitle title="街面状况"></PageTitle>
</div>
<!-- 搜索 -->
<div ref="searchBox">
<Search :searchArr="searchConfiger" @submit="onSearch" :key="pageData.keyCount" />
</div>
<!-- 表格 -->
<div class="tabBox">
<MyTable :tableData="pageData.tableData" :tableColumn="pageData.tableColumn" :tableHeight="pageData.tableHeight"
:key="pageData.keyCount" :tableConfiger="pageData.tableConfiger" :controlsWidth="pageData.controlsWidth">
<template #ddmjList="{ row }">
<span>{{ row.ddmjList.length }}</span>
</template>
<template #controls="{ row }">
<el-link type="primary" link @click="addEdit(row)">详情</el-link>
</template>
</MyTable>
<Pages @changeNo="changeNo" @changeSize="changeSize" :tableHeight="pageData.tableHeight" :pageConfiger="{
...pageData.pageConfiger,
total: pageData.total
}"></Pages>
</div>
<!-- 详情 -->
<DetailForm ref="detailDiloag" />
</template>
<script setup>
import Pages from "@/components/aboutTable/Pages.vue";
import MyTable from "@/components/aboutTable/MyTable.vue";
import Search from "@/components/aboutTable/Search.vue";
import DetailForm from "./components/detailForm.vue";
import PageTitle from "@/components/aboutTable/PageTitle.vue";
import { qcckGet } from "@/api/qcckApi.js";
import { reactive, ref, onMounted, getCurrentInstance } from "vue";
const searchBox = ref(); //搜索框
const detailDiloag = ref();
const searchConfiger = ref([
{
label: "勤务名称",
prop: "qwmc",
placeholder: "请输入勤务名称",
showType: "input"
}
]);
const queryFrom = ref({});
const pageData = reactive({
tableData: [],
keyCount: 0,
tableConfiger: {
rowHieght: 61,
showSelectType: "null",
loading: false,
showIndex: true
},
total: 5,
pageConfiger: {
pageSize: 20,
pageCurrent: 1
},
controlsWidth: 100,
tableColumn: [
{ label: "辖区", prop: "ssxq" },
{ label: "日期", prop: "sbrq" },
{ label: "巡逻路线", prop: "xllx" },
{ label: "上报人", prop: "sbrxm" },
]
});
onMounted(() => {
getList();
tabHeightFn();
});
// 搜索
const onSearch = (val) => {
queryFrom.value = { ...val };
pageData.pageConfiger.pageCurrent = 1;
getList();
};
const changeNo = val => {
pageData.pageConfiger.pageCurrent = val;
getList();
};
const changeSize = val => {
pageData.pageConfiger.pageSize = val;
getList();
};
// 获取列表
const getList = (val) => {
pageData.tableConfiger.loading = true;
let data = { ...pageData.pageConfiger, ...queryFrom.value };
qcckGet(data, "/mosty-jbld/jbjmzk/selelctPage")
.then((res) => {
pageData.tableData = res.records || [];
pageData.total=res.total
pageData.tableConfiger.loading = false;
})
.catch(() => {
pageData.tableConfiger.loading = false;
});
};
const addEdit = (row) => {
detailDiloag.value.init(row);
};
// 表格高度计算
const tabHeightFn = () => {
pageData.tableHeight =
window.innerHeight - searchBox.value.offsetHeight - 230;
window.onresize = function () {
tabHeightFn();
};
};
</script>
<style></style>