物联设备维护 列表详情页面优化1.标题改为详情 2,详情界面优化统一样式

This commit is contained in:
1378012178@qq.com 2025-10-29 15:08:28 +08:00
parent d119f93671
commit 61b6323251
2 changed files with 20 additions and 14 deletions

View File

@ -1,14 +1,9 @@
<template>
<BasicDrawer
v-bind="$attrs"
@register="registerDrawer"
:title="getTitle"
:width="adaptiveWidth"
@ok="handleSubmit"
:showFooter="showFooter"
destroyOnClose
>
<BasicForm @register="registerForm" ></BasicForm>
<BasicDrawer v-bind="$attrs" @register="registerDrawer" :title="getTitle" :width="adaptiveWidth" @ok="handleSubmit"
:showFooter="showFooter" destroyOnClose>
<div class="card-class">
<BasicForm @register="registerForm"></BasicForm>
</div>
</BasicDrawer>
</template>
@ -41,7 +36,7 @@ const [registerDrawer, { setDrawerProps, closeDrawer }] = useDrawerInner(async (
setDrawerProps({ confirmLoading: false, showFooter: showFooter.value });
isUpdate.value = !!data?.isUpdate;
if(data.records){
if (data.records) {
records.value = data.records;
let record = data.records[0];
console.log(record);
@ -57,7 +52,7 @@ const getTitle = computed(() => {
if (!unref(isUpdate)) {
return '新增维护设备';
} else {
return unref(showFooter) ? '指定派往机构' : '维护设备详情';
return unref(showFooter) ? '指定派往机构' : '详情';
}
});
const { adaptiveWidth } = useDrawerAdaptiveWidth();
@ -79,4 +74,15 @@ async function handleSubmit() {
}
</script>
<style scoped></style>
<style lang="less" scoped>
.card-class {
padding-top: 24px;
padding-bottom: 24px;
padding-left: 14px;
padding-right: 14px;
background-color: #fcfdff;
border-radius: 10px;
margin-bottom: 14px;
}
</style>

View File

@ -175,7 +175,7 @@ export const formSchema: FormSchema[] = [
showCount: true,
maxlength: 1000,
autosize:{
minRows: 5
minRows: 1
},
}
},