物业主开发
This commit is contained in:
@@ -12,8 +12,8 @@
|
||||
<el-input v-model="queryParams.deviceCode" placeholder="请输入设备编号" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||
<el-button @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
@@ -23,7 +23,7 @@
|
||||
<el-card class="flex-1" shadow="never">
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['equipment:add:repair']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@@ -35,8 +35,17 @@
|
||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:deviceRepair:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-col> -->
|
||||
<right-toolbar
|
||||
:disable-delete="multiple"
|
||||
:disable-edit="single"
|
||||
:show-add="checkPermi(['system:deviceRepair:add'])"
|
||||
:show-edit="checkPermi(['system:deviceRepair:edit'])"
|
||||
:show-delete="checkPermi(['system:deviceRepair:remove'])"
|
||||
@update:add="handleAdd"
|
||||
@update:edit="handleUpdate()"
|
||||
@update:delete="handleDelete()"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
@@ -61,8 +70,8 @@
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="操作" width="160" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="handleMain(scope.row)" v-hasPermi="['equipment:main:repair']">详情</el-button>
|
||||
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['equipment:edit:repair']">修改</el-button>
|
||||
<el-button link type="primary" @click="handleMain(scope.row)" v-hasPermi="['system:deviceRepair:query']">详情</el-button>
|
||||
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['system:deviceRepair:edit']">编辑</el-button>
|
||||
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['system:deviceRepair:remove']">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -76,6 +85,7 @@
|
||||
<script setup name="DeviceRepair" lang="ts">
|
||||
import { listDeviceRepair, getDeviceRepair, delDeviceRepair, addDeviceRepair, updateDeviceRepair } from '@/api/system/equipment/Repair';
|
||||
import { DeviceRepairVO, DeviceRepairQuery, DeviceRepairForm } from '@/api/system/equipment/Repair/type';
|
||||
import { checkPermi } from '@/utils/permission';
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { com_equipment_repair_status } = toRefs<any>(proxy?.useDict('com_equipment_repair_status'));
|
||||
@@ -134,15 +144,18 @@ const data = reactive<PageData<DeviceRepairForm, DeviceRepairQuery>>({
|
||||
const { queryParams, form } = toRefs(data);
|
||||
|
||||
/** 查询维修工单列表 */
|
||||
// TODO 设备维修记录 用户id有,用户信息没有
|
||||
const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listDeviceRepair(queryParams.value);
|
||||
deviceRepairList.value = res.rows;
|
||||
deviceRepairList.value.forEach((item) => {
|
||||
item.maintainUserNames = item.maintainUserList
|
||||
.map((i) => i.nickName)
|
||||
.filter((i) => i)
|
||||
.join(',');
|
||||
if (item.maintainUserList && item.maintainUserList.length > 0) {
|
||||
item.maintainUserNames = item.maintainUserList
|
||||
.map((i) => i.nickName)
|
||||
.filter((i) => i)
|
||||
.join(',');
|
||||
}
|
||||
});
|
||||
total.value = res.total;
|
||||
loading.value = false;
|
||||
|
||||
Reference in New Issue
Block a user