style(@vben/web-antd): lint 自动格式化修正巡检及区域模块
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import { requestClient } from '#/api/request';
|
|
||||||
|
|
||||||
import type { FunctionType } from '#/api/ops/area';
|
import type { FunctionType } from '#/api/ops/area';
|
||||||
|
|
||||||
|
import { requestClient } from '#/api/request';
|
||||||
|
|
||||||
export namespace InspectionTemplateApi {
|
export namespace InspectionTemplateApi {
|
||||||
/** 巡检检查项模板 */
|
/** 巡检检查项模板 */
|
||||||
export interface Template {
|
export interface Template {
|
||||||
@@ -41,7 +41,9 @@ export namespace InspectionTemplateApi {
|
|||||||
// ========== 巡检检查项模板 API ==========
|
// ========== 巡检检查项模板 API ==========
|
||||||
|
|
||||||
/** 获取模板分页 */
|
/** 获取模板分页 */
|
||||||
export function getTemplatePage(params: InspectionTemplateApi.TemplatePageQuery) {
|
export function getTemplatePage(
|
||||||
|
params: InspectionTemplateApi.TemplatePageQuery,
|
||||||
|
) {
|
||||||
return requestClient.get<InspectionTemplateApi.PageResult>(
|
return requestClient.get<InspectionTemplateApi.PageResult>(
|
||||||
'/ops/inspection/template/page',
|
'/ops/inspection/template/page',
|
||||||
{ params },
|
{ params },
|
||||||
|
|||||||
@@ -101,8 +101,7 @@ const routes: RouteRecordRaw[] = [
|
|||||||
title: '巡检记录',
|
title: '巡检记录',
|
||||||
activePath: '/ops/inspection-record',
|
activePath: '/ops/inspection-record',
|
||||||
},
|
},
|
||||||
component: () =>
|
component: () => import('#/views/ops/inspection-record/index.vue'),
|
||||||
import('#/views/ops/inspection-record/index.vue'),
|
|
||||||
},
|
},
|
||||||
// 巡检模板管理
|
// 巡检模板管理
|
||||||
{
|
{
|
||||||
@@ -112,8 +111,7 @@ const routes: RouteRecordRaw[] = [
|
|||||||
title: '巡检模板管理',
|
title: '巡检模板管理',
|
||||||
activePath: '/ops/inspection-template',
|
activePath: '/ops/inspection-template',
|
||||||
},
|
},
|
||||||
component: () =>
|
component: () => import('#/views/ops/inspection-template/index.vue'),
|
||||||
import('#/views/ops/inspection-template/index.vue'),
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -312,4 +312,3 @@ export function useGridColumns(): VxeTableGridOptions<OpsAreaApi.BusArea>['colum
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -73,8 +73,7 @@ function handleEdit(row: OpsAreaApi.BusArea) {
|
|||||||
function buildFullNameMap(list: OpsAreaApi.BusArea[]): Map<number, string> {
|
function buildFullNameMap(list: OpsAreaApi.BusArea[]): Map<number, string> {
|
||||||
const nodeMap = new Map<number, OpsAreaApi.BusArea>();
|
const nodeMap = new Map<number, OpsAreaApi.BusArea>();
|
||||||
for (const item of list) {
|
for (const item of list) {
|
||||||
if (item.id !== null && item.id !== undefined)
|
if (item.id !== null && item.id !== undefined) nodeMap.set(item.id, item);
|
||||||
nodeMap.set(item.id, item);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const cache = new Map<number, string>();
|
const cache = new Map<number, string>();
|
||||||
|
|||||||
@@ -6,13 +6,7 @@ import { onActivated, onMounted, ref } from 'vue';
|
|||||||
import { Page, useVbenDrawer } from '@vben/common-ui';
|
import { Page, useVbenDrawer } from '@vben/common-ui';
|
||||||
import { IconifyIcon } from '@vben/icons';
|
import { IconifyIcon } from '@vben/icons';
|
||||||
|
|
||||||
import {
|
import { Button, Card, DatePicker, Input, Tabs } from 'ant-design-vue';
|
||||||
Button,
|
|
||||||
Card,
|
|
||||||
DatePicker,
|
|
||||||
Input,
|
|
||||||
Tabs,
|
|
||||||
} from 'ant-design-vue';
|
|
||||||
|
|
||||||
import { STATUS_TAB_OPTIONS } from './data';
|
import { STATUS_TAB_OPTIONS } from './data';
|
||||||
import CardView from './modules/card-view.vue';
|
import CardView from './modules/card-view.vue';
|
||||||
@@ -84,11 +78,8 @@ function handleDetail(record: InspectionRecordApi.InspectionRecord) {
|
|||||||
|
|
||||||
/** 日期范围变化 */
|
/** 日期范围变化 */
|
||||||
function handleDateChange(_dates: any, dateStrings: [string, string]) {
|
function handleDateChange(_dates: any, dateStrings: [string, string]) {
|
||||||
if (dateStrings && dateStrings[0]) {
|
queryParams.value.createTime =
|
||||||
queryParams.value.createTime = dateStrings;
|
dateStrings && dateStrings[0] ? dateStrings : undefined;
|
||||||
} else {
|
|
||||||
queryParams.value.createTime = undefined;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let isFirstActivate = true;
|
let isFirstActivate = true;
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ defineExpose({
|
|||||||
@click="emit('detail', item)"
|
@click="emit('detail', item)"
|
||||||
>
|
>
|
||||||
<!-- 左上角渐变背景层 -->
|
<!-- 左上角渐变背景层 -->
|
||||||
<div class="card-gradient-bg" />
|
<div class="card-gradient-bg"></div>
|
||||||
|
|
||||||
<!-- 卡片内容 -->
|
<!-- 卡片内容 -->
|
||||||
<div class="card-inner">
|
<div class="card-inner">
|
||||||
@@ -160,10 +160,7 @@ defineExpose({
|
|||||||
>
|
>
|
||||||
{{ ATTRIBUTION_MAP[item.attributionResult] }}
|
{{ ATTRIBUTION_MAP[item.attributionResult] }}
|
||||||
</Tag>
|
</Tag>
|
||||||
<span
|
<span v-if="item.generatedOrderId" class="order-link">
|
||||||
v-if="item.generatedOrderId"
|
|
||||||
class="order-link"
|
|
||||||
>
|
|
||||||
<IconifyIcon icon="solar:document-bold-duotone" />
|
<IconifyIcon icon="solar:document-bold-duotone" />
|
||||||
已生成工单
|
已生成工单
|
||||||
</span>
|
</span>
|
||||||
@@ -230,10 +227,10 @@ defineExpose({
|
|||||||
|
|
||||||
.card-inner {
|
.card-inner {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
z-index: 1;
|
|
||||||
padding: 14px;
|
padding: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -273,11 +270,11 @@ defineExpose({
|
|||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
margin: 0 0 10px;
|
margin: 0 0 10px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
color: #262626;
|
color: #262626;
|
||||||
-webkit-line-clamp: 2;
|
|
||||||
-webkit-box-orient: vertical;
|
-webkit-box-orient: vertical;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -305,9 +302,9 @@ defineExpose({
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
color: #595959;
|
color: #595959;
|
||||||
text-overflow: ellipsis;
|
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,13 +21,7 @@ import dayjs from 'dayjs';
|
|||||||
|
|
||||||
import { getRecordDetail } from '#/api/ops/inspection-record';
|
import { getRecordDetail } from '#/api/ops/inspection-record';
|
||||||
|
|
||||||
import {
|
import { RESULT_ICON_MAP, RESULT_STATUS_MAP } from '../data';
|
||||||
ATTRIBUTION_MAP,
|
|
||||||
ATTRIBUTION_TAG_COLOR_MAP,
|
|
||||||
RESULT_COLOR_MAP,
|
|
||||||
RESULT_ICON_MAP,
|
|
||||||
RESULT_STATUS_MAP,
|
|
||||||
} from '../data';
|
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const record = ref<InspectionRecordApi.InspectionRecordDetail | null>(null);
|
const record = ref<InspectionRecordApi.InspectionRecordDetail | null>(null);
|
||||||
@@ -36,8 +30,7 @@ const loading = ref(false);
|
|||||||
const [Drawer, drawerApi] = useVbenDrawer({
|
const [Drawer, drawerApi] = useVbenDrawer({
|
||||||
onOpenChange(isOpen: boolean) {
|
onOpenChange(isOpen: boolean) {
|
||||||
if (isOpen) {
|
if (isOpen) {
|
||||||
const data =
|
const data = drawerApi.getData<InspectionRecordApi.InspectionRecord>();
|
||||||
drawerApi.getData<InspectionRecordApi.InspectionRecord>();
|
|
||||||
if (data?.id) {
|
if (data?.id) {
|
||||||
loadDetail(data.id);
|
loadDetail(data.id);
|
||||||
}
|
}
|
||||||
@@ -69,7 +62,12 @@ const itemStats = computed(() => {
|
|||||||
if (!record.value?.items?.length) return null;
|
if (!record.value?.items?.length) return null;
|
||||||
const total = record.value.items.length;
|
const total = record.value.items.length;
|
||||||
const passed = record.value.items.filter((i) => i.isPassed).length;
|
const passed = record.value.items.filter((i) => i.isPassed).length;
|
||||||
return { total, passed, failed: total - passed, rate: Math.round((passed / total) * 100) };
|
return {
|
||||||
|
total,
|
||||||
|
passed,
|
||||||
|
failed: total - passed,
|
||||||
|
rate: Math.round((passed / total) * 100),
|
||||||
|
};
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -80,7 +78,11 @@ const itemStats = computed(() => {
|
|||||||
<!-- ============ 1. 结果横幅 ============ -->
|
<!-- ============ 1. 结果横幅 ============ -->
|
||||||
<div
|
<div
|
||||||
class="result-banner"
|
class="result-banner"
|
||||||
:class="record.resultStatus === 1 ? 'result-banner--pass' : 'result-banner--fail'"
|
:class="
|
||||||
|
record.resultStatus === 1
|
||||||
|
? 'result-banner--pass'
|
||||||
|
: 'result-banner--fail'
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<div class="result-banner__left">
|
<div class="result-banner__left">
|
||||||
<IconifyIcon
|
<IconifyIcon
|
||||||
@@ -157,11 +159,17 @@ const itemStats = computed(() => {
|
|||||||
<div class="check-card__header">
|
<div class="check-card__header">
|
||||||
<span>检查项</span>
|
<span>检查项</span>
|
||||||
<div v-if="itemStats" class="check-card__stats">
|
<div v-if="itemStats" class="check-card__stats">
|
||||||
<span v-if="itemStats.passed > 0" class="check-card__stat check-card__stat--pass">
|
<span
|
||||||
|
v-if="itemStats.passed > 0"
|
||||||
|
class="check-card__stat check-card__stat--pass"
|
||||||
|
>
|
||||||
<IconifyIcon icon="solar:check-circle-bold" />
|
<IconifyIcon icon="solar:check-circle-bold" />
|
||||||
{{ itemStats.passed }}
|
{{ itemStats.passed }}
|
||||||
</span>
|
</span>
|
||||||
<span v-if="itemStats.failed > 0" class="check-card__stat check-card__stat--fail">
|
<span
|
||||||
|
v-if="itemStats.failed > 0"
|
||||||
|
class="check-card__stat check-card__stat--fail"
|
||||||
|
>
|
||||||
<IconifyIcon icon="solar:close-circle-bold" />
|
<IconifyIcon icon="solar:close-circle-bold" />
|
||||||
{{ itemStats.failed }}
|
{{ itemStats.failed }}
|
||||||
</span>
|
</span>
|
||||||
@@ -188,7 +196,11 @@ const itemStats = computed(() => {
|
|||||||
<!-- 主行 -->
|
<!-- 主行 -->
|
||||||
<div class="check-item__main">
|
<div class="check-item__main">
|
||||||
<IconifyIcon
|
<IconifyIcon
|
||||||
:icon="item.isPassed ? 'solar:check-circle-bold' : 'solar:close-circle-bold'"
|
:icon="
|
||||||
|
item.isPassed
|
||||||
|
? 'solar:check-circle-bold'
|
||||||
|
: 'solar:close-circle-bold'
|
||||||
|
"
|
||||||
class="check-item__icon"
|
class="check-item__icon"
|
||||||
:style="{ color: item.isPassed ? '#52c41a' : '#ff4d4f' }"
|
:style="{ color: item.isPassed ? '#52c41a' : '#ff4d4f' }"
|
||||||
/>
|
/>
|
||||||
@@ -245,14 +257,15 @@ const itemStats = computed(() => {
|
|||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
<!-- ============ 5. 关联工单 ============ -->
|
<!-- ============ 5. 关联工单 ============ -->
|
||||||
<Card
|
<Card v-if="record.generatedOrderId" size="small" class="linked-card">
|
||||||
v-if="record.generatedOrderId"
|
|
||||||
size="small"
|
|
||||||
class="linked-card"
|
|
||||||
>
|
|
||||||
<div
|
<div
|
||||||
class="linked-card__row"
|
class="linked-card__row"
|
||||||
@click="router.push({ name: 'WorkOrderDetail', params: { id: record.generatedOrderId } })"
|
@click="
|
||||||
|
router.push({
|
||||||
|
name: 'WorkOrderDetail',
|
||||||
|
params: { id: record.generatedOrderId },
|
||||||
|
})
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<IconifyIcon
|
<IconifyIcon
|
||||||
icon="solar:document-bold-duotone"
|
icon="solar:document-bold-duotone"
|
||||||
@@ -523,12 +536,12 @@ const itemStats = computed(() => {
|
|||||||
|
|
||||||
&__photo {
|
&__photo {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border-radius: 6px;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
border-radius: 6px;
|
||||||
|
|
||||||
:deep(.ant-image-img) {
|
:deep(.ant-image-img) {
|
||||||
border-radius: 6px;
|
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
|
border-radius: 6px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,14 +64,13 @@ defineExpose({ refresh: loadStats });
|
|||||||
<Row :gutter="12" class="mb-3">
|
<Row :gutter="12" class="mb-3">
|
||||||
<!-- 巡检总数 -->
|
<!-- 巡检总数 -->
|
||||||
<Col :xs="24" :sm="12" :md="6">
|
<Col :xs="24" :sm="12" :md="6">
|
||||||
<Card
|
<Card :body-style="{ padding: '12px 14px' }" class="stats-card">
|
||||||
:body-style="{ padding: '12px 14px' }"
|
|
||||||
class="stats-card"
|
|
||||||
>
|
|
||||||
<div class="stats-content">
|
<div class="stats-content">
|
||||||
<div
|
<div
|
||||||
class="stats-icon"
|
class="stats-icon"
|
||||||
style="--icon-color: #1677ff; --icon-bg: #e6f4ff"
|
style="
|
||||||
|
|
||||||
|
--icon-color: #1677ff; --icon-bg: #e6f4ff"
|
||||||
>
|
>
|
||||||
<IconifyIcon icon="solar:clipboard-list-bold-duotone" />
|
<IconifyIcon icon="solar:clipboard-list-bold-duotone" />
|
||||||
</div>
|
</div>
|
||||||
@@ -85,14 +84,13 @@ defineExpose({ refresh: loadStats });
|
|||||||
|
|
||||||
<!-- 合格数 -->
|
<!-- 合格数 -->
|
||||||
<Col :xs="24" :sm="12" :md="6">
|
<Col :xs="24" :sm="12" :md="6">
|
||||||
<Card
|
<Card :body-style="{ padding: '12px 14px' }" class="stats-card">
|
||||||
:body-style="{ padding: '12px 14px' }"
|
|
||||||
class="stats-card"
|
|
||||||
>
|
|
||||||
<div class="stats-content">
|
<div class="stats-content">
|
||||||
<div
|
<div
|
||||||
class="stats-icon"
|
class="stats-icon"
|
||||||
style="--icon-color: #52c41a; --icon-bg: #f6ffed"
|
style="
|
||||||
|
|
||||||
|
--icon-color: #52c41a; --icon-bg: #f6ffed"
|
||||||
>
|
>
|
||||||
<IconifyIcon icon="solar:check-circle-bold-duotone" />
|
<IconifyIcon icon="solar:check-circle-bold-duotone" />
|
||||||
</div>
|
</div>
|
||||||
@@ -106,14 +104,13 @@ defineExpose({ refresh: loadStats });
|
|||||||
|
|
||||||
<!-- 不合格数 -->
|
<!-- 不合格数 -->
|
||||||
<Col :xs="24" :sm="12" :md="6">
|
<Col :xs="24" :sm="12" :md="6">
|
||||||
<Card
|
<Card :body-style="{ padding: '12px 14px' }" class="stats-card">
|
||||||
:body-style="{ padding: '12px 14px' }"
|
|
||||||
class="stats-card"
|
|
||||||
>
|
|
||||||
<div class="stats-content">
|
<div class="stats-content">
|
||||||
<div
|
<div
|
||||||
class="stats-icon"
|
class="stats-icon"
|
||||||
style="--icon-color: #ff4d4f; --icon-bg: #fff1f0"
|
style="
|
||||||
|
|
||||||
|
--icon-color: #ff4d4f; --icon-bg: #fff1f0"
|
||||||
>
|
>
|
||||||
<IconifyIcon icon="solar:close-circle-bold-duotone" />
|
<IconifyIcon icon="solar:close-circle-bold-duotone" />
|
||||||
</div>
|
</div>
|
||||||
@@ -127,21 +124,24 @@ defineExpose({ refresh: loadStats });
|
|||||||
|
|
||||||
<!-- 合格率 -->
|
<!-- 合格率 -->
|
||||||
<Col :xs="24" :sm="12" :md="6">
|
<Col :xs="24" :sm="12" :md="6">
|
||||||
<Card
|
<Card :body-style="{ padding: '12px 14px' }" class="stats-card">
|
||||||
:body-style="{ padding: '12px 14px' }"
|
|
||||||
class="stats-card"
|
|
||||||
>
|
|
||||||
<div class="stats-content">
|
<div class="stats-content">
|
||||||
<div
|
<div
|
||||||
class="stats-icon"
|
class="stats-icon"
|
||||||
style="--icon-color: #722ed1; --icon-bg: #f9f0ff"
|
style="
|
||||||
|
|
||||||
|
--icon-color: #722ed1; --icon-bg: #f9f0ff"
|
||||||
>
|
>
|
||||||
<IconifyIcon icon="solar:chart-bold-duotone" />
|
<IconifyIcon icon="solar:chart-bold-duotone" />
|
||||||
</div>
|
</div>
|
||||||
<div class="stats-info">
|
<div class="stats-info">
|
||||||
<div class="stats-title">合格率</div>
|
<div class="stats-title">合格率</div>
|
||||||
<div class="stats-value">
|
<div class="stats-value">
|
||||||
{{ statsData.passRate ? `${statsData.passRate.toFixed(1)}%` : '-' }}
|
{{
|
||||||
|
statsData.passRate
|
||||||
|
? `${statsData.passRate.toFixed(1)}%`
|
||||||
|
: '-'
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4,13 +4,6 @@ import type { InspectionTemplateApi } from '#/api/ops/inspection-template';
|
|||||||
|
|
||||||
import { z } from '#/adapter/form';
|
import { z } from '#/adapter/form';
|
||||||
|
|
||||||
import {
|
|
||||||
FUNCTION_TYPE_OPTIONS,
|
|
||||||
FUNCTION_TYPE_TAG_COLORS,
|
|
||||||
} from '../area/data';
|
|
||||||
|
|
||||||
export { FUNCTION_TYPE_OPTIONS, FUNCTION_TYPE_TAG_COLORS };
|
|
||||||
|
|
||||||
/** 检查项列表列 */
|
/** 检查项列表列 */
|
||||||
export function useGridColumns(): VxeTableGridOptions<InspectionTemplateApi.Template>['columns'] {
|
export function useGridColumns(): VxeTableGridOptions<InspectionTemplateApi.Template>['columns'] {
|
||||||
return [
|
return [
|
||||||
@@ -109,3 +102,5 @@ export function useTemplateFormSchema(): VbenFormSchema[] {
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export { FUNCTION_TYPE_OPTIONS, FUNCTION_TYPE_TAG_COLORS } from '../area/data';
|
||||||
|
|||||||
@@ -239,7 +239,10 @@ onMounted(() => {
|
|||||||
|
|
||||||
<div class="flex h-full gap-4">
|
<div class="flex h-full gap-4">
|
||||||
<!-- 左侧:功能类型列表 -->
|
<!-- 左侧:功能类型列表 -->
|
||||||
<Card class="w-[220px] flex-shrink-0 overflow-hidden" :body-style="{ padding: '8px' }">
|
<Card
|
||||||
|
class="w-[220px] flex-shrink-0 overflow-hidden"
|
||||||
|
:body-style="{ padding: '8px' }"
|
||||||
|
>
|
||||||
<div class="mb-2 px-2 text-sm font-medium text-gray-500">功能类型</div>
|
<div class="mb-2 px-2 text-sm font-medium text-gray-500">功能类型</div>
|
||||||
<div
|
<div
|
||||||
v-for="opt in FUNCTION_TYPE_OPTIONS"
|
v-for="opt in FUNCTION_TYPE_OPTIONS"
|
||||||
@@ -256,7 +259,8 @@ onMounted(() => {
|
|||||||
<Badge
|
<Badge
|
||||||
:count="typeCounts[opt.value] ?? 0"
|
:count="typeCounts[opt.value] ?? 0"
|
||||||
:number-style="{
|
:number-style="{
|
||||||
backgroundColor: selectedType === opt.value ? '#1677ff' : '#f0f0f0',
|
backgroundColor:
|
||||||
|
selectedType === opt.value ? '#1677ff' : '#f0f0f0',
|
||||||
color: selectedType === opt.value ? '#fff' : '#999',
|
color: selectedType === opt.value ? '#fff' : '#999',
|
||||||
fontSize: '12px',
|
fontSize: '12px',
|
||||||
boxShadow: 'none',
|
boxShadow: 'none',
|
||||||
@@ -268,7 +272,13 @@ onMounted(() => {
|
|||||||
<!-- 右侧:检查项列表 -->
|
<!-- 右侧:检查项列表 -->
|
||||||
<Card
|
<Card
|
||||||
class="min-w-0 flex-1 overflow-hidden"
|
class="min-w-0 flex-1 overflow-hidden"
|
||||||
:body-style="{ padding: '16px', height: '100%', display: 'flex', flexDirection: 'column', overflow: 'hidden' }"
|
:body-style="{
|
||||||
|
padding: '16px',
|
||||||
|
height: '100%',
|
||||||
|
display: 'flex',
|
||||||
|
flexDirection: 'column',
|
||||||
|
overflow: 'hidden',
|
||||||
|
}"
|
||||||
>
|
>
|
||||||
<!-- 工具栏 -->
|
<!-- 工具栏 -->
|
||||||
<div class="mb-4 flex flex-shrink-0 items-center justify-between">
|
<div class="mb-4 flex flex-shrink-0 items-center justify-between">
|
||||||
@@ -281,10 +291,7 @@ onMounted(() => {
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex items-center gap-2">
|
<div class="flex items-center gap-2">
|
||||||
<template v-if="!isSorting">
|
<template v-if="!isSorting">
|
||||||
<Button
|
<Button v-if="templateList.length > 1" @click="handleStartSort">
|
||||||
v-if="templateList.length > 1"
|
|
||||||
@click="handleStartSort"
|
|
||||||
>
|
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<IconifyIcon icon="lucide:align-start-vertical" />
|
<IconifyIcon icon="lucide:align-start-vertical" />
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -43,7 +43,8 @@ const [Modal, modalApi] = useVbenModal({
|
|||||||
const valid = await formApi.validate();
|
const valid = await formApi.validate();
|
||||||
if (!valid) return;
|
if (!valid) return;
|
||||||
modalApi.lock();
|
modalApi.lock();
|
||||||
const values = (await formApi.getValues()) as InspectionTemplateApi.Template;
|
const values =
|
||||||
|
(await formApi.getValues()) as InspectionTemplateApi.Template;
|
||||||
try {
|
try {
|
||||||
// 自动填入功能类型
|
// 自动填入功能类型
|
||||||
const data: InspectionTemplateApi.Template = {
|
const data: InspectionTemplateApi.Template = {
|
||||||
|
|||||||
Reference in New Issue
Block a user