Selaa lähdekoodia

新增检测管理看板,form对象添加router

cfort 3 vuotta sitten
vanhempi
sitoutus
1581518d24

+ 3 - 1
src/business/platform/form/utils/JForm.js

@@ -22,6 +22,7 @@ import { snapshoot,seal,sealPre,
 const _import = require('@/utils/util.import.' + process.env.NODE_ENV)
 import pinyin4js from 'pinyin4js';
 import store from '@/store'
+import router from '@/router'
 
 // 定义全局
 var JForm
@@ -56,7 +57,8 @@ _.extend(JForm, {
     this.$getSigPageUrl = getSigPageUrl // 对报表进行手动印章->预处理->签章页面url
     this.$generateUUID = generateUUID // 自定义规则自动生成uuid
     this._ = _
-    this.$store=store
+    this.$store = store
+    this.$router = router //添加router对象
     this._isInitialization = true
   },
 

+ 416 - 0
src/views/system/jbdHome/board/checkBoard.vue

@@ -0,0 +1,416 @@
+<template>
+    <div :class="$style.content">
+        <dv-full-screen-container>
+            <!-- 头部内容 -->
+            <div :class="$style.header">
+                <dv-decoration-8 :class="$style.left" />
+                <dv-decoration-5 :class="$style.center" />
+                <dv-decoration-8 :class="$style.right" :reverse="true" />
+                <div :class="$style.title">{{ titleName }}</div>
+                <div :class="$style.time">
+                    <el-date-picker
+                        v-model="month"
+                        type="month"
+                        value-format="yyyy-MM"
+                        format="yyyy-MM"
+                        placeholder="日期选择"
+                        style="width: 130px"
+                        :readonly="false"
+                        :editable="true"
+                        :clearable="false"
+                        @change="updateAll"
+                    />
+                </div>
+                <div :class="$style.back" @click.prevent="goBack()">
+                    <dv-border-box-8>返回</dv-border-box-8>
+                </div>
+            </div>
+            <dv-border-box-1>
+                <!-- topBar -->
+                <top-bar v-if="topBarData.length" :info="topBarData" />
+                <!-- middleCard -->
+                <middle-card v-if="middleCardData.flag" :info="middleCardData" />
+                <!-- bottomCard -->
+                <bottom-card v-if="bottomCardData.flag" :info="bottomCardData" />
+            </dv-border-box-1>
+        </dv-full-screen-container>
+    </div>
+</template>
+<script>
+    // const sql1 = `select wt.total as wtTotal, wt.accepted as aaccepted, jc.total as jcTotal, jc.finished as jcFinish, rw.task as task, rw.finished as rwFinish, bg.report as report, bg.process as process,bg.approval as approval
+    // from
+    // (select count(id_) as total, count(zhuang_tai_ = '委托结束' or null) as accepted, count(create_time_ like '${today}' or null) as today from t_mjwtsqb where create_time_ LIKE '${month}%') wt,
+    // (select count(id_) as total, count(jian_ce_zhuang_ta = '已完成' or null) as finished from t_jchzb where create_time_ LIKE '${month}%') jc,
+    // (select count(id_) as task, count(zhuang_tai_ = '任务已完成' or null) as finished from t_rwfpb where create_time_ LIKE '${month}%') rw,
+    // (select count(id_) as report, count(zhuang_tai_ = '报告待审核' or null) as process, count(zhuang_tai_ = '报告待审批' or null) as approval from t_mjjcbg where create_time_ LIKE '${month}%') bg`
+
+    import screenfull from 'screenfull'
+    import curdPost from '@/business/platform/form/utils/custom/joinCURD.js'
+    export default {
+        name: 'checkBoard',
+        components: {
+            topBar: () => import('./component/topBar'),
+            middleCard: () => import('./component/middleCard'),
+            bottomCard: () => import('./component/bottomCard')
+        },
+        data() {
+            const d = new Date()
+            return {
+                titleName: '检测综合信息查询',
+                year: d.toJSON().slice(0, 4),
+                month: d.toJSON().slice(0, 7),
+                today: d.toJSON().slice(0, 10),
+                label: ['委托', '受理', '任务发放', '报告'],
+                topBarData: [],
+                middleCardData: {
+                    tableData: {
+                        header: [
+                            '检测任务',
+                            '检测类型',
+                            '计划完成时间',
+                            '当前状态',
+                            '人员'
+                        ],
+                        data: [],
+                        rowNum: 7,
+                        columnWidth: ['300','100','150','100','100']
+                    },
+                    acceptData:[],
+                    taskData: [],
+                    flag: false
+                },
+                bottomCardData: {
+                    flag: false
+                },
+                timer: null
+            }
+        },
+        // beforeRouteEnter(to, from, next){
+        //     Promise.all([  ]).done(([ res ]) => {
+        //         console.log(res)
+        //     }).then(err => {
+        //         window.observer.trigger('error', err)
+        //         next()
+        //     })
+        // },
+        created() {
+            if (screenfull.isEnabled && !screenfull.isFullscreen) {
+                this.allView()
+            }
+
+            this.updateAll()
+
+            if (this.timer){
+                clearInterval(this.timer)
+            }
+
+            this.timer = setInterval(() => {
+                this.updateAll()
+            },600000)
+        },
+        beforeDestroy() {
+            if (screenfull.isFullscreen) {
+                screenfull.toggle()
+            }
+            clearInterval(this.timer)
+        },
+        methods: {
+            allView() {
+                // 默认显示全屏
+                screenfull.request()
+            },
+            goBack() {
+                this.$router.back(-1)
+            },
+            updateAll(e) {
+                this.getTopBarData()
+                this.getMiddleData()
+                this.getBottomData()
+            },
+            // 获取topBar数据
+            /**
+             *  委托——t_mjwtsqb
+             *  检测——t_jchzb
+             *  任务——t_rwfpb
+             *  报告——t_mjjcbg
+             */
+            getTopBarData() {
+                // 获取委托数及受理数
+                const sql = `select wt.total as wtTotal, wt.today as today, wt.accepted as accepted, jc.total as jcTotal, jc.finished as jcFinish, rw.task as task, rw.finished as rwFinish, bg.report as report, bg.process as process,bg.approval as approval
+                from
+                (select count(id_) as total, count(zhuang_tai_ = '委托结束' or null) as accepted, count(create_time_ like '${this.today}' or null) as today from t_mjwtsqb where create_time_ LIKE '${this.month}%') wt,
+                (select count(id_) as total, count(jian_ce_zhuang_ta = '已完成' or null) as finished from t_jchzb where create_time_ LIKE '${this.month}%') jc,
+                (select count(id_) as task, count(zhuang_tai_ = '任务已完成' or null) as finished from t_rwfpb where create_time_ LIKE '${this.month}%') rw,
+                (select count(id_) as report, count(zhuang_tai_ = '报告待审核' or null) as process, count(zhuang_tai_ = '报告待审批' or null) as approval from t_mjjcbg where create_time_ LIKE '${this.month}%') bg`
+                
+                curdPost('sql', sql).then(res => {
+                    const data = res.variables.data
+                    console.log(data)
+                    
+                    if ( data && data.length ) {
+                        const { accepted, approval, jcFinish, jcTotal, process, report, rwFinish, task, today, wtTotal } = data[0]
+                        this.middleCardData.taskData = [wtTotal, jcTotal, task, report]
+                        let result = [
+                            {
+                                title: '委托',
+                                children: [
+                                    {
+                                        label: '总数',
+                                        value: wtTotal
+                                    },
+                                    {
+                                        label: '受理',
+                                        value: accepted
+                                    },
+                                    {
+                                        label: '今日',
+                                        value: today
+                                    }
+                                ]
+                            },
+                            {
+                                title: '检测',
+                                children: [
+                                    {
+                                        label: '总数',
+                                        value: jcTotal
+                                    },
+                                    {
+                                        label: '已完成',
+                                        value: jcFinish
+                                    },
+                                    {
+                                        label: '未完成',
+                                        value: jcTotal - jcFinish
+                                    }
+                                ]
+                            },
+                            {
+                                title: '任务发放',
+                                children: [
+                                    {
+                                        label: '总数',
+                                        value: task
+                                    },
+                                    {
+                                        label: '已完成',
+                                        value: rwFinish
+                                    },
+                                    {
+                                        label: '未完成',
+                                        value: task - rwFinish
+                                    }
+                                ]
+                            },
+                            {
+                                title: '报告',
+                                children: [
+                                    {
+                                        label: '总数',
+                                        value: report
+                                    },
+                                    {
+                                        label: '已完成',
+                                        value: report - approval - process
+                                    },
+                                    {
+                                        label: '待审批',
+                                        value: approval
+                                    },
+                                    {
+                                        label: '待审核',
+                                        value: process
+                                    }
+                                ]
+                            }
+                        ]
+                        
+                        this.topBarData = result
+                    }
+                }).catch(error => {
+                    console.log(error)
+                })
+            },
+            // 获取中间图表数据
+            getMiddleData() {
+                // 获取检测数据
+                const sql1 = `select tm.jian_ce_xiang_mu_, tm.jian_ce_lei_bie_, IFNULL(rw.qi_wang_wan_cheng, '') as qi_wang_wan_cheng, rw.zhuang_tai_, ipe.NAME_ from t_rwfpb rw, ibps_party_employee ipe, t_mjjcnlfw tm where rw.jian_ce_yuan_ = ipe.ID_ and rw.jian_ce_xiang_mu_ = tm.id_ and rw.create_time_ like '${this.month}%'`
+                // 获取检测受理类型数据
+                const sql2 = `select count(tm.jian_ce_lei_bie_ = '理化' or null) as lh, count(tm.jian_ce_lei_bie_ = '微生物' or null) as wsw, count(tm.jian_ce_lei_bie_ = '细胞活率' or null) as xbhl, count(tm.jian_ce_lei_bie_ = '残留检测' or null) as cljc, count(tm.jian_ce_lei_bie_ = '细胞鉴别' or null) as xbjb from t_jchzb tj, t_mjjcnlfw tm where tj.jian_ce_xiang_mu_ = tm.id_ and tj.create_time_ like '${this.month}%'`
+
+                Promise.all([
+                    curdPost('sql', sql1),
+                    curdPost('sql', sql2)
+                ]).then(([res1, res2]) => {
+                    const data1 = res1.variables.data
+                    const data2 = res2.variables.data
+                    // console.log(data1, data2)
+
+                    this.middleCardData.tableData.data = []
+                    data1.forEach(item => {
+                        this.middleCardData.tableData.data.push(Object.values(item))
+                    })
+
+                    this.middleCardData.acceptData = Object.values(data2[0])
+                    this.middleCardData.flag = true
+                }).catch(error => {
+                    console.log(error)
+                })
+            },
+            // 获取底部图表数据
+            getBottomData() {
+                // 获取检测委托受理情况数据
+                const sql1 = `select tm.zhuang_tai_ as state, DATE_FORMAT(tm.create_time_, '%Y-%m-%d %H:%i:%s') as time from t_mjwtsqb tm where tm.create_time_ like '${this.year}%'`
+                // 获取检测月度年度任务完成情况数据
+                const sql2 = `select rw.zhuang_tai_ as state, DATE_FORMAT(rw.create_time_, '%Y-%m-%d %H:%i:%s') as time from t_rwfpb rw where rw.create_time_ like '${this.year}%'`
+                // 获取已委托样品数量
+                const sql3 = `select count(yp.id_) as unReceive from t_mjypb yp, t_mjwtsqb wt where yp.wai_jian_ = wt.id_ and yp.create_time_ like '${this.month}%'`
+                // 获取样品 收样/留样/不合格数量
+                const sql4 = `select count(id_) as receive, count(shi_fou_liu_yang_ = '是' or null) as keep, count(yan_shou_zhuang_t = '残缺' or null) as incomplete from t_mjypdjb where create_time_ like '${this.month}%'`
+                Promise.all([
+                    curdPost('sql', sql1),
+                    curdPost('sql', sql2),
+                    curdPost('sql', sql3),
+                    curdPost('sql', sql4),
+                ]).then(([ res1, res2, res3, res4]) => {
+                    const data1 = res1.variables.data
+                    const data2 = res2.variables.data
+                    const data3 = res3.variables.data
+                    const data4 = res4.variables.data
+                    // console.log(data1, data2, data3, data4)
+
+                    let trust = new Array(12).fill(0)
+                    let accepted = new Array(12).fill(0)
+                    let task = new Array(12).fill(0)
+                    let complete = new Array(12).fill(0)
+                    data1.forEach(item => {
+                        const index = parseInt(item.time.slice(5,7)) - 1
+                        if (item.state === '委托结束') {
+                            accepted[index]++
+                        }
+                        trust[index]++
+                    })
+                    data2.forEach(item => {
+                        const index = parseInt(item.time.slice(5,7)) - 1
+                        if (item.state === '任务已完成') {
+                            complete[index]++
+                        }
+                        task[index]++
+                    })
+                    let taskCount = task.reduce((pre, cur) => pre + cur)
+                    let completeCount = complete.reduce((pre, cur) => pre + cur)
+                    let year = [
+                        {
+                            name: '未完成',
+                            value: taskCount - completeCount
+                        },
+                        {
+                            name: '已完成',
+                            value: completeCount
+                        }
+                    ]
+                    let sample = [data3[0].unReceive - data4[0].receive, data4[0].receive, data4[0].incomplete, data4[0].keep]
+                    this.bottomCardData.trust = trust
+                    this.bottomCardData.accepted = accepted
+                    this.bottomCardData.task = task
+                    this.bottomCardData.complete = complete
+                    this.bottomCardData.year = year
+                    this.bottomCardData.sample = sample
+                    this.bottomCardData.flag = true
+
+                    // console.log(this.bottomCardData)
+                }).catch(error => {
+                    console.log(error)
+                })
+            }
+        }
+    }
+</script>
+<style lang="scss" module>
+    .content {
+        width: 100%;
+        height: 100%;
+        background-color: #030409;
+        position: absolute;
+        color: #fff;
+        z-index: 999;
+        :global {
+            #dv-full-screen-container {
+                background-image: url('../datav/img/bg.png');
+                background-size: 100% 100%;
+                box-shadow: 0 0 3px blue;
+                display: flex;
+                flex-direction: column;
+            }
+            .main-content {
+                flex: 1;
+                display: flex;
+                flex-direction: column;
+            }
+
+            .block-left-right-content {
+                flex: 1;
+                display: flex;
+                margin-top: 0.8%;
+            }
+
+            .block-top-bottom-content {
+                flex: 1;
+                display: flex;
+                flex-direction: column;
+                box-sizing: border-box;
+                padding-left: 0.8%;
+            }
+
+            .block-top-content {
+                height: 55%;
+                display: flex;
+                flex-grow: 0;
+                box-sizing: border-box;
+                padding-bottom: 0.8%;
+            }
+        }
+        .header {
+            position: relative;
+            width: 100%;
+            height: 100px;
+            display: flex;
+            justify-content: space-between;
+            flex-shrink: 0;
+            .left,
+            .right {
+                width: 25%;
+                height: 60px;
+            }
+            .center {
+                width: 40%;
+                height: 60px;
+                margin-top: 30px;
+            }
+            .title {
+                position: absolute;
+                font-size: 30px;
+                font-weight: bold;
+                left: 50%;
+                top: 15px;
+                transform: translateX(-50%);
+            }
+            .time,
+            .back {
+                width: 8%;
+                cursor: pointer;
+                height: 2.825rem;
+                line-height: 2.825rem;
+                text-align: center;
+                margin-left: 63%;
+                margin-top: 2.5%;
+                flex: 1;
+                position: absolute;
+                color: #ffffff;
+            }
+            .back {
+                margin-left: 75%;
+            }
+        }
+    }
+</style>

+ 106 - 0
src/views/system/jbdHome/board/component/bottomCard.vue

@@ -0,0 +1,106 @@
+<template>
+    <div id="bottom-card">
+        <div :class="$style.chart_box">
+            <!-- <div
+                v-for="(item, index) in cards"
+                :key="index"
+                :class="$style.item"
+            >
+                <div :id="item" style="width: 100%; height: 100%"></div>
+            </div> -->
+            <div :class="$style.item">
+                <div id="trust"></div>
+            </div>
+            <dv-decoration-2 :reverse="true" :dur="4" style="width:5px;height:100%;" />
+            <div :class="$style.item">
+                <div id="sample"></div>
+            </div>
+            <dv-decoration-2 :reverse="true" :dur="6" style="width:5px;height:100%;" />
+            <div :class="$style.item">
+                <div id="month"></div>
+            </div>
+            <dv-decoration-2 :reverse="true" :dur="8" style="width:5px;height:100%;" />
+            <div :class="$style.item">
+                <div id="year"></div>
+            </div>
+        </div>
+    </div>
+</template>
+<script>
+    import echarts from 'echarts'
+    import { trustOption, sampleOption, monthOption, yearOption } from '../data'
+    export default {
+        name: 'topBar',
+        props: {
+            info: {
+                type: Array,
+                default: []
+            }
+        },
+        components: {},
+        watch: {
+            info: {
+                handler() {
+                    this.init()
+                },
+                deep: true
+            }
+        },
+        data() {
+            return {
+                cards: ['trust', 'sample', 'month', 'year']
+            }
+        },
+        created() {},
+        mounted() {
+            this.init()
+        },
+        methods: {
+            init() {
+                const trust = echarts.init(document.getElementById('trust'))
+                const sample = echarts.init(document.getElementById('sample'))
+                const month = echarts.init(document.getElementById('month'))
+                const year = echarts.init(document.getElementById('year'))
+
+                // 设置图表数据
+                trustOption.series[0].data = this.info.trust
+                trustOption.series[1].data = this.info.accepted
+                monthOption.series[0].data = this.info.task
+                monthOption.series[1].data = this.info.complete
+                sampleOption.series[0].data = this.info.sample
+                yearOption.series[0].data = this.info.year
+
+                // 渲染
+                trust.setOption(trustOption)
+                sample.setOption(sampleOption)
+                month.setOption(monthOption)
+                year.setOption(yearOption)
+            }
+        }
+    }
+</script>
+<style lang="scss" module>
+    .chart_box {
+        position: relative;
+        display: flex;
+        justify-content: space-between;
+        width: 100%;
+        height: 100%;
+        .item {
+            width: 24%;
+            height: 100%;
+            background-color: rgba(6, 30, 93, 0.5);
+            > div {
+                width: 100%;
+                height: 100%;
+            }
+        }
+    }
+    :global {
+        #bottom-card {
+            width: 96%;
+            height: calc((100% - 240px) / 2);
+            padding: 0 2%;
+        }
+    }
+</style>

