Sfoglia il codice sorgente

认可准则 进度

linweizeng 2 anni fa
parent
commit
c380208e1c

+ 56 - 6
src/views/system/jbdScan/approve/approve.vue

@@ -25,9 +25,31 @@
                                 :closable="false"
                             />
                         </div>
-                        <div>
-                            <div ref="Echart" class="chart" />
+                        <div style="display: flex;justify-content: space-between;width: 100%;">
+                            <div v-if="activeIndex != 5" style="width: 100%">
+                                <div ref="Echart" class="chart" />
+                            </div>
+                            <div v-if="activeIndex == 5" style="width: 50%;position: relative;">
+                                <div ref="Echart" class="chart" />
+                            </div>
+                            <div v-if="activeIndex == 5" style="width: 50%;position: relative;">
+                                <div ref="Echart2" class="chart" />
+                            </div>
+
                         </div>
+
+                    </div>
+                </div>
+                <div v-if="activeIndex == 5" class="tableLin">
+                    <div class="tableTop">
+                        <el-alert
+                            title="不符合条款清单"
+                            type="success"
+                            :closable="false"
+                        />
+                    </div>
+                    <div>
+                        <appComOne ref="appBuCom" :click-index="7" :table-data="buTableData" />
                     </div>
                 </div>
                 <div class="tableLin">
@@ -41,7 +63,9 @@
                     <div>
                         <appComOne ref="appCom" :click-index="clickIndex" :active-index="activeIndex" :table-data="tableData" />
                     </div>
-
+                </div>
+                <div v-if="activeIndex != 5" class="tyongj">
+                    暂无不符合项统计,请等待本次认可准则条款确认结束后统计
                 </div>
             </div>
         </el-dialog>
