同步6/16

This commit is contained in:
Zy
2026-06-01 18:12:58 +08:00
parent 38274ab612
commit 50e7b14fd6
183 changed files with 8956 additions and 4803 deletions

View File

@@ -77,15 +77,21 @@
<el-table-column label="持有人" align="center" prop="residentName" />
<el-table-column label="审核状态" align="center" prop="checkStatus">
<template #default="scope">
<dict-tag :options="com_review" :value="scope.row.checkStatus" />
<dict-tag :options="com_review" :value="scope.row.checkStatus ?? '0'" />
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip />
<el-table-column label="操作" width="180" align="center" fixed="right" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" v-if="scope.row.checkStatus === '0'" @click="handleMain(scope.row)" v-hasPermi="['parking:parking:query']"
<el-button
link
type="primary"
v-if="scope.row.checkStatus === '0'"
@click="handleReview(scope.row)"
v-hasPermi="['parking:parking:query']"
>审核</el-button
>
<el-button link type="primary" v-else @click="handleMain(scope.row)">详情</el-button>
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['parking:parking:edit']">编辑</el-button>
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['parking:parking:remove']">删除</el-button>
</template>
@@ -99,7 +105,7 @@
<script setup name="Parking" lang="ts">
import Pageheader from '@/components/Pageheader/index.vue';
import { listParking, getParking, delParking, addParking, updateParking } from '@/api/system/parking/index';
import { listParking, delParking } from '@/api/system/parking/index';
import { ParkingVO, ParkingQuery, ParkingForm } from '@/api/system/parking/type';
import { checkPermi } from '@/utils/permission';
@@ -122,14 +128,14 @@ const queryFormRef = ref<ElFormInstance>();
const initFormData: ParkingForm = {
id: undefined,
areaId: undefined,
parkingCode: undefined,
parkingCode: '',
parkingArea: undefined,
parkingStatus: undefined,
parkingStatus: '',
type: undefined,
residentId: undefined,
addTime: undefined,
addBy: undefined,
checkStatus: undefined,
checkStatus: '',
remark: undefined,
createBy: undefined,
createTime: undefined,
@@ -158,17 +164,16 @@ const AreaList = ref([]);
/** 查询车位管理列表 */
const getList = async () => {
loading.value = true;
const res = await listParking(queryParams.value);
parkingList.value = res.rows;
total.value = res.total;
loading.value = false;
listParking(queryParams.value)
.then((res) => {
parkingList.value = res.rows;
total.value = res.total;
})
.finally(() => {
loading.value = false;
});
};
function getAreaInfoById(id: string) {
const obj = AreaList.value.find((item) => item.id === id);
return `${obj.areaName}${obj.areaCode}`;
}
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.value.pageNum = 1;
@@ -197,7 +202,7 @@ const handleAdd = () => {
/** 修改按钮操作 */
const handleUpdate = async (row?: ParkingVO) => {
const _id = row.id || ids.value[0];
const _id = row ? row.id : ids.value[0];
router.push({
path: '/carArea/editParking',
query: {
@@ -206,6 +211,15 @@ const handleUpdate = async (row?: ParkingVO) => {
});
};
/** 审核按钮操作 */
const handleReview = async (row?: ParkingVO) => {
router.push({
path: '/carArea/parkingReview',
query: {
id: row.id
}
});
};
/** 车位审核 */
const handleMain = async (row?: ParkingVO) => {
router.push({
path: '/carArea/parkMain',
@@ -217,7 +231,7 @@ const handleMain = async (row?: ParkingVO) => {
/** 删除按钮操作 */
const handleDelete = async (row?: ParkingVO) => {
const _ids = row?.id || ids.value;
const _ids = row ? row.id : ids.value;
await proxy?.$modal.confirm('该信息删除后无法恢复,确定要删除吗?').finally(() => (loading.value = false));
await delParking(_ids);
proxy?.$modal.msgSuccess('删除成功');