+ 106 - 0
src/views/system/jbdHome/board/component/middleCard.vue

@@ -0,0 +1,106 @@
+<template>
+    <div id="middle-card">
+        <div :class="$style.chart_box">
+            <div :class="$style.item">
+                <!-- <div :class="$style.title">
+                    <span>检测受理类型</span>
+                </div> -->
+                <div id="accept" style="width: 100%; height: 100%"></div>
+            </div>
+            <dv-decoration-2 :reverse="true" style="width:5px;height:100%;" />
+            <div :class="$style.item">
+                <!-- <div :class="$style.title">
+                    <span>检测任务情况</span>
+                </div> -->
+                <div id="task" style="min-width: 300px; height: 100%"></div>
+            </div>
+            <dv-decoration-2 :reverse="true" :dur="10" style="width:5px;height:100%;" />
+            <div :class="$style.item">
+                <dv-scroll-board
+                    v-if="tableData.data && tableData.data.length"
+                    :config="tableData"
+                    style="width: 100%; height: 100%"
+                />
+            </div>
+        </div>
+        <dv-decoration-10 :dur="15"/>
+    </div>
+</template>
+<script>
+    import echarts from 'echarts'
+    import { acceptOption, taskOption } from '../data'
+    export default {
+        name: 'topBar',
+        props: {
+            info: {
+                type: Object,
+                default: {}
+            }
+        },
+        components: {},
+        watch: {
+            info: {
+                handler() {
+                    this.init()
+                },
+                deep: true
+            }
+        },
+        data() {
+            return {
+                tableData: {}
+            }
+        },
+        created() {
+            // this.init()
+        },
+        mounted() {
+            this.init()
+        },
+        methods: {
+            init() {
+                const accept = echarts.init(document.getElementById('accept'))
+                const task = echarts.init(document.getElementById('task'))
+                
+                // 设置图表数据
+                acceptOption.series[0].data = this.info.acceptData
+                taskOption.series[0].data = this.info.taskData
+                this.tableData = JSON.parse(JSON.stringify(this.info.tableData))
+
+                //渲染
+                accept.setOption(acceptOption)
+                task.setOption(taskOption)
+            }
+        }
+    }
+</script>
+<style lang="scss" module>
+    .chart_box {
+        position: relative;
+        display: flex;
+        justify-content: space-between;
+        width: 100%;
+        height: 100%;
+        .item {
+            width: 24%;
+            height: 100%;
+            background-color: rgba(6, 30, 93, 0.5);
+            &:last-child {
+                width: 49%;
+            }
+        }
+    }
+    :global {
+        #middle-card {
+            width: 96%;
+            height: calc((100% - 240px) / 2);
+            padding: 0 2%;
+            margin: 15px 0 30px;
+            .dv-decoration-10 {
+                width: 100%;
+                margin: 12px 0;
+                height: 5px;
+            }
+        }
+    }
+</style>

+ 162 - 0
src/views/system/jbdHome/board/component/topBar.vue

@@ -0,0 +1,162 @@
+<template>
+    <div id="top-bar">
+        <div :class="$style.bar">
+            <div
+                v-for="(item, index) in topBarData"
+                :key="index"
+                :class="$style.item"
+            >
+                <div :class="$style.title">{{ item.title }}</div>
+                <div
+                    v-for="(v, i) in item.children"
+                    :key="i"
+                    :class="$style.box"
+                >
+                    <div :class="$style.label">{{ v.label }}</div>
+                    <div :class="$style.count">
+                        <dv-digital-flop
+                            :config="v.data"
+                            :class="$style.flop"
+                        />
+                        <div :class="$style.unit">{{ v.unit }}</div>
+                    </div>
+                </div>
+            </div>
+        </div>
+        <dv-decoration-10 />
+    </div>
+</template>
+<script>
+    export default {
+        name: 'topBar',
+        props: {
+            info: {
+                type: Array,
+                default: []
+            }
+        },
+        components: {},
+        watch: {
+            info(v) {
+                console.log(v)
+                this.update()
+            }
+        },
+        data() {
+            return {
+                topBarData: [],
+                fontColor: [
+                    '#d20962',
+                    '#f47721',
+                    '#7ac143',
+                    '#00a78e',
+                    '#00bce4',
+                    '#7d3f98',
+                    '#037ef3',
+                    '#f85a40',
+                    '#00c16e',
+                    '#ffd900',
+                    '#0cb9c1',
+                    '#7552cc'
+                ]
+            }
+        },
+        created() {
+            this.update()
+        },
+        methods: {
+            //随机颜色
+            getRandom(minNum, maxNum) {
+                if (arguments.length === 1) {
+                    return parseInt(Math.random() * minNum + 1, 10)
+                } else {
+                    return parseInt(
+                        Math.random() * (maxNum - minNum + 1) + minNum,
+                        10
+                    )
+                }
+            },
+            // 数据更新
+            update() {
+                this.info.forEach(item => {
+                    item.children.forEach(i => {
+                        i.data = {
+                            number: [i.value],
+                            content: '{nt}',
+                            textAlign: 'right',
+                            style: {
+                                fill: this.fontColor[this.getRandom(0, 11)],
+                                fontWeight: 'bold'
+                            }
+                        }
+                        i.unit = '件'
+                    })
+                })
+                this.topBarData = JSON.parse(JSON.stringify(this.info))
+            }
+        }
+    }
+</script>
+<style lang="scss" module>
+    .bar {
+        position: relative;
+        height: 90%;
+        margin: 20px 2%;
+        display: flex;
+        // flex-shrink: 0;
+        justify-content: space-between;
+        align-items: center;
+        background-color: rgba(6, 30, 93, 0.5);
+        .item {
+            width: 23%;
+            // width: calc(100% / 13);
+            height: 60%;
+            padding: 12px 20px;
+            border-left: 5px solid rgb(6, 30, 93);
+            &:last-child{
+                width: 31%;
+                .box{
+                    width: 25%;
+                }
+            }
+            .title {
+                text-align: center;
+                font-size: 18px;
+                font-weight: bold;
+                margin-bottom: 20px;
+            }
+            .box{
+                display: inline-block;
+                width: 33%;
+                .label{
+                    text-align: center;
+                    font-size: 14px;
+                }
+                .count {
+                    display: flex;
+                    align-items: center;
+                    justify-content: center;
+                    .flop {
+                        width: 60px;
+                        height: 40px;
+                        font-size: 18px;
+                    }
+                    .unit {
+                        margin-left: 10px;
+                        box-sizing: border-box;
+                    }
+                }
+            }
+        }
+    }
+    :global {
+        #top-bar{
+            height: 150px;
+        }
+        .dv-decoration-10 {
+            width: 96%;
+            margin: -7px 2% 0;
+            height: 5px;
+        }
+    }
+</style>

