- 添加耳标登记页面,支持新增和编辑功能 - 实现养殖场、养殖舍、养殖栏的级联选择- 添加耳标信息的详细录入,包括生物芯片耳标号、电子耳标号等 -优化列表页面,增加搜索和筛选功能 - 重构表格组件,支持更多列类型和操作
109 lines
2.0 KiB
Vue
109 lines
2.0 KiB
Vue
<script>
|
|
import AiTitle from "../basic/AiTitle.vue";
|
|
|
|
export default {
|
|
name: "AiPage",
|
|
components: {AiTitle},
|
|
props: {
|
|
contentString: {default: "card"},
|
|
showBack: Boolean
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<section class="AiPage">
|
|
<slot v-if="$slots.title" name="title"/>
|
|
<ai-title v-else-if="$attrs.title" :title="$attrs.title" isShowBottomBorder :isShowBack="showBack" @onBackClick="$router.push({})"/>
|
|
<div class="fill main">
|
|
<div v-if="$slots.left" class="left">
|
|
<slot name="left"/>
|
|
</div>
|
|
<el-scrollbar class="fill" :class="[contentString,$slots.footer?'hasFooter':'']">
|
|
<slot/>
|
|
</el-scrollbar>
|
|
</div>
|
|
<div class="footer" v-if="$slots.footer">
|
|
<slot name="footer"/>
|
|
</div>
|
|
</section>
|
|
</template>
|
|
|
|
<style scoped lang="scss">
|
|
.AiPage {
|
|
display: flex;
|
|
flex-direction: column;
|
|
width: 100%;
|
|
height: 100%;
|
|
padding: 0 20px;
|
|
overflow: hidden;
|
|
background: #f3f6f9;
|
|
position: relative;
|
|
|
|
.main {
|
|
display: flex;
|
|
padding: 20px 0;
|
|
gap: 10px;
|
|
overflow: hidden;
|
|
height: 100%;
|
|
|
|
|
|
:deep(.el-scrollbar__wrap) {
|
|
overflow-x: hidden;
|
|
overflow-y: auto;
|
|
padding-right: 16px;
|
|
}
|
|
|
|
& > .fill {
|
|
&.card {
|
|
padding: 12px 16px 12px;
|
|
background: #FFFFFF;
|
|
border-radius: 2px;
|
|
box-shadow: 0 4px 6px -2px rgba(15, 15, 21, 0.15);
|
|
}
|
|
|
|
&.detail {
|
|
margin-left: 50%;
|
|
transform: translateX(-50%);
|
|
max-width: 1200px;
|
|
overflow-y: auto;
|
|
|
|
}
|
|
|
|
&.blank {
|
|
width: 100%;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
&.hasFooter {
|
|
padding-bottom: 64px;
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
|
|
.footer {
|
|
position: absolute;
|
|
bottom: 0;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
left: 0;
|
|
right: 0;
|
|
height: 64px;
|
|
background: #F5F5F5;
|
|
box-shadow: 0 1px 0 0 #E5E5E5;
|
|
|
|
.el-button {
|
|
width: 92px;
|
|
}
|
|
}
|
|
|
|
.left {
|
|
max-width: 50%;
|
|
width: auto;
|
|
}
|
|
}
|
|
</style>
|