Joe
11 months ago
12 changed files with 399 additions and 45 deletions
After Width: | Height: | Size: 4.8 KiB |
@ -0,0 +1,101 @@ |
|||||
|
<template> |
||||
|
<div class='Card'> |
||||
|
<div class="header"> |
||||
|
<BackgroundClip class="left" clipPath="inset(0 0 0 0 round 24px)" |
||||
|
borderColor="linear-gradient(90deg, rgba(251, 19, 19, 1), rgba(214, 0, 0, 0))" |
||||
|
bgColor="linear-gradient(270deg, rgba(243, 0, 0, 0) 0%, #6B0000 100%)"> |
||||
|
<img src="@screen/images/TrafficAccidents.svg" /> |
||||
|
交通事故 |
||||
|
</BackgroundClip> |
||||
|
<div class="right"> |
||||
|
<Switcher /> |
||||
|
<!-- <ElSwitch active-color="#fff" inactive-color="#48B0CB" /> --> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<Descriptions :list="list" style="gap: 15px; flex: 1; margin-top: 9px;" column="1" /> |
||||
|
|
||||
|
<div class="footer"> |
||||
|
<Button>修改</Button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import Button from '@screen/components/Buttons/Button.vue'; |
||||
|
import BackgroundClip from '@screen/components/Decorations/BackgroundClip.vue'; |
||||
|
import Descriptions from '@screen/components/Descriptions.vue'; |
||||
|
import Switcher from './Switcher.vue'; |
||||
|
|
||||
|
export default { |
||||
|
name: 'Card', |
||||
|
components: { |
||||
|
Button, |
||||
|
BackgroundClip, |
||||
|
Descriptions, |
||||
|
Switcher |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
|
||||
|
list: [ |
||||
|
{ |
||||
|
label: '信息级别', |
||||
|
text: '影响通行', |
||||
|
}, |
||||
|
{ |
||||
|
label: '发布渠道', |
||||
|
text: '情报板、微博', |
||||
|
}, |
||||
|
{ |
||||
|
label: '审核方式', |
||||
|
text: '双人审核', |
||||
|
}, |
||||
|
{ |
||||
|
label: '启用日期', |
||||
|
text: '2023.12.22 13:00:00', |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang='scss' scoped> |
||||
|
.Card { |
||||
|
height: 226px; |
||||
|
background: #133242; |
||||
|
border-radius: 2px; |
||||
|
border: 1px solid; |
||||
|
padding: 15px 21px; |
||||
|
border-image: linear-gradient(360deg, rgba(55, 231, 255, .42), rgba(55, 231, 255, 0)) 1 1; |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
justify-content: space-between; |
||||
|
gap: 9px; |
||||
|
|
||||
|
.header { |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
justify-content: space-between; |
||||
|
|
||||
|
.left { |
||||
|
// height: 28px; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
gap: 6px; |
||||
|
padding: 1px 6px; |
||||
|
padding-right: 24px; |
||||
|
// border: 1px solid; |
||||
|
// border-image: linear-gradient(90deg, rgba(251, 19, 19, 1), rgba(214, 0, 0, 0)) 1 1; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.footer { |
||||
|
display: flex; |
||||
|
width: 100%; |
||||
|
align-items: center; |
||||
|
justify-content: flex-end; |
||||
|
} |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,94 @@ |
|||||
|
<template> |
||||
|
<div class='Switcher' :style="{ |
||||
|
'--unActive-color': getActiveOptions.unActive.color, |
||||
|
'--unActive-text-color': getActiveOptions.unActive.textColor, |
||||
|
'--active-color': getActiveOptions.active.color, |
||||
|
'--active-text-color': getActiveOptions.active.textColor, |
||||
|
}" @click="toggle"> |
||||
|
<span :style="{ opacity: +!active }">{{ getActiveOptions.active.text }}</span> |
||||
|
<span :style="{ opacity: +active }">{{ getActiveOptions.unActive.text }}</span> |
||||
|
|
||||
|
<div class="active" :style="{ left: active ? '0%' : '50%' }">{{ getActiveOptions[active ? 'active' : |
||||
|
'unActive'].text }}</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
export default { |
||||
|
name: 'Switcher', |
||||
|
props: { |
||||
|
activeOption: { |
||||
|
type: Object, |
||||
|
default: () => null |
||||
|
} |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
active: true |
||||
|
} |
||||
|
}, |
||||
|
computed: { |
||||
|
getActiveOptions() { |
||||
|
return { |
||||
|
active: { |
||||
|
text: "启用", |
||||
|
color: "#fff", |
||||
|
textColor: "#00B3CC", |
||||
|
...this.activeOption?.active |
||||
|
}, |
||||
|
unActive: { |
||||
|
text: "停用", |
||||
|
color: "#00B3CC", |
||||
|
textColor: "#fff", |
||||
|
...this.activeOption?.unActive |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
toggle() { |
||||
|
this.active = !this.active |
||||
|
} |
||||
|
}, |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang='scss' scoped> |
||||
|
.Switcher { |
||||
|
--content: var(--active-text); |
||||
|
position: relative; |
||||
|
background-color: var(--unActive-color); |
||||
|
transition: all .24s ease-in-out; |
||||
|
cursor: pointer; |
||||
|
border-radius: 41px; |
||||
|
padding: 3px 6px; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
font-size: 14px; |
||||
|
font-family: PingFang SC, PingFang SC; |
||||
|
font-weight: 500; |
||||
|
line-height: 24px; |
||||
|
letter-spacing: 1px; |
||||
|
color: var(--unActive-text-color); |
||||
|
gap: 12px; |
||||
|
|
||||
|
>span { |
||||
|
transition: all .15s ease-in-out; |
||||
|
} |
||||
|
|
||||
|
.active { |
||||
|
content: var(--content); |
||||
|
border-radius: 41px; |
||||
|
position: absolute; |
||||
|
transition: all .24s ease-in-out; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
color: var(--active-text-color); |
||||
|
padding: 3px 6px; |
||||
|
top: 0; |
||||
|
height: 100%; |
||||
|
width: 50%; |
||||
|
background-color: var(--active-color); |
||||
|
} |
||||
|
} |
||||
|
</style> |
@ -1,15 +1,71 @@ |
|||||
<template> |
<template> |
||||
<div class='PublishingChannelManagement'> |
<div class='PublishingChannelManagement'> |
||||
PublishingChannelManagement |
<!-- 搜索栏 --> |
||||
|
<div class="filter"> |
||||
|
<InputSearch style="width: 402px;" /> |
||||
|
</div> |
||||
|
|
||||
|
<!-- 内容 --> |
||||
|
<div class="body"> |
||||
|
<Card v-for="item in 8" :key="item" /> |
||||
|
</div> |
||||
|
|
||||
|
<!-- 分页 --> |
||||
|
<div class="footer"> |
||||
|
<Pagination :total="90" /> |
||||
|
</div> |
||||
</div> |
</div> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script> |
||||
|
import Pagination from '@screen/components/Pagination.vue'; |
||||
|
import InputSearch from '@screen/components/InputSearch/index.vue'; |
||||
|
import Card from './components/Card'; |
||||
|
|
||||
export default { |
export default { |
||||
name: 'PublishingChannelManagement', |
name: 'PublishingChannelManagement', |
||||
|
components: { |
||||
|
Pagination, |
||||
|
InputSearch, |
||||
|
Card |
||||
|
}, |
||||
} |
} |
||||
</script> |
</script> |
||||
|
|
||||
<style lang='scss' scoped> |
<style lang='scss' scoped> |
||||
.PublishingChannelManagement {} |
.PublishingChannelManagement { |
||||
|
|
||||
|
padding: 21px; |
||||
|
|
||||
|
height: 100%; |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
z-index: 6; |
||||
|
width: 100%; |
||||
|
|
||||
|
.filter { |
||||
|
height: 60px; |
||||
|
display: flex; |
||||
|
justify-content: flex-end; |
||||
|
} |
||||
|
|
||||
|
.body { |
||||
|
flex: 1; |
||||
|
overflow: hidden; |
||||
|
display: grid; |
||||
|
grid-template-columns: repeat(5, 1fr); |
||||
|
grid-gap: 24px; |
||||
|
// grid-row-gap: 9px; |
||||
|
// grid-column-gap: 9px; |
||||
|
grid-auto-rows: min-content; |
||||
|
} |
||||
|
|
||||
|
.footer { |
||||
|
margin-top: 15px; |
||||
|
height: 36px; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
justify-content: center; |
||||
|
} |
||||
|
} |
||||
</style> |
</style> |
||||
|
Loading…
Reference in new issue