|
|
@ -23,13 +23,7 @@ const selectedIndexRest = () => { |
|
|
|
<main class="main-content"> |
|
|
|
<div class="formula-left"> |
|
|
|
<div v-if="systemStore.systemUser?.roleType === 'admin'" class="formula-add"> |
|
|
|
<bt-button |
|
|
|
type="primary" |
|
|
|
button-text="新增配方" |
|
|
|
text-size="1.3rem" |
|
|
|
class="formula-add-btn" |
|
|
|
@click="onAddFormula" |
|
|
|
> |
|
|
|
<bt-button type="primary" button-text="新增配方" @click="onAddFormula"> |
|
|
|
<template #icon> |
|
|
|
<el-icon> |
|
|
|
<Plus /> |
|
|
@ -37,12 +31,15 @@ const selectedIndexRest = () => { |
|
|
|
</template> |
|
|
|
</bt-button> |
|
|
|
</div> |
|
|
|
<div class="formula-list"> |
|
|
|
<FormulaTable ref="tableRef" /> |
|
|
|
</div> |
|
|
|
<FormulaTable ref="tableRef" class="formula-list" /> |
|
|
|
</div> |
|
|
|
<div class="formula-right"> |
|
|
|
<FormulaConfig ref="formRef" type="formula" :formula-name-visible="true" :editable="systemStore.systemUser?.roleType === 'admin'" /> |
|
|
|
<FormulaConfig |
|
|
|
ref="formRef" |
|
|
|
type="formula" |
|
|
|
:formula-name-visible="true" |
|
|
|
:editable="systemStore.systemUser?.roleType === 'admin'" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</main> |
|
|
|
</div> |
|
|
@ -51,33 +48,39 @@ const selectedIndexRest = () => { |
|
|
|
<style lang="scss" scoped> |
|
|
|
.main-content { |
|
|
|
display: grid; |
|
|
|
grid-template-columns: repeat(3, 1fr); |
|
|
|
height: $main-container-height; |
|
|
|
gap: 5px; |
|
|
|
grid-template-columns: 1fr 2fr; |
|
|
|
height: 100%; |
|
|
|
gap: 10px; |
|
|
|
overflow: hidden; |
|
|
|
.formula-left { |
|
|
|
box-shadow: 0px 1px 5px 0px rgba(9, 39, 62, 0.15); |
|
|
|
background: $gradient-color; |
|
|
|
background: linear-gradient(180deg, rgba(147, 203, 255, 0.01) 50%, #ffffff 24%); |
|
|
|
box-shadow: 0 0 4px #0000001f; |
|
|
|
border-radius: 10px; |
|
|
|
border: 1px solid #e1e1e1; |
|
|
|
overflow: hidden; |
|
|
|
padding: 10px 0; |
|
|
|
.formula-add { |
|
|
|
margin: 10px; |
|
|
|
} |
|
|
|
.formula-add-btn { |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
height: 3rem; |
|
|
|
justify-content: center; |
|
|
|
height: 40px; |
|
|
|
border-radius: 5px; |
|
|
|
} |
|
|
|
.formula-list { |
|
|
|
display: flex; |
|
|
|
justify-content: center; |
|
|
|
height: 74vh; |
|
|
|
max-height: 74vh; |
|
|
|
height: calc(100% - 40px); |
|
|
|
padding-top: 10px; |
|
|
|
} |
|
|
|
} |
|
|
|
.formula-right { |
|
|
|
grid-column: 2 / 4; |
|
|
|
box-shadow: 0px 1px 5px 0px rgba(9, 39, 62, 0.15); |
|
|
|
background: $gradient-color; |
|
|
|
box-shadow: 0 1px 5px 0 rgba(9, 39, 62, 0.15); |
|
|
|
background: #ffffff; |
|
|
|
border: 1px solid #e1e1e1; |
|
|
|
background: linear-gradient(180deg, rgba(147, 203, 255, 0.01) 50%, #ffffff 24%); |
|
|
|
border-radius: 10px; |
|
|
|
overflow: hidden; |
|
|
|
position: relative; |
|
|
|
} |
|
|
|
} |
|
|
|