同步6/16
This commit is contained in:
@@ -60,16 +60,17 @@
|
||||
|
||||
<el-table v-loading="loading" border :data="repairList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="报修房屋" align="center" prop="houseName" />
|
||||
<el-table-column label="报修房屋" align="center" show-overflow-tooltip prop="houseName" />
|
||||
<el-table-column label="维修项目" align="center" prop="maintenanceItemName" />
|
||||
<el-table-column label="标题" align="center" prop="item" />
|
||||
<el-table-column label="问题描述" align="center" prop="problem" />
|
||||
<el-table-column label="报修人" align="center" prop="residentName" />
|
||||
<el-table-column label="预约日期" align="center" prop="orderDate" width="180">
|
||||
<el-table-column label="报修人" width="100" align="center" prop="residentName" />
|
||||
<el-table-column label="预约日期" align="center" prop="orderDate" width="150">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.orderDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="维修状态" align="center" prop="problemStatus">
|
||||
<el-table-column label="维修状态" align="center" width="100" prop="problemStatus">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="com_repair_status" :value="scope.row.problemStatus || ''"></dict-tag>
|
||||
</template>
|
||||
@@ -94,8 +95,6 @@
|
||||
<script setup name="Repair" lang="ts">
|
||||
import { listRepair, delRepair } from '@/api/system/Repair/index';
|
||||
import { RepairVO, RepairQuery, RepairForm } from '@/api/system/Repair/type';
|
||||
import { listRepairProject } from '@/api/system/RepairProject';
|
||||
import { listResident } from '@/api/system/resident';
|
||||
import { checkPermi } from '@/utils/permission';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
@@ -103,7 +102,7 @@ const { com_repair_status } = toRefs<any>(proxy?.useDict('com_repair_status'));
|
||||
|
||||
interface repairlistType extends RepairVO {
|
||||
maintenanceItemPath?: string;
|
||||
residentName?: string;
|
||||
residentName: string;
|
||||
}
|
||||
const repairList = ref<repairlistType[]>([]);
|
||||
const loading = ref(true);
|
||||
@@ -164,10 +163,14 @@ const { queryParams, form, rules } = toRefs(data);
|
||||
/** 查询报修管理列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listRepair(queryParams.value);
|
||||
repairList.value = res.rows;
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
listRepair(queryParams.value)
|
||||
.then((res) => {
|
||||
repairList.value = res.rows;
|
||||
total.value = res.total;
|
||||
})
|
||||
.finally(() => {
|
||||
loading.value = false;
|
||||
});
|
||||
};
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
@@ -178,6 +181,8 @@ const handleQuery = () => {
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryParams.value.problemStatus = '';
|
||||
queryParams.value.orderDate = '';
|
||||
queryFormRef.value?.resetFields();
|
||||
handleQuery();
|
||||
};
|
||||
@@ -198,7 +203,7 @@ const handleAdd = () => {
|
||||
|
||||
/** 修改按钮操作 */
|
||||
const handleUpdate = async (row?: RepairVO) => {
|
||||
const _id = row.id || ids.value[0];
|
||||
const _id = row?.id || ids.value[0];
|
||||
router.push({
|
||||
path: '/repair/editRepair',
|
||||
query: {
|
||||
@@ -208,7 +213,7 @@ const handleUpdate = async (row?: RepairVO) => {
|
||||
};
|
||||
/** 分配人员 */
|
||||
const handleShare = (row) => {
|
||||
const _id = row.id || ids.value[0];
|
||||
const _id = row?.id || ids.value[0];
|
||||
router.push({
|
||||
path: '/repair/repairMain',
|
||||
query: {
|
||||
|
||||
Reference in New Issue
Block a user