Просмотр исходного кода

Merge branch 'master' of http://119.23.210.103:3000/wy/zdqy_firm_former

liujiayin 2 лет назад
Родитель
Сommit
0cfc368b94

+ 9 - 0
src/components/ibps-crud/index.vue

@@ -482,6 +482,12 @@ export default {
         top: -5px;
         position: absolute;
     }
+    .el-table .sort-caret.ascending{
+        border-bottom-color: #909399;
+    }
+    .el-table .sort-caret.descending{
+        border-top-color: #909399;
+    }
     .el-table td{
         padding: 4px 0 !important;
         color: #000000;
@@ -496,4 +502,7 @@ export default {
         background: #F9FFFF;
         color: #000000;
     }
+    .el-table .el-table-column--selection {
+        text-align: center;
+    }
 </style>

+ 1 - 1
src/utils/common.js

@@ -8,7 +8,7 @@ import { getNextIdByAlias } from '@/api/platform/system/identity'
 import { save as sendMsg } from '@/api/platform/message/innerMessage'
 import { save as saveNews } from '@/api/platform/system/news'
 import { bpmTaskSave } from '@/api/platform/bpmn/bpmTask'
-import { onlyOfficeToPdf,generateUUID } from '@/api/platform/form/seal'
+import { onlyOfficeToPdf, generateUUID } from '@/api/platform/form/seal'
 import { downloadFile as download } from '@/business/platform/file/utils'
 import { removeFormData } from '@/api/platform/data/dataTemplate'
 

+ 2 - 2
src/views/platform/bpmn/bpmInstHis/list.vue

@@ -245,7 +245,7 @@ export default {
             templateData: {},
             listData: [],
             pagination: {},
-            sorts: {},
+            sorts: { END_TIME_: 'DESC' },
             // 默认过滤部分分类
             hasPermission: true,
             specialType,
@@ -538,7 +538,7 @@ export default {
                     pageNo: this.pagination.page || 1,
                     limit: this.pagination.limit || 100
                 },
-                sorts: [this.sorts]
+                ...ActionUtils.formatParams(null, null, this.sorts)
             }
             if (this.$utils.isNotEmpty(this.typeId)) {
                 params.parameters[0].parameters[0].parameters.push({ key: 'Q^TYPE_ID_^S', value: this.typeId })

+ 0 - 1
src/views/platform/org/employee/edit/position-info.vue

@@ -178,7 +178,6 @@ export default {
                     if (level.first && firstShow) {
                         arrList = arr.filter(item => item.id === level.first)
                     } else if (level.second && secondShow) {
-                        console.log(arr)
                         arrList = arr.filter(item => item.id === level.second)
                     } else {
                         arrList = arr

+ 3 - 6
src/views/system/dashboard/components/workbench.vue

@@ -63,6 +63,7 @@
                             <template slot="overDept" slot-scope="scope">{{ getAttr(scope.row.subject, 'deptName') }}</template>
                             <template slot="creator" slot-scope="scope">{{ scope.row.createBy | getUserName(userList) }}</template>
                             <template slot="updateBy" slot-scope="scope">{{ getName(scope.row) }}</template>
+                            <template slot="time" slot-scope="scope">{{ scope.row.endTime || scope.row.updateTime || scope.row.createTime }}</template>
                         </ibps-crud>
                     </div>
                 </div>
@@ -287,7 +288,7 @@ export default {
                         { prop: 'scope', label: '发起部门', slotName: 'overDept', width: 120 },
                         { prop: 'scope', label: '发起人', headerName: 'submitBy', slotName: 'creator', width: 100 },
                         { prop: 'scope', label: `提交人`, slotName: 'updateBy', width: 100 },
-                        { prop: 'createTime', label: '创建时间', width: 150 }
+                        { prop: 'scope', label: '办理时间', slotName: 'time', width: 150 }
                     ],
                     finish: [
                         { prop: 'scope', label: '事务名称', slotName: 'name', width: 250 },
@@ -296,7 +297,7 @@ export default {
                         { prop: 'scope', label: '发起部门', slotName: 'overDept', width: 120 },
                         { prop: 'scope', label: '发起人', headerName: 'submitBy', slotName: 'creator', width: 100 },
                         { prop: 'scope', label: `提交人`, slotName: 'updateBy', width: 100 },
-                        { prop: 'createTime', label: '结束时间', width: 150 }
+                        { prop: 'scope', label: '结束时间', slotName: 'time', width: 150 }
                     ],
                     save: [
                         { prop: 'scope', label: '事务名称', slotName: 'name', width: 250 },
@@ -668,13 +669,10 @@ export default {
                 normal: '事务超时提醒'
             }
             const nowTime = new Date(new Date().getTime() + 28800000).toJSON().slice(0, 16).replace('T', ' ')
-            // console.log(data)
             data.forEach(item => {
                 const isExist = !!noticeList.find(i => i.taskId === item.taskId)
                 // 筛选出不存在于主管提醒表的过期数据
                 if (!isExist) {
-                    // 无部门信息的用户不往过期事务表加数据
-                    // if (this.orgInfo.groupID) {
                     const obj = {
                         // 事务ID
                         shi_wu_id_: item.taskId,
@@ -701,7 +699,6 @@ export default {
                         ti_xing_shi_jian_: nowTime
                     }
                     addList.push(obj)
-                    // }
                     const msg = {
                         subject: msgTitle[item.workType],
                         content: `<p>事务【${item.workName}】${msgContent[item.workType]}<p>`,

+ 127 - 0
src/views/system/jbdHome/qualityTarget/components/container.vue

@@ -0,0 +1,127 @@
+<template>
+    <div :class="$style.container">
+        <template v-for="(row, rowIndex) in rowData">
+            <dv-decoration-10 v-if="rowIndex === 1" :key="`lineOne${rowIndex}`" />
+            <div :key="`row${rowIndex}`" :class="$style.row" :style="`width: ${row.length / 4 * 100}%;`">
+                <template v-for="(item, index) in row">
+                    <div :key="`${rowIndex * 4 + index}`" :class="$style.column" :style="`width: ${1 / row.length * 100}%;`">
+                        <div :id="`card${rowIndex * 4 + index}`" />
+                    </div>
+                    <dv-decoration-2
+                        v-if="index !== row.length - 1"
+                        :key="`line${rowIndex * 4 + index}`"
+                        :reverse="true"
+                        :dur="4 + index * 2"
+                    />
+                </template>
+            </div>
+            <dv-decoration-10 v-if="rowIndex === 1" :key="`lineTwo${rowIndex}`" />
+        </template>
+    </div>
+</template>
+<script>
+import echarts from 'echarts'
+import { chartOption } from './option'
+export default {
+    name: 'chart',
+    components: {},
+    props: {
+        info: {
+            type: Array,
+            default: () => []
+        },
+        fontSize: {
+            type: Number,
+            default: 18
+        }
+    },
+    data () {
+        return {
+            
+        }
+    },
+    computed: {
+        rowData () {
+            const data = []
+            for (let i = 0; i < this.info.length; i += 4) {
+                data.push(this.info.slice(i, i + 4))
+            }
+            return data
+        }
+    },
+    watch: {
+        info: {
+            handler () {
+                this.init()
+            },
+            deep: true
+        }
+    },
+    created () {},
+    mounted () {
+        this.init()
+    },
+    methods: {
+        init () {
+            const d = new Date()
+            const m = parseInt(d.toJSON().split('-')[1])
+            const w = window.innerWidth
+            this.fontSize = w >= 1600 ? 20 : w > 1366 && w < 1600 ? 18 : 16
+            setTimeout(() => {
+                this.info.forEach((item, index) => {
+                    const chart = echarts.init(document.getElementById(`card${index}`))
+                    const option = chartOption
+                    const xData = item.data.map((i, index) => index).slice(0, m)
+                    const yData = item.data.map(i => i.result || 0).slice(0, m)
+                    const limit = item.data.map(i => i.limit).filter(i => i !== undefined)[0]
+                    const limitValue = item.data.map(i => i.limitValue).filter(i => i)[0]
+
+                    option.title.text = item.title
+                    option.title.textStyle.fontSize = this.fontSize
+                    option.title.subtext = `限值${limitValue}`
+                    option.xAxis.data = xData
+                    option.series[0].data = yData
+                    option.series[0].markLine.data[0].yAxis = limit
+                    option.series[0].markLine.data[0].label.formatter = limit
+                    chart.setOption(option)
+                })
+            }, 1)
+        }
+    }
+}
+</script>
+<style lang="scss" module>
+    .container {
+        width: 96%;
+        height: calc(100% - 40px);
+        padding: 20px 2%;
+        .row {
+            position: relative;
+            display: flex;
+            justify-content: space-between;
+            width: 100%;
+            height: calc((100% - 70px) / 3);
+            // margin: 15px 0 15px;
+            .column {
+                width: 24%;
+                height: 100%;
+                background-color: rgba(6, 30, 93, 0.5);
+                > div {
+                    width: 100%;
+                    height: 100%;
+                }
+            }
+        }
+        :global {
+            .dv-decoration-10 {
+                width: 96%;
+                height: 5px;
+                margin: 15px 2%;
+            }
+            .dv-decoration-2 {
+                width:5px;
+                height:100%;
+            }
+        }
+    }
+</style>

+ 116 - 0
src/views/system/jbdHome/qualityTarget/components/option.js

@@ -0,0 +1,116 @@
+import echarts from 'echarts'
+
+export const chartOption = {
+    title: {
+        show: true,
+        text: '',
+        subtext: '',
+        textStyle: {
+            color: '#fff',
+            fontSize: 18,
+            fontWeight: '600'
+        },
+        subtextStyle: {
+            color: '#fff',
+            fontSize: 14,
+            fontWeight: '400',
+            align: 'center'
+        },
+        textAlign: 'center',
+        left: '50%',
+        top: '5px'
+    },
+    grid: {
+        top: '80px',
+        bottom: '30px'
+    },
+    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: 'line',
+        name: '',
+        data: [],
+        markLine: {
+            data: [
+                {
+                    yAxis: '',
+                    tooltip: {
+                        formatter: ''
+                    },
+                    label: {
+                        show: true, position: 'inside',
+                        color: '#83bff6',
+                        formatter: ''
+                    },
+                    lineStyle: {
+                        color: '#ff4757',
+                        type: 'dashed'
+                    }
+                }
+            ]
+        },
+        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' }
+                ])
+            }
+        },
+        label: {
+            show: true,
+            position: 'top',
+            textStyle: {
+                color: '#fff',
+                fontSize: 14
+            },
+            formatter (params) {
+                return params.value ? params.value : ''
+            }
+        }
+    }],
+    tooltip: {
+        show: true,
+        trigger: 'axis',
+        formatter: '任务情况<br/>{b}:{c}<br/>占比:{d}%'
+    }
+}

+ 279 - 0
src/views/system/jbdHome/qualityTarget/index.vue

@@ -0,0 +1,279 @@
+<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" :dur="5" />
+                <dv-decoration-8 :class="$style.right" :reverse="true" />
+                <div :class="$style.title">{{ title }}</div>
+                <dv-decoration-7 :class="$style.dept" :style="`font-size: ${fontSize}px;`">
+                    <span>{{ dept }}</span>
+                </dv-decoration-7>
+                <div :class="$style.back" @click.prevent="goBack()">
+                    <dv-border-box-8>返回</dv-border-box-8>
+                </div>
+            </div>
+            <!-- 图表区域 -->
+            <dv-border-box-1>
+                <container v-if="renderData.length" :info="renderData" :font-size="fontSize" />
+            </dv-border-box-1>
+        </dv-full-screen-container>
+    </div>
+</template>
+<script>
+import screenfull from 'screenfull'
+export default {
+    components: {
+        container: () => import('./components/container.vue')
+    },
+    data () {
+        const d = new Date()
+        const special = ['综合', '样品', '科研', '医疗', '教学', '急诊']
+        const { deptList = [] } = this.$store.getters || {}
+        const deptFilter = deptList.filter(item => { return !special.some(i => item.positionName.includes(i)) && item.depth === 4 }).sort(i => i.sn)
+        console.log(deptFilter)
+        const { first = '', second = '' } = this.$store.getters.level || {}
+        return {
+            // 过滤专业组
+            deptList: deptFilter,
+            dept: deptFilter[0].positionName,
+            // 记录部门下标,用于循环渲染
+            deptIndex: 0,
+            level: second || first,
+            title: '质量指标统计',
+            year: d.toJSON().slice(0, 4),
+            month: d.toJSON().slice(0, 7),
+            today: d.toJSON().slice(0, 10),
+            initData: {},
+            renderData: [],
+            showIndex: 0,
+            fontSize: 18,
+            timer: null,
+            changeTimer: null
+        }
+    },
+    // beforeRouteEnter(to, from, next){
+    //     Promise.all([  ]).done(([ res ]) => {
+    //         console.log(res)
+    //     }).then(err => {
+    //         window.observer.trigger('error', err)
+    //         next()
+    //     })
+    // },
+    created () {
+        const w = window.innerWidth
+        this.fontSize = w >= 1600 ? 20 : w > 1366 && w < 1600 ? 18 : 16
+
+        if (screenfull.isEnabled && !screenfull.isFullscreen) {
+            this.allView()
+        }
+
+        this.updateAll()
+        this.setTimer()
+    },
+    beforeDestroy () {
+        if (screenfull.isFullscreen) {
+            screenfull.toggle()
+        }
+        clearInterval(this.timer)
+        clearInterval(this.changeTimer)
+    },
+    methods: {
+        allView () {
+            // 默认显示全屏
+            screenfull.request()
+        },
+        goBack () {
+            this.$router.back(-1)
+        },
+        updateAll () {
+            this.getData()
+        },
+        setTimer () {
+            // 每3分钟获取一次数据
+            if (this.timer) {
+                clearInterval(this.timer)
+            }
+            this.timer = setInterval(() => {
+                this.updateAll()
+            }, 30 * 1000)
+
+            // 每5秒切换一次显示数据
+            if (this.changeTimer) {
+                clearInterval(this.changeTimer)
+            }
+            this.changeTimer = setInterval(() => {
+                this.renderData = this.getRenderData(+!this.showIndex)
+            }, 2 * 1000)
+        },
+        getData () {
+            const sql = `select a.id_ as aid, a.di_dian_ as place, a.bian_zhi_bu_men_ as dept, a.tong_ji_yue_fen_ as months, a.create_time_ as createTime, b.id_ as bid, b.zhi_liang_mu_biao as goal, b.zhi_liang_zhi_bia as target, b.zhi_biao_xian_zhi as limitValue, b.shi_ji_shu_zhi_ as result, b.yuan_shi_shu_ju_ as originalData from t_zlzbpjb a inner join (select bian_zhi_bu_men_, tong_ji_yue_fen_, max(create_time_) as max from t_zlzbpjb group by bian_zhi_bu_men_, tong_ji_yue_fen_) a_latest on a.bian_zhi_bu_men_ = a_latest.bian_zhi_bu_men_ and a.tong_ji_yue_fen_ = a_latest.tong_ji_yue_fen_ and a.create_time_ = a_latest.max left join t_zlzbpjzb b on a.id_ = b.parent_id_ where a.shi_fou_guo_shen_ = '已完成' and a.di_dian_ = '${this.level}' and a.create_time_ like '${this.year}%'`
+            this.$common.request('sql', sql).then(res => {
+                const { data = [] } = res.variables || {}
+                data.forEach(item => {
+                    const { dept, months, target } = item
+                    item.deptName = this.tranformData(dept)
+                    item.month = parseInt(months.split('-')[1])
+                    // 截取指标限值
+                    item.limit = parseFloat(item.limitValue.match(/(\d+(\.\d+)?)/))
+                    // 创建组装后的数据结构
+                    if (!this.initData[item.deptName]) {
+                        this.initData[item.deptName] = []
+                    }
+                    const index = this.initData[item.deptName].findIndex(i => i.title === target)
+                    // if (!this.initData[item.deptName][target]) {
+                    //     this.initData[item.deptName][target] = new Array(12).fill({})
+                    // }
+                    if (index === -1) {
+                        const t = {
+                            title: target,
+                            data: new Array(12).fill({})
+                        }
+                        t.data[item.month - 1] = item
+                        this.initData[item.deptName].push(t)
+                    } else {
+                        this.initData[item.deptName][index].data[item.month - 1] = item
+                    }
+                })
+                // console.log(this.initData)
+                this.renderData = this.getRenderData(0, false)
+                console.log(this.renderData)
+            })
+        },
+        tranformData (v) {
+            if (!v) {
+                return v
+            }
+            const t = this.deptList.find(i => i.positionId === v)
+            return t ? t.positionName : v
+        },
+        // 获取图表渲染数据
+        getRenderData (index, flag = true) {
+            this.showIndex = index
+            // 每两次切换渲染数据时切换一次部门(重新请求接口获取数据时不做切换)
+            if (!this.showIndex && flag) {
+                this.loopDept()
+            }
+            const t = this.initData[this.dept] && this.initData[this.dept].length
+            if (t) {
+                return this.initData[this.dept].slice(index * 12, (index + 1) * 12)
+            }
+            return []
+        },
+        loopDept () {
+            if (this.deptIndex < this.deptList.length - 1 && this.deptIndex > 0) {
+                this.deptIndex++
+                this.dept = this.deptList[this.deptIndex].positionName
+            } else {
+                this.deptIndex = 0
+                this.dept = this.deptList[this.deptIndex].positionName
+                this.deptIndex++
+            }
+        }
+    }
+}
+</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('~@/assets/images/screen/bg.png');
+                background-size: 100% 100%;
+                box-shadow: 0 0 3px blue;
+                display: flex;
+                flex-direction: column;
+            }
+            .dv-border-box-1 .border-box-content{
+                height: calc(100vh - 100px);
+            }
+            .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%);
+            }
+            .dept, .back {
+                width: 8%;
+                min-width: 120px;
+                cursor: pointer;
+                height: 2.825rem;
+                line-height: 2.825rem;
+                text-align: center;
+                margin-top: 2.5%;
+                flex: 1;
+                position: absolute;
+                color: #ffffff;
+            }
+            .dept {
+                display: flex;
+                justify-content: flex-end;
+                // width: 125px;
+                right: 75%;
+                padding: 0 10px;
+                color: #fff;
+                font-size: 22px;
+                font-weight: 400;
+                span {
+                    width: 120px;
+                    text-align: center;
+                }
+            }
+            .back {
+                left: 75%;
+            }
+        }
+    }
+</style>