+ 549 - 0
src/views/system/jbdHome/board/data.js

@@ -0,0 +1,549 @@
+import echarts from "echarts"
+
+export const acceptOption = {
+    // 图表标题
+    title: {
+        show: true,
+        text: '检测受理类型',
+        textStyle: {
+            color: '#fff',
+            fontSize: 20,
+            fontWeight: '600'
+        },
+        textAlign: 'center',
+        left: '50%',
+        top: '20px'
+    },
+    xAxis: {
+        type: 'category',
+        data: ['理化', '微生物', '细胞活率', '残留检测', '细胞鉴别'],
+        axisTick: {
+            alignWithLabel: true
+        },
+        axisLabel: {
+            style: {
+                fill: '#fff'
+            }
+        },
+        axisLine: {
+            lineStyle: {
+                color: '#fff'
+            }
+        }
+        // axisLabel: {
+        //     inside: true,
+        //     color: "#000",
+        // },
+        // axisTick: {
+        //     show: true,
+        // },
+        // axisLine: {
+        //     show: true,
+        // },
+        // z: 10
+    },
+    yAxis: {
+        type: 'value',
+        name: '',
+        nameTextStyle: {
+            color: '#fff',
+            fontSize: 14
+        },
+        splitLine: {
+            show: false
+        },
+        axisLine: {
+            lineStyle: {
+                color: '#fff'
+            }
+        }
+    },
+    series: [{
+        type: 'bar',
+        name: '',
+        data: [],
+        barMaxWidth: '35px',
+        itemStyle: {
+            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+                { offset: 0, color: "#83bff6" },
+                { offset: 0.5, color: "#188df0" },
+                { offset: 1, color: "#188df0" },
+            ])
+        },
+        emphasis: {
+            itemStyle: {
+                color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+                    { offset: 0, color: "#2378f7" },
+                    { offset: 0.7, color: "#2378f7" },
+                    { offset: 1, color: "#83bff6" },
+                ])
+            }
+        }
+    }],
+    tooltip: {
+        show: true,
+        trigger: 'axis'
+    }
+}
+
+export const taskOption = {
+    // 图表标题
+    title: {
+        show: true,
+        text: '检测任务情况',
+        textStyle: {
+            color: '#fff',
+            fontSize: 20,
+            fontWeight: '600'
+        },
+        textAlign: 'center',
+        left: '50%',
+        top: '20px'
+    },
+    xAxis: {
+        type: 'category',
+        data: ['委托', '检测', '任务发放', '报告'],
+        axisTick: {
+            alignWithLabel: true
+        },
+        axisLabel: {
+            style: {
+                fill: '#fff'
+            }
+        },
+        axisLine: {
+            lineStyle: {
+                color: '#fff'
+            }
+        }
+    },
+    yAxis: {
+        type: 'value',
+        name: '',
+        nameTextStyle: {
+            color: '#fff',
+            fontSize: 14
+        },
+        splitLine: {
+            show: false
+        },
+        axisLine: {
+            lineStyle: {
+                color: '#fff'
+            }
+        }
+    },
+    series: [{
+        type: 'bar',
+        name: '',
+        data: [],
+        barMaxWidth: '35px',
+        itemStyle: {
+            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+                { offset: 0, color: "#83bff6" },
+                { offset: 0.5, color: "#188df0" },
+                { offset: 1, color: "#188df0" },
+            ])
+        },
+        emphasis: {
+            itemStyle: {
+                color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+                    { offset: 0, color: "#2378f7" },
+                    { offset: 0.7, color: "#2378f7" },
+                    { offset: 1, color: "#83bff6" },
+                ])
+            }
+        }
+    }],
+    tooltip: {
+        show: true,
+        trigger: 'axis'
+    }
+}
+
+export const trustOption = {
+    legend: {
+        data: [
+            {
+                name: '委托',
+                itemStyle: {
+                    color: '#00baff'
+                }
+            },
+            {
+                name: '受理',
+                itemStyle: {
+                    color: '#f5d94e'
+                }
+            }
+        ],
+        textStyle: {
+            color: '#fff',
+        },
+        bottom: 10
+    },
+    title: {
+        show: true,
+        text: '检测委托受理量',
+        textStyle: {
+            color: '#fff',
+            fontSize: 20,
+            fontWeight: '600'
+        },
+        textAlign: 'center',
+        left: '50%',
+        top: '20px'
+    },
+    xAxis: {
+        type: 'category',
+        data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
+        axisTick: {
+            alignWithLabel: true
+        },
+        axisLabel: {
+            style: {
+                fill: '#fff'
+            }
+        },
+        axisLine: {
+            lineStyle: {
+                color: '#fff'
+            }
+        }
+    },
+    yAxis: {
+        type: 'value',
+        name: '',
+        nameTextStyle: {
+            color: '#fff',
+            fontSize: 14
+        },
+        splitLine: {
+            show: false
+        },
+        axisLabel: {
+            style: {
+                fill: '#fff'
+            }
+        },
+        axisLine: {
+            lineStyle: {
+                color: '#fff'
+            }
+        }
+    },
+    series: [
+        {
+            type: 'bar',
+            name: '委托',
+            data: [],
+            barMaxWidth: '35px',
+            barStyle: {
+                fill: 'rgba(0, 186, 255, 0.4)'
+            },
+            itemStyle: {
+                color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+                    { offset: 0, color: "#83bff6" },
+                    { offset: 0.5, color: "#188df0" },
+                    { offset: 1, color: "#188df0" },
+                ])
+            },
+            emphasis: {
+                itemStyle: {
+                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+                        { offset: 0, color: "#2378f7" },
+                        { offset: 0.7, color: "#2378f7" },
+                        { offset: 1, color: "#83bff6" },
+                    ])
+                }
+            }
+        },
+        {
+            type: 'line',
+            name: '受理',
+            data: [],
+            symbol: 'circle',
+            symbolSize: 10,
+            lineArea: {
+                show: true,
+                gradient: ['rgba(245, 217, 79, 0.8)', 'rgba(245, 217, 79, 0.2)']
+            },
+            itemStyle: {
+                color: '#f5d94e'
+            }
+        }
+        
+    ],
+    tooltip: {
+        show: true,
+        trigger: 'axis'
+    }
+}
+
+export const sampleOption = {
+    title: {
+        show: true,
+        text: '样品受理情况',
+        textStyle: {
+            color: '#fff',
+            fontSize: 20,
+            fontWeight: '600'
+        },
+        textAlign: 'center',
+        left: '50%',
+        top: '20px'
+    },
+    xAxis: {
+        type: 'category',
+        data: ['已委托未收样', '已收样', '已收不合格', '留样'],
+        axisTick: {
+            alignWithLabel: true
+        },
+        axisLabel: {
+            style: {
+                fill: '#fff'
+            }
+        },
+        axisLine: {
+            lineStyle: {
+                color: '#fff'
+            }
+        }
+    },
+    yAxis: {
+        type: 'value',
+        name: '',
+        nameTextStyle: {
+            color: '#fff',
+            fontSize: 14
+        },
+        splitLine: {
+            show: false
+        },
+        axisLine: {
+            lineStyle: {
+                color: '#fff'
+            }
+        }
+    },
+    series: [{
+        type: 'bar',
+        name: '',
+        data: [],
+        barMaxWidth: '35px',
+        itemStyle: {
+            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+                { offset: 0, color: "#83bff6" },
+                { offset: 0.5, color: "#188df0" },
+                { offset: 1, color: "#188df0" },
+            ])
+        },
+        emphasis: {
+            itemStyle: {
+                color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+                    { offset: 0, color: "#2378f7" },
+                    { offset: 0.7, color: "#2378f7" },
+                    { offset: 1, color: "#83bff6" },
+                ])
+            }
+        }
+    }],
+    tooltip: {
+        show: true,
+        trigger: 'axis'
+    }
+}
+
+export const monthOption = {
+    legend: {
+        data: [
+            {
+                name: '任务总数',
+                itemStyle: {
+                    color: '#00baff'
+                }
+            },
+            {
+                name: '已完成',
+                itemStyle: {
+                    color: '#f5d94e'
+                }
+            }
+        ],
+        textStyle: {
+            color: '#fff',
+        },
+        bottom: 10
+    },
+    title: {
+        show: true,
+        text: '检测任务月度完成量',
+        textStyle: {
+            color: '#fff',
+            fontSize: 20,
+            fontWeight: '600'
+        },
+        textAlign: 'center',
+        left: '50%',
+        top: '20px'
+    },
+    xAxis: {
+        type: 'category',
+        data: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
+        axisTick: {
+            alignWithLabel: true
+        },
+        axisLabel: {
+            style: {
+                fill: '#fff'
+            }
+        },
+        axisLine: {
+            lineStyle: {
+                color: '#fff'
+            }
+        }
+    },
+    yAxis: {
+        type: 'value',
+        name: '',
+        nameTextStyle: {
+            color: '#fff',
+            fontSize: 14
+        },
+        splitLine: {
+            show: false
+        },
+        axisLabel: {
+            style: {
+                fill: '#fff'
+            }
+        },
+        axisLine: {
+            lineStyle: {
+                color: '#fff'
+            }
+        }
+    },
+    series: [
+        {
+            type: 'bar',
+            name: '任务总数',
+            data: [],
+            barMaxWidth: '35px',
+            barStyle: {
+                fill: 'rgba(0, 186, 255, 0.4)'
+            },
+            itemStyle: {
+                color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+                    { offset: 0, color: "#83bff6" },
+                    { offset: 0.5, color: "#188df0" },
+                    { offset: 1, color: "#188df0" },
+                ])
+            },
+            emphasis: {
+                itemStyle: {
+                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+                        { offset: 0, color: "#2378f7" },
+                        { offset: 0.7, color: "#2378f7" },
+                        { offset: 1, color: "#83bff6" },
+                    ])
+                }
+            }
+        },
+        {
+            type: 'line',
+            name: '已完成',
+            data: [],
+            symbol: 'circle',
+            symbolSize: 10,
+            lineArea: {
+                show: true,
+                gradient: ['rgba(245, 217, 79, 0.8)', 'rgba(245, 217, 79, 0.2)']
+            },
+            itemStyle: {
+                color: '#f5d94e'
+            }
+        }
+        
+    ],
+    tooltip: {
+        show: true,
+        trigger: 'axis'
+    }
+}
+
+export const yearOption = {
+    title: {
+        show: true,
+        text: '检测任务年度完成量',
+        textStyle: {
+            color: '#fff',
+            fontSize: 20,
+            fontWeight: '600'
+        },
+        textAlign: 'center',
+        left: '50%',
+        top: '20px'
+    },
+    legend: {
+        orient: 'horizontal',
+        show: true,
+        left: 'center',
+        bottom: 10,
+        z: 3,
+        itemWidth: 25,
+        itemHeight: 14,
+        itemGap: 10,
+        data: [
+            {
+                name: '未完成',
+                textStyle: {
+                    color: '#00baff'
+                }
+            },
+            {
+                name: '已完成',
+                textStyle: {
+                    color: '#f5d94e'
+                }
+            }
+        ]
+    },
+    series: [
+        {
+            name: '任务完成情况',
+            type: 'pie',
+            radius: '55%',
+            center: ['50%', '50%'],
+            data: [],
+            itemStyle: {
+                emphasis: {
+                    shadowBlur: 10,
+                    shadowOffsetX: 0,
+                    shadowColor: 'rgba(0, 0, 0, 0.5)'
+                },
+                normal: {
+                    label: {
+                        show: true,
+                        position: 'outer',
+                        // formatter: '{d}%'
+                        formatter: `占比:{d}%\n\n\r{b}:{c}`,
+                        // formatter: `{b}:{c}\n\n\r占比:{d}%`,
+                        fontSize: 12,
+                        // padding: [0, 5]
+                    },
+                    labelLine: {
+                        show: true
+                    }
+                }
+            }
+        }
+    ],
+    color: ['#00baff', '#f5d94e'],
+    tooltip: {
+        show: true,
+        trigger: 'item',
+        formatter: '任务情况<br/>{b}:{c}<br/>占比:{d}%'
+    }
+}