物联设备维护 列表详情页面优化1.标题改为详情 2,详情界面优化统一样式
This commit is contained in:
parent
d119f93671
commit
61b6323251
|
|
@ -1,14 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<BasicDrawer
|
<BasicDrawer v-bind="$attrs" @register="registerDrawer" :title="getTitle" :width="adaptiveWidth" @ok="handleSubmit"
|
||||||
v-bind="$attrs"
|
:showFooter="showFooter" destroyOnClose>
|
||||||
@register="registerDrawer"
|
<div class="card-class">
|
||||||
:title="getTitle"
|
<BasicForm @register="registerForm"></BasicForm>
|
||||||
:width="adaptiveWidth"
|
</div>
|
||||||
@ok="handleSubmit"
|
|
||||||
:showFooter="showFooter"
|
|
||||||
destroyOnClose
|
|
||||||
>
|
|
||||||
<BasicForm @register="registerForm" ></BasicForm>
|
|
||||||
</BasicDrawer>
|
</BasicDrawer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -41,7 +36,7 @@ const [registerDrawer, { setDrawerProps, closeDrawer }] = useDrawerInner(async (
|
||||||
setDrawerProps({ confirmLoading: false, showFooter: showFooter.value });
|
setDrawerProps({ confirmLoading: false, showFooter: showFooter.value });
|
||||||
isUpdate.value = !!data?.isUpdate;
|
isUpdate.value = !!data?.isUpdate;
|
||||||
|
|
||||||
if(data.records){
|
if (data.records) {
|
||||||
records.value = data.records;
|
records.value = data.records;
|
||||||
let record = data.records[0];
|
let record = data.records[0];
|
||||||
console.log(record);
|
console.log(record);
|
||||||
|
|
@ -57,7 +52,7 @@ const getTitle = computed(() => {
|
||||||
if (!unref(isUpdate)) {
|
if (!unref(isUpdate)) {
|
||||||
return '新增维护设备';
|
return '新增维护设备';
|
||||||
} else {
|
} else {
|
||||||
return unref(showFooter) ? '指定派往机构' : '维护设备详情';
|
return unref(showFooter) ? '指定派往机构' : '详情';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
const { adaptiveWidth } = useDrawerAdaptiveWidth();
|
const { adaptiveWidth } = useDrawerAdaptiveWidth();
|
||||||
|
|
@ -79,4 +74,15 @@ async function handleSubmit() {
|
||||||
}
|
}
|
||||||
</script>
|
</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>
|
||||||
|
|
|
||||||
|
|
@ -175,7 +175,7 @@ export const formSchema: FormSchema[] = [
|
||||||
showCount: true,
|
showCount: true,
|
||||||
maxlength: 1000,
|
maxlength: 1000,
|
||||||
autosize:{
|
autosize:{
|
||||||
minRows: 5
|
minRows: 1
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue