123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649 |
- <template>
- <div class="view-container">
- <div class="title">
- <div style="position: absolute;">
- <img src="@/assets/22title.png" alt="">
- </div>
- <div class="text">
- <div> 维保系统数据大屏展示平台</div>
- <div style="font-size: 15px;color: #A7DBFF;">Maintain large screen display platform of system data</div>
- </div>
- </div>
- <div class="content">
- <div class="content-left">
- <div class="content-left-top">
- <div style="padding:20px;display: flex; justify-content: space-between; position: relative;">
- <div>维修单数</div>
- <div
- style="text-align:center; width: 106px;height: 27px;background: #091E64;border-radius: 14px; font-size: 18px;color: #A2ABCD;">最近6个月</div>
- <div
- style="z-index: 999; text-align:center; width: 176px;height: 29px;background: #04154D;position: absolute;top:60px;left:50%;transform: translateX(-50%);font-size: 18px;color: #BBCFE8;">总数:1234</div>
- </div>
- <div id="chart1"></div>
- <div style="padding:0 20px;font-size: 18px;font-weight: 400;">
- <div style="padding-bottom:10px; font-size: 18px;font-weight: 400;color:#B9BFD6;">故障排行榜</div>
- <thead>
- <tr style="display: flex;justify-content: space-around;width: 483px;height: 26px;font-weight: 400">
- <th class="list-header discolor" v-for="col in columns" :key="col.key">{{ col.title }}</th>
- </tr>
- </thead>
- <tbody>
- <tr :class="{discolor: i%2}" v-for="(list,i) in data1" :key="i" style="display: flex;justify-content: space-around;">
- <td class="list-header" style=" color: #B9BFD6;box-shadow:none; font-size: 14px;font-weight: 400;">{{ list.type }}</td>
- <td class="list-header" style="color: #B9BFD6;box-shadow:none; font-size: 16px;font-weight: 400;">{{ list.num }}</td>
- <td class="list-header" style="color: #B9BFD6;box-shadow:none; font-size: 16px;font-weight: 400;">{{ list.sb }}</td>
- <td class="list-header" style="color: #B9BFD6;box-shadow:none;font-size: 16px;font-weight: 400;">{{ list.fee }}</td>
- </tr>
- </tbody>
- </div>
- </div>
- <div class="content-left-bottom">
- <div style="padding-bottom: 20px; font-size: 24px;font-weight: 800;color: #24D1F0;">维修通知</div>
- <div
- class="demo-infinite-container"
- >
- <a-list :split="false" size="small" :data-source="information">
- <a-list-item style="color:#B9BFD6 " slot="renderItem" slot-scope="item">
- <a-list-item-meta>
- <div slot="title" style="color:#B9BFD6 " :href="item.href">
- <span style="display: inline-block; width: 10px;height: 10px;background: #AB1AE1;border-radius: 50%;"></span>
- {{ item.name }}
- </div>
- </a-list-item-meta>
- <div>
- {{ item.time }}
- </div>
- </a-list-item>
- </a-list>
- </div>
- </div>
- </div>
- <div class="content-middle">
- <div class="content-middle-top">
- <div style="padding:20px;display: flex; justify-content: space-between; position: relative;">
- <div style="display: flex">维修费用统计
- <div style="display:flex;justify-content: space-between; position: relative;">
- <span class="card-num">1</span>
- <span class="card-num">2</span>
- <span class="card-num">3</span>
- <span class="card-num">4</span>
- <span class="card-num">5</span>
- <span class="card-num">6</span>
- </div>
- </div>
- <div
- style="text-align:center; width: 106px;height: 27px;background: #091E64;border-radius: 14px; font-size: 18px;color: #A2ABCD;">最近1年</div>
- </div>
- <div id="chart2"></div>
- </div>
- <div class="content-middle-bottom">
- <div style="padding-bottom: 20px; font-size: 24px;font-weight: 800;color: #24D1F0;">维保核心数据</div>
- <div class="middle-bottom-tag">
- <a-row type="flex">
- <a-col :span="6" class="border-bottom">
- <div class="middle-bottom-tag-list border-right">
- <div style="font-size: 16px;color: #B9BFD6;"><my-icon style="color:#24D1F0" type="icon-youjiantou" /> 维修单数</div>
- <div>2400</div>
- </div>
- </a-col>
- <a-col :span="6" class="border-bottom">
- <div class="middle-bottom-tag-list border-right">
- <div style="font-size: 16px;color: #B9BFD6;"><my-icon style="color:#9C24F0" type="icon-youjiantou" /> 维修费用</div>
- <div>2400</div>
- </div>
- </a-col>
- <a-col :span="6" class="border-bottom">
- <div class="middle-bottom-tag-list border-right">
- <div style="font-size: 16px;color: #B9BFD6;"><my-icon style="color:#0E33BC" type="icon-youjiantou" /> 内部单数</div>
- <div>2400</div>
- </div>
- </a-col>
- <a-col :span="6" class="border-bottom">
- <div class="middle-bottom-tag-list border-right">
- <div style="font-size: 16px;color: #B9BFD6;"><my-icon style="color:#F0DF24" type="icon-youjiantou" /> 内部费用</div>
- <div>2400</div>
- </div>
- </a-col>
- <a-col :span="6" class="border-bottom">
- <div class="middle-bottom-tag-list border-right">
- <div style="font-size: 16px;color: #B9BFD6;"><my-icon style="color:#24D1F0" type="icon-youjiantou" /> 委外单数</div>
- <div>2400</div>
- </div>
- </a-col>
- <a-col :span="6" class="border-bottom">
- <div class="middle-bottom-tag-list border-right">
- <div style="font-size: 16px;color: #B9BFD6;"><my-icon style="color:#9C24F0" type="icon-youjiantou" /> 委外费用</div>
- <div>2400</div>
- </div>
- </a-col>
- <a-col :span="6" class="border-bottom">
- <div class="middle-bottom-tag-list border-right">
- <div style="font-size: 16px;color: #B9BFD6;"><my-icon style="color:#0E33BC" type="icon-youjiantou" /> 保养任务</div>
- <div>2400</div>
- </div>
- </a-col>
- <a-col :span="6" class="border-bottom">
- <div class="middle-bottom-tag-list border-right">
- <div style="font-size: 16px;color: #B9BFD6;"><my-icon style="color:#F0DF24" type="icon-youjiantou" /> 延迟任务</div>
- <div>2400</div>
- </div>
- </a-col>
- </a-row>
- </div>
- <div style="padding-top:10px; font-size: 24px;font-weight: 800;color: #24D1F0;">维修费用类别</div>
- <div id="chart3"></div>
- </div>
- </div>
- <div class="content-right">
- <div class="content-right-top">
- <div style="padding-bottom: 20px; font-size: 24px;font-weight: 800;color: #24D1F0;">保养统计</div>
- <div id="chart4"></div>
- </div>
- <div class="content-right-bottom">
- <div style="padding-bottom: 20px; font-size: 24px;font-weight: 800;color: #24D1F0;">保养通知</div>
- <div
- class="demo-infinite-container"
- style="height:80%"
- >
- <a-list :split="false" size="small" :data-source="information">
- <a-list-item style="color:#B9BFD6 " slot="renderItem" slot-scope="item">
- <a-list-item-meta>
- <div slot="title" style="color:#B9BFD6 " :href="item.href">
- <span style="display: inline-block; width: 10px;height: 10px;background: #AB1AE1;border-radius: 50%;"></span>
- {{ item.name }}
- </div>
- </a-list-item-meta>
- <div>
- {{ item.time }}
- </div>
- </a-list-item>
- </a-list>
- </div>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- import { Chart, registerTheme } from '@antv/g2'
- export default {
- data () {
- return {
- information: [
- {
- name: '项目管理通知',
- time: '2022-4-7'
- },
- {
- name: '项目管理通知',
- time: '2022-4-7'
- },
- {
- name: '项目管理通知',
- time: '2022-4-7'
- },
- {
- name: '项目管理通知',
- time: '2022-4-7'
- }, {
- name: '项目管理通知',
- time: '2022-4-7'
- },
- {
- name: '项目管理通知',
- time: '2022-4-7'
- },
- {
- name: '项目管理通知',
- time: '2022-4-7'
- }, {
- name: '项目管理通知',
- time: '2022-4-7'
- },
- {
- name: '项目管理通知',
- time: '2022-4-7'
- }
- ],
- columns: [
- {
- title: '故障类别',
- key: 'type'
- },
- {
- title: '维修单数',
- key: 'num'
- },
- {
- title: '设备',
- key: 'sb'
- },
- {
- title: '维修费用',
- key: 'fee'
- }
- ],
- data1: [
- {
- type: '发动机启动困难',
- num: 19,
- sb: 3,
- fee: 2222
- },
- {
- type: '发动机启动困难',
- num: 19,
- sb: 3,
- fee: 2222
- },
- {
- type: '发动机启动困难',
- num: 19,
- sb: 3,
- fee: 2222
- },
- {
- type: '发动机启动困难',
- num: 19,
- sb: 3,
- fee: 2222
- },
- {
- type: '发动机启动困难',
- num: 19,
- sb: 3,
- fee: 2222
- },
- {
- type: '发动机启动困难',
- num: 19,
- sb: 3,
- fee: 2222
- }
- ],
- chart1: [
- { day: 1, percent: 60 },
- { day: 2, percent: 40 },
- { day: 3, percent: 50 },
- { day: 4, percent: 60 },
- { day: 5, percent: 70 },
- { day: 6, percent: 60 }
- ],
- chart2: [
- { day: 1, percent: 60 },
- { day: 2, percent: 40 },
- { day: 3, percent: 50 },
- { day: 4, percent: 60 },
- { day: 5, percent: 70 },
- { day: 6, percent: 60 },
- { day: 7, percent: 60 },
- { day: 8, percent: 40 },
- { day: 9, percent: 50 },
- { day: 10, percent: 60 },
- { day: 11, percent: 70 },
- { day: 12, percent: 60 }
- ],
- chart3: [
- { day: '维修-配件', percent: 60 },
- { day: '维修-人工', percent: 40 },
- { day: '备件费用', percent: 50 },
- { day: '维护保养费用', percent: 60 },
- { day: '改造费用', percent: 70 },
- { day: '委外费用', percent: 60 }
- ],
- chart4: [
- { day: '一级', percent: 30, value: 300 },
- { day: '二级', percent: 20, value: 200 },
- { day: '三级', percent: 50, value: 500 }
- ]
- }
- },
- mounted () {
- this.getChart()
- },
- methods: {
- getChart () {
- this.getChart1('chart1', this.chart1)
- this.getChart2('chart2', this.chart2)
- this.getChart3('chart3', this.chart3)
- this.getChart4('chart4', this.chart4)
- },
- getChart1 (id, data) {
- const chart = new Chart({
- container: id,
- width: 470,
- height: 220,
- appendPadding: [0, 0, 0, 20]
- })
- chart.data(data)
- chart.scale({
- day: {
- min: 1
- },
- percent: {
- min: 0,
- range: [0, 1]
- }
- })
- chart.axis('percent', {
- tickLine: null,
- title: {
- style: {
- fill: '#01D4F9',
- fontSize: 14
- },
- grid: null,
- offset: -10,
- autoRotate: false,
- position: 'end',
- text: '单数(个)'
- }
- })
- chart.axis('day', {
- title: {
- style: {
- fill: '#01D4F9',
- fontSize: 14
- },
- grid: null,
- autoRotate: false,
- position: 'end',
- text: '日期(月)'
- }
- })
- chart.tooltip({
- showCrosshairs: true,
- shared: true
- })
- chart.line().position('day*percent').shape('smooth')
- chart.point().position('day*percent')
- chart.theme({ 'styleSheet': { 'brandColor': '#F5942B ' } })
- chart.render()
- },
- getChart2 (id, data) {
- const chart = new Chart({
- container: id,
- width: 730,
- height: 350,
- appendPadding: [0, 0, 0, 20]
- })
- chart.data(data)
- chart.scale({
- day: {
- min: 1,
- tickCount: 12
- },
- percent: {
- min: 0,
- range: [0, 1]
- }
- })
- chart.axis('percent', {
- tickLine: null,
- title: {
- style: {
- fill: '#01D4F9',
- fontSize: 14
- },
- grid: null,
- offset: -10,
- autoRotate: false,
- position: 'end',
- text: '金额(元)'
- }
- })
- chart.tooltip({
- showCrosshairs: true,
- shared: true
- })
-
- chart.area().position('day*percent').shape('smooth')
-
- chart.render()
- },
- getChart3 (id, data) {
- registerTheme('myTheme', {
- columnWidthRatio: 0.1,
- colors10: ['#0091F1', '#FDB628', '#00E4EC', '#EB6F49', '#9C24F0 ', '#00FF00', '#9661BC', '#F6903D', '#008685', '#F08BB4']
- })
- const chart = new Chart({
- container: id,
- width: 700,
- height: 150
- })
- chart.data(data)
- chart.scale({
- percent: {
- nice: true,
- range: [0, 1]
- }
- })
- chart.legend(false)
- chart.tooltip({
- showCrosshairs: true,
- shared: true
- })
- chart.interaction('active-region')
- .interval()
- .position('day*percent')
- .color('day')
- chart.theme('myTheme')
- chart.render()
- },
- getChart4 (id, data) {
- registerTheme('myTheme', {
- columnWidthRatio: 0.1,
- colors10: ['#0091F1', '#FDB628', '#00E4EC', '#EB6F49', '#9C24F0 ', '#00FF00', '#9661BC', '#F6903D', '#008685', '#F08BB4']
- })
- const chart = new Chart({
- container: id,
- autoFit: true,
- height: 300
- })
- chart.data(data)
- chart.scale('percent', {
- formatter: (val) => {
- val = val * 100 + '%'
- return val
- }
- })
- chart.coordinate('theta', {
- radius: 0.75,
- innerRadius: 0.8
- })
- chart.tooltip({
- showTitle: false,
- showMarkers: false,
- itemTpl: '<li class="g2-tooltip-list-item"><span style="background-color:{color};" class="g2-tooltip-marker"></span>{name}: {value}</li>'
- })
-
- chart
- .annotation()
- .text({
- position: ['50%', '50%'],
- content: '1000',
- style: {
- fontSize: 20,
- fill: '#8c8c8c',
- textAlign: 'center'
- }
- })
- chart
- .interval()
- .adjust('stack')
- .position('percent')
- .color('day')
- .label('percent', (percent) => {
- return {
- content: (data) => {
- return percent + '%\n' + data.value
- }
- }
- })
- .tooltip('day*percent', (item, percent) => {
- percent = percent + '%'
- return {
- name: item,
- value: percent
- }
- })
- chart.interaction('element-active')
- chart.theme('myTheme')
- chart.render()
- }
- }
- }
- </script>
- <style lang="less" scoped>
- .view-container {
- width:1920px;
- height:1080px;
- background-color: RGBA(0, 7, 73, 0.8);
- padding:30px 41px;
- }
- .view-container::after {
- content: "";
- width:1920px;
- height:1080px;
- background: url(../../assets/bgView.png);
- top: 0;
- left: 0;
- bottom: 0;
- right: 0;
- position: absolute;
- z-index: -1;
- }
- .title{
- text-align: center;
- font-size: 28px;
- font-family: Microsoft YaHei;
- font-weight: bold;
- color: #BDE4FF;
- padding-bottom: 38px;
- .text{
- padding-top: 10px;
- }
- }
- .content{
- width: 100%;
- height: 919px;
- display: flex;
- justify-content: space-between;
- }
- .content-left{
- font-size: 24px;
- font-family: Microsoft YaHei;
- font-weight: 400;
- color: #24D1F0;
- width: 522px;
- height: 919px;
- .content-left-top{
- background: #000D39;
- border: 4px solid #02044B;
- width: 522px;
- height: 543px;
- margin-bottom:14px;
- }
- .content-left-bottom{
- background: #000D39;
- border: 4px solid #02044B;
- width: 522px;
- height: 362px;
- padding:20px;
- overflow: hidden;
- }
- }
- .content-middle{
- font-size: 24px;
- font-family: Microsoft YaHei;
- font-weight: 400;
- color: #24D1F0;
- width: 762px;
- height: 919px;
- .content-middle-top{
- background: #000D39;
- border: 4px solid #02044B;
- width: 762px;
- height: 445px;
- margin-bottom:14px;
- }
- .content-middle-bottom{
- background: #000D39;
- border: 4px solid #02044B;
- width: 762px;
- height: 458px;
- padding:20px;
- .middle-bottom-tag{
- width: 695px;
- height: 172px;
- background: #030E44;
- .middle-bottom-tag-list{
- height: 51px;
- margin:17px auto;
- display:flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- }
- .border-right{
- border-right: 2px solid #07164C;
- }
- .border-bottom{
- border-bottom: 2px solid #07164C;
- }
- }
- }
- }
- .content-right{
- width: 513px;
- height: 919px;
- .content-right-top{
- background: #000D39;
- border: 4px solid #02044B;
- width: 513px;
- height: 445px;
- margin-bottom:14px;
- padding:20px;
- }
- .content-right-bottom{
- background: #000D39;
- border: 4px solid #02044B;
- width: 513px;
- height: 457px;
- padding:20px;
- overflow: hidden;
- }
- }
- .discolor{
- background: #04154D;
- }
- .list-header{
- width: 25%;
- text-align: center;
- }
- .card-num{
- padding: 0 5px;
- font-size: 24px;
- margin-right: 5px;
- font-family: Microsoft YaHei;
- font-weight: bold;
- color: #000D39;
- background:#24D1F0;
- }
- .demo-infinite-container {
- overflow: auto;
- height: 240px;
- }
- ::-webkit-scrollbar { width: 0; height: 0; color: transparent; }
- </style>
|