@@ -71,7 +95,7 @@ export default {
             generalShow: this.show,
             id: '',
             clickIndex: 2,
-            activeIndex: 1,
+            activeIndex: 5,
             stepList: [
                 {
                     stepIndex: 11,
@@ -100,7 +124,11 @@ export default {
                 }
             ],
             tableData: [],
-            description: `核查计划项目进度计分:'待分配'计1分, '待核查'计2分, '待审核'计3分, '待确认'计4分, '已结束'计5分,核查进度率 = 各项计划项目进度计分之和 / 计划项目总数 / 5 * 100`
+            description: `核查计划项目进度计分:'待分配'计1分, '待核查'计2分, '待审核'计3分, '待确认'计4分, '已结束'计5分,核查进度率 = 各项计划项目进度计分之和 / 计划项目总数 / 5 * 100`,
+            buTableData: [],
+            show1: false,
+            show2: false,
+            innerWidth
         }
     },
     watch: {
@@ -115,6 +143,7 @@ export default {
     created () {
         this.id = this.generalList[0].id_
         this.getJiHuaZhuangTai(this.id)
+        this.innerWidth = window.innerWidth /2
     },
     methods: {
         close () {
@@ -129,7 +158,6 @@ export default {
             this.clickIndex = index
         },
         getIndexName (index) {
-            console.log(this.clickIndex)
             const name = this.stepList[this.clickIndex - 1 === 5 ? 4 : this.clickIndex - 1].title || ''
             return name
         }
@@ -145,6 +173,7 @@ export default {
     border-top: none;
 }
 .step{
+    position: relative;
     margin: 20px 30px;
 }
 .tableLin{
@@ -160,4 +189,25 @@ export default {
     width: 100%;
     height: 250px;
 }
+
+.tyongj{
+    color: #606266;
+    margin: 20px auto;
+    text-align: center;
+    font-size: 16px;
+}
+
+.buFuHu{
+    display: flex;
+    justify-content: space-between;
+    margin: 20px 30px;
+    .buLeft{
+        width: 100%;
+
+        .textLeft{
+            color: #606266;
+            margin-bottom: 20px;
+        }
+    }
+}
 </style>

+ 132 - 1
src/views/system/jbdScan/approve/approveJS.js

@@ -7,6 +7,43 @@ export default {
     },
 
     methods: {
+        getColorRe (list) {
+            const colors = [
+                '#d20962',
+                '#f47721',
+                '#7ac143',
+                '#00a78e',
+                '#00bce4',
+                '#7d3f98',
+                '#037ef3',
+                '#f85a40',
+                '#00c16e',
+                '#ffd900',
+                '#0cb9c1',
+                '#7552cc'
+            ]
+
+            const colorList = []
+
+            const res = []
+            list.forEach((item, index) => {
+                const random = parseInt(Math.random() * 12)
+                const obj = {
+                    name: item.name,
+                    value: item.count,
+                    textStyle: {
+                        color: colors[index > 12 ? index - 11 : index]
+                    }
+                }
+                res.push(obj)
+                colorList.push(colors[index > 12 ? index - 11 : index])
+            })
+            const dt = {
+                res,
+                colorList
+            }
+            return dt
+        },
         getJiHuaZhuangTai (id) {
             const sql = `select * from t_rkzztkhcjh where id_ = '${id}'`
             this.$common.request('sql', sql).then(res => {
@@ -18,7 +55,11 @@ export default {
                     this.clickIndex = addIndex + 1
                     this.getShiShiData(id, this.activeIndex)
                     this.getJiHuaZiBiaoJiSuan(id)
-                    this.getOption()
+                    // this.getOption()
+                    if (index === 4) {
+                        this.getBuFuHeXiangMu(id)
+                        this.getBuFuHeTuBiao(id)
+                    }
                 }
             })
         },
@@ -54,6 +95,33 @@ export default {
                 }
             })
         },
+        getBuFuHeXiangMu (id) {
+            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}' and a.shen_he_jie_guo_ = 'N' order by a.tiao_kuan_hao_`
+
+            this.$common.request('sql', sql).then(res => {
+                const { data = [] } = res.variables || {}
+                if (data.length > 0) {
+                    this.buTableData = data
+                }
+            })
+        },
+        getBuFuHeTuBiao (id) {
+            const sql = `select f.bian_zhi_bu_men_,g.NAME_ as name,count(f.bian_zhi_bu_men_) as count 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}' and a.shen_he_jie_guo_ = 'N' GROUP BY f.bian_zhi_bu_men_`
+
+            this.$common.request('sql', sql).then(res => {
+                const { data = [] } = res.variables || {}
+                if (data.length > 0) {
+                    // this.buTableData = data
+                    const list = []
+                    data.forEach(item => {
+                        list.push(item.name)
+                    })
+                    const dt = this.getColorRe(data)
+                    const accept = echarts.init(this.$refs.Echart2)
+                    accept.setOption(JSON.parse(JSON.stringify(this.barData(list, dt.res, dt.colorList))))
+                }
+            })
+        },
         getOption (totalMs = 0) {
             const option = {
                 series: [
@@ -109,6 +177,69 @@ export default {
             }
             const accept = echarts.init(this.$refs.Echart)
             accept.setOption(JSON.parse(JSON.stringify(option)))
+            this.show1 = true
+        },
+        barData (legendData, seriesData, color) {
+            const barData = {
+                title: {
+                    show: true,
+                    text: '不符合条款清单比例',
+                    textStyle: {
+                        color: '#000000',
+                        fontSize: 20,
+                        fontWeight: '600'
+                    },
+                    textAlign: 'center',
+                    left: '50%',
+                    top: '10px'
+                },
+                legend: {
+                    orient: 'horizontal',
+                    show: true,
+                    left: 'center',
+                    bottom: 10,
+                    z: 3,
+                    // itemWidth: 25,
+                    // itemHeight: 14,
+                    // itemGap: 10,
+                    data: legendData
+                },
+                series: [
+                    {
+                        name: '',
+                        type: 'pie',
+                        radius: '60%',
+                        center: ['50%', '50%'],
+                        data: seriesData,
+                        itemStyle: {
+                            emphasis: {
+                                shadowBlur: 10,
+                                shadowOffsetX: 0,
+                                shadowColor: 'rgba(0, 0, 0, 0.5)'
+                            },
+                            normal: {
+                                label: {
+                                    show: true,
+                                    position: 'outer',
+                                    // formatter: `占比:{d}%\n\n\r{b}:{c}`,
+                                    formatter: `{b}:{c}\n占比:{d}%`,
+                                    fontSize: 14
+                                },
+                                labelLine: {
+                                    show: true
+                                }
+                            }
+                        }
+                    }
+                ],
+                color,
+                tooltip: {
+                    show: true,
+                    trigger: 'item',
+                    formatter: '不符合条款清单<br/>{b}:{c}<br/>占比:{d}%'
+                }
+            }
+            return barData
         }
     }
 }

+ 21 - 4
src/views/system/jbdScan/approve/approveJSON.json

@@ -91,12 +91,29 @@
         "value": "he_cha_qing_kuang",
         "width": "100"
     },{
-        "name": "审核结",
-        "value": "shen_he_",
+        "name": "审核结",
+        "value": "shen_he_jie_guo_",
         "width": "50"
     },{
-        "name": "审核原因",
-        "value": "shen_he_yuan_yin_",
+        "name": "审核备注",
+        "value": "shen_he_yi_jian_",
+        "width": "100"
+    }],
+    "list7": [{
+        "name": "条款号",
+        "value": "tiao_kuan_hao_",
+        "width": "50"
+    },{
+        "name": "条款名称",
+        "value": "tiao_kuan_ming_ch",
+        "width": "50"
+    },{
+        "name": "审核结果",
+        "value": "shen_he_jie_guo_",
+        "width": "50"
+    },{
+        "name": "审核备注",
+        "value": "shen_he_yi_jian_",
         "width": "100"
     }]
 }

+ 3 - 1
src/views/system/jbdScan/approve/compnent/appComOne.vue

@@ -42,7 +42,6 @@ export default {
     },
     methods: {
         switchWatch (index) {
-            console.log(index)
             switch (index) {
                 case 1:
                     this.jiHuaList = approveJSON.list1
@@ -58,6 +57,9 @@ export default {
                 case 6:
                     this.jiHuaList = approveJSON.list4
                     break
+                case 7:
+                    this.jiHuaList = approveJSON.list7
+                    break
             }
         }
     }

+ 4 - 2
src/views/system/jbdScan/satisfaction/satisfactionJS.js

@@ -113,7 +113,7 @@ export default {
 
                         const accept4 = echarts.init(this.$refs.Echart4)
                         accept4.setOption(JSON.parse(JSON.stringify(this.barData(legendData, list4, titleData4))))
-                    }else{
+                    } else {
                         this.close()
                         this.$message.error('统计的数据已经被清除,请检查数据是否被清除')
                     }
@@ -148,6 +148,7 @@ export default {
                 series: [
                     {
                         name: '任务完成情况',
+                        stillShowZeroSum: false,
                         type: 'pie',
                         radius,
                         center: ['50%', '50%'],
@@ -170,7 +171,8 @@ export default {
                                     show: true
                                 }
                             }
-                        }
+                        },
+                        startAngle: 10
                     }
                 ],
                 color: ['#f85a40',