修正ts类型

This commit is contained in:
Zy
2026-05-13 15:28:25 +08:00
parent 1b738c0f4d
commit a1750bc67b
114 changed files with 2346 additions and 613 deletions

View File

@@ -55,7 +55,13 @@
<el-table-column label="巡检点位置" align="center" prop="location" />
<el-table-column label="状态" align="center" prop="status">
<template #default="scope">
<DictTag :options="com_inspection_point_status" :value="scope.row.status"></DictTag>
<el-switch
@change="(val: string) => handleChangeStatus(scope.row.id, val)"
v-model="scope.row.status"
active-value="0"
inactive-value="1"
></el-switch>
<!-- 0开启 1关闭 -->
</template>
</el-table-column>
<el-table-column label="添加时间" align="center" prop="createTime" />
@@ -73,8 +79,8 @@
</template>
<script setup name="Point" lang="ts">
import PageHeader from '@/components/Pageheader/index.vue';
import { listPoint, getPoint, delPoint, addPoint, updatePoint } from '@/api/system/InspectionPoint/index';
import Pageheader from '@/components/Pageheader/index.vue';
import { listPoint, getPoint, delPoint, addPoint, updatePoint, changePointStatus } from '@/api/system/InspectionPoint/index';
import { PointVO, PointQuery, PointForm } from '@/api/system/InspectionPoint/type';
import { checkPermi } from '@/utils/permission';
@@ -218,6 +224,12 @@ const handleDelete = async (row?: PointVO) => {
await getList();
};
function handleChangeStatus(id: string, status: string) {
changePointStatus(id, status).then(() => {
proxy?.$modal.msgSuccess('操作成功');
getList();
});
}
/** 导出按钮操作 */
const handleExport = () => {
proxy?.download(