+ 2 - 2
src/views/system/jbdScan/approve/approve.vue

@@ -49,7 +49,7 @@
                         />
                     </div>
                     <div>
-                        <appComOne ref="appBuCom" :click-index="7" :table-data="buTableData" />
+                        <appComOne ref="appBuCom" :click-index="7" :table-data="buTableData" :type="false" />
                     </div>
                 </div>
                 <div class="tableLin">
@@ -61,7 +61,7 @@
                         />
                     </div>
                     <div>
-                        <appComOne ref="appCom" :click-index="clickIndex" :active-index="activeIndex" :table-data="tableData" />
+                        <appComOne ref="appCom" :type="true" :general-list="generalList" :click-index="clickIndex" :active-index="activeIndex" :table-data="tableData" />
                     </div>
                 </div>
                 <div v-if="activeIndex != 5" class="tyongj">

+ 3 - 4
src/views/system/jbdScan/approve/approveJS.js

@@ -12,7 +12,7 @@ export default {
     methods: {
         getPosition () {
             const second = this.$store.getters.level.second
-            const sql = `select * from ibps_party_entity where party_type_ = 'position' and PATH_ like '%${second}%' and DEPTH_ = '4'`
+            const sql = `select * from ibps_party_entity where party_type_ = 'position' and PATH_ like '%${second}%' and DEPTH_ = '4' order by ID_ desc`
             this.$common.request('sql', sql).then(res => {
                 const { data = [] } = res.variables || {}
                 if (data.length > 0) {
@@ -96,12 +96,12 @@ export default {
                     const sum = list.reduce((total, current) => total + current)
                     const dataLength = data.length
                     const totalMs = sum / dataLength / 5 * 100
-                    this.getOption(totalMs)
+                    this.getOption(parseInt(totalMs))
                 }
             })
         },
         getShiShiData (id, activeIndex) {
-            const sql = `select a.*,c.NAME_ as zuYuanPosiName,d.NAME_ as zuYuanName,e.NAME_ as zuZhangName,g.NAME_ as zuZhangBnMen from t_rkzztkhcjhzb a left join t_rkzztkhcjhzb b on a.id_ = b.ji_hua_zi_biao_id left join ibps_party_position c on a.bian_zhi_bu_men_ = c.ID_ left join ibps_party_employee d on a.zu_yuan_ = d.ID_ left join t_hcssjhb f on b.parent_id_ = f.id_ left join ibps_party_position g on f.bian_zhi_bu_men_ = g.ID_ left join ibps_party_employee e on f.bian_zhi_ren_ = e.ID_ where a.parent_id_ = '${id}' order by a.tiao_kuan_hao_`
+            const sql = `select a.*,c.NAME_ as zuYuanPosiName,d.NAME_ as zuYuanName,e.NAME_ as zuZhangName,g.NAME_ as zuZhangBnMen,h.NAME_ as yuanZuZhangBuMen,i.NAME_ as yuanZuZhangName from t_rkzztkhcjhzb a left join t_rkzztkhcjhzb b on a.id_ = b.ji_hua_zi_biao_id left join ibps_party_position c on a.bian_zhi_bu_men_ = c.ID_ left join ibps_party_position h on a.bu_men_ = h.ID_ left join ibps_party_employee i on a.zu_chang_ = i.ID_ left join ibps_party_employee d on a.zu_yuan_ = d.ID_ left join t_hcssjhb f on b.parent_id_ = f.id_ left join ibps_party_position g on f.bian_zhi_bu_men_ = g.ID_ left join ibps_party_employee e on f.bian_zhi_ren_ = e.ID_ where a.parent_id_ = '${id}' order by a.tiao_kuan_hao_`
 
             // if (activeIndex === 1) {
             //     sql = `select * from t_rkzztkhcjhzb where parent_id_ = '${id}' order by tiao_kuan_hao_`
@@ -136,7 +136,6 @@ export default {
                     const data2 = res[1].variables.data
                     const list1 = data1.map(item => item.value)
                     const list2 = data2.map(item => item.value)
-                    console.log(this.barData(list1, list2))
                     const accept = echarts.init(this.$refs.Echart2)
                     accept.setOption(JSON.parse(JSON.stringify(this.barData(list1, list2))))
                 }

+ 39 - 29
src/views/system/jbdScan/approve/approveJSON.json

@@ -2,115 +2,125 @@
     "list1": [{
         "name": "条款号",
         "value": "tiao_kuan_hao_",
-        "width": "50"
+        "width": "100"
     },{
         "name": "条款名称",
         "value": "tiao_kuan_ming_ch",
-        "width": "50"
+        "width": "150"
     },{
         "name": "状态",
         "value": "shi_fou_guo_shen_",
-        "width": "50"
+        "width": "100"
     }],
     "list2": [{
         "name": "条款号",
         "value": "tiao_kuan_hao_",
-        "width": "50"
+        "width": "100"
     },{
         "name": "条款名称",
         "value": "tiao_kuan_ming_ch",
-        "width": "50"
+        "width": "150"
     },{
         "name": "状态",
         "value": "shi_fou_guo_shen_",
-        "width": "50"
+        "width": "100"
     },{
         "name": "实施部门",
-        "value": "zuZhangBnMen",
-        "width": "50"
+        "value": "yuanZuZhangBuMen", 
+        "valueV": "zuZhangBnMen",
+        "width": "100"
     },{
         "name": "实施组长",
-        "value": "zuZhangName",
-        "width": "50"
+        "value": "yuanZuZhangName", 
+        "valueV": "zuZhangName",
+        "width": "100"
     }],
     "list3": [{
         "name": "条款号",
         "value": "tiao_kuan_hao_",
-        "width": "50"
+        "width": "100"
     },{
         "name": "条款名称",
         "value": "tiao_kuan_ming_ch",
-        "width": "50"
+        "width": "150"
     },{
         "name": "状态",
         "value": "shi_fou_guo_shen_",
-        "width": "50"
+        "width": "100"
     },{
         "name": "核查部门",
         "value": "zuYuanPosiName",
-        "width": "50"
+        "width": "100"
     },{
         "name": "核查人",
         "value": "zuYuanName",
-        "width": "50"
+        "width": "100"
     },{
         "name": "核查结果",
         "value": "he_cha_jie_guo_",
-        "width": "50"
+        "width": "100"
     },{
         "name": "核查情况说明",
         "value": "he_cha_qing_kuang",
-        "width": "100"
+        "width": ""
     }],
     "list4": [{
         "name": "条款号",
         "value": "tiao_kuan_hao_",
-        "width": "50"
+        "width": "100"
     },{
         "name": "条款名称",
         "value": "tiao_kuan_ming_ch",
-        "width": "50"
+        "width": "150"
     },{
         "name": "状态",
         "value": "shi_fou_guo_shen_",
-        "width": "50"
+        "width": "100"
     },{
         "name": "核查部门",
         "value": "zuYuanPosiName",
-        "width": "50"
+        "width": "100"
     },{
         "name": "核查人",
         "value": "zuYuanName",
-        "width": "50"
+        "width": "100"
     },{
         "name": "核查结果",
         "value": "he_cha_jie_guo_",
-        "width": "50"
+        "width": "100"
     },{
         "name": "核查情况说明",
         "value": "he_cha_qing_kuang",
-        "width": "100"
+        "width": ""
     },{
         "name": "审核结果",
         "value": "shen_he_jie_guo_",
-        "width": "50"
+        "width": "100"
     },{
         "name": "审核备注",
         "value": "shen_he_yi_jian_",
-        "width": "100"
+        "width": ""
     }],
     "list7": [{
+        "name": "核查部门",
+        "value": "zuYuanPosiName",
+        "width": "100"
+    },{
+        "name": "核查人",
+        "value": "zuYuanName",
+        "width": "100"
+    },{
         "name": "条款号",
         "value": "tiao_kuan_hao_",
-        "width": "50"
+        "width": "100"
     },{
         "name": "条款名称",
         "value": "tiao_kuan_ming_ch",
-        "width": "50"
+        "width": "150"
     },{
         "name": "审核结果",
         "value": "shen_he_jie_guo_",
-        "width": "50"
+        "width": "100"
     },{
         "name": "审核备注",
         "value": "shen_he_yi_jian_",

+ 154 - 4
src/views/system/jbdScan/approve/compnent/appComOne.vue

@@ -1,7 +1,25 @@
 <template>
     <div>
-        <el-table :data="tableData" :border="true" style="with: 100%">
-            <el-table-column v-for="(item,index) in jiHuaList" :key="index" :prop="item.value" :label="item.name" :width="item.width" align="center" />
+        <div v-if="activeIndex !== 5 && type && activeIndex+1 === clickIndex" class="tableTab">
+            <el-button type="info" @click="cuiBanClike()">催办</el-button>
+        </div>
+        <el-table :data="tableData" :border="true" style="with: 100%" @selection-change="handleSelectionChange">
+            <el-table-column
+                v-if="type && activeIndex !== 4"
+                type="selection"
+                width="55"
+            />
+            <el-table-column v-for="(item,index) in jiHuaList" :key="index" :prop="item.value" :label="item.name" :width="item.width" align="center">
+                <template slot-scope="scope">
+                    <div v-if="item.value == 'yuanZuZhangName'">
+                        {{ scope.row['zuZhangName'] || scope.row['yuanZuZhangName'] }}
+                    </div>
+                    <div v-else-if="item.value == 'zuYuanPosiName'">
+                        {{ scope.row['zuYuanPosiName'] || scope.row['yuanZuZhangName'] }}
+                    </div>
+                    <div v-else>{{ scope.row[item.value] }}</div>
+                </template>
+            </el-table-column>
         </el-table>
     </div>
 </template>
@@ -24,11 +42,22 @@ export default {
         clickIndex: {
             type: Number,
             default: 2
+        },
+        type: {
+            type: Boolean,
+            default: true
+        },
+        generalList: {
+            type: Array,
+            default: () => {
+                return []
+            }
         }
     },
     data () {
         return {
-            jiHuaList: approveJSON.list2
+            jiHuaList: approveJSON.list2,
+            selection: []
         }
     },
     watch: {
@@ -61,10 +90,131 @@ export default {
                     this.jiHuaList = approveJSON.list7
                     break
             }
+        },
+        handleSelectionChange (selection) {
+            console.log(selection)
+            this.selection = selection
+        },
+        cuiBanClike () {
+            if (this.selection.length === 0 && this.activeIndex !== '4') {
+                this.$message.warning('请选择数据')
+            }
+            // console.log(this.selection)
+            let selection = []
+            const list = []
+            switch (this.activeIndex) {
+                case 1:
+                    selection = this.selection.filter(item =>
+                        item.shi_fou_guo_shen_ === '待分配'
+                    )
+                    if (this.selection.length !== selection.length) {
+                        return this.$message.warning(`请选择状态为待分配的数据`)
+                    }
+                    if (selection.length > 0) {
+                        selection.forEach(item => {
+                            const conont = `,条款号:${item.tiao_kuan_hao_},条款名称:${item.tiao_kuan_ming_ch}`
+                            this.setXiaoXin(item.zu_chang_, item.ji_hua_bian_hao_, '认可准则条款核查核查实施计划', '认可准则条款核查核查实施计划已编制', conont)
+                        })
+                    }
+                    break
+                case 2:
+                    selection = this.selection.filter(item =>
+                        item.shi_fou_guo_shen_ === '待分配' || item.shi_fou_guo_shen_ === '待核查'
+                    )
+                    if (this.selection.length !== selection.length) {
+                        return this.$message.warning(`请选择状态为待分配或者待核查的数据`)
+                    }
+                    if (selection.length > 0) {
+                        selection.forEach(item => {
+                            const conont = `,条款号:${item.tiao_kuan_hao_},条款名称:${item.tiao_kuan_ming_ch}`
+                            let title = ''
+                            let content = ''
+                            if (item.shi_fou_guo_shen_ === '待分配') {
+                                title = '认可准则条款核查核查实施计划'
+                                content = '认可准则条款核查核查实施计划已编制'
+                            }
+                            if (item.shi_fou_guo_shen_ === '待核查') {
+                                title = '认可准则条款核查'
+                                content = '认可准则条款核查核查实施计划编制'
+                            }
+
+                            this.setXiaoXin(item.zu_chang_, item.ji_hua_bian_hao_, title, content, conont)
+                        })
+                    }
+                    break
+                case 3:
+                    selection = this.selection.filter(item =>
+                        item.shi_fou_guo_shen_ === '待分配' || item.shi_fou_guo_shen_ === '待核查' || item.shi_fou_guo_shen_ === '待审核'
+                    )
+                    if (this.selection.length !== selection.length) {
+                        return this.$message.warning(`请选择状态为待分配、待核查、的数据、待审核`)
+                    }
+                    if (selection.length > 0) {
+                        selection.forEach(item => {
+                            if (item.shi_fou_guo_shen_ === '待分配' || item.shi_fou_guo_shen_ === '待核查') {
+                                const conont = `,条款号:${item.tiao_kuan_hao_},条款名称:${item.tiao_kuan_ming_ch}`
+                                let title = ''
+                                let content = ''
+                                if (item.shi_fou_guo_shen_ === '待分配') {
+                                    title = '认可准则条款核查核查实施计划'
+                                    content = '认可准则条款核查核查实施计划已编制'
+                                }
+                                if (item.shi_fou_guo_shen_ === '待核查') {
+                                    title = '认可准则条款核查'
+                                    content = '认可准则条款核查核查实施计划编制'
+                                }
+                                this.setXiaoXin(item.zu_chang_, item.ji_hua_bian_hao_, title, content, conont)
+                            } else {
+                                list.push(item)
+                            }
+                        })
+                        this.getDataSet(list).then(res => {
+                            res.forEach(item => {
+                                this.setXiaoXin(item.zu_chang_, item.ji_hua_bian_hao_, '认可准则条款核查审核', '认可准则条款核查已完成,请尽快审核')
+                            })
+                        })
+                    }
+                    break
+                case 4:
+                    selection = this.selection.filter(item =>
+                        item.shi_fou_guo_shen_ !== '已结束'
+                    )
+                    if (selection.length > 0) {
+                        this.setXiaoXin(this.generalList[0].bian_zhi_ren_, this.generalList[0].bian_hao_, '认可准则条款核查确认', '认可准则条款核查审核已完成')
+                    }
+                    break
+            }
+        },
+        setXiaoXin (name, ji_hua_bian_hao_, title, content, conont = '') {
+            const xiaoxi = {
+                subject: title, // 主题,不可更改,在消息通知列表有根据这个文本做校验逻辑
+                receiverId: name, // 接收人id
+                receiver: '', // 接收人id
+                // groupId: i.tongzhiBM,// 接收人id
+                groupName: '', // 接收人id
+                fileMsg: '', // 附件
+                content: `${content},请尽快确认,计划编号:${ji_hua_bian_hao_}${conont}` // 正文
+            }
+            this.$common.sendMsg(xiaoxi).then(res => {
+                this.$message.warning(`${content},还没有确认的人员请及时通知${conont}`)
+            })
+        },
+        getDataSet (data) {
+            return new Promise((resolve, reject) => {
+                const qc = data.filter((item, index, self) => {
+                    return index === self.findIndex((t) => (
+                        t.zu_chang_ === item.zu_chang_
+                    ))
+                })
+                resolve(qc)
+            })
         }
     }
 }
 </script>
 <style lang="less" scoped>
-
+.tableTab{
+    display: flex;
+    justify-content: flex-end
+}
 </style>