coys 1 rok pred
rodič
commit
48f35e2838

+ 113 - 0
src/views/menu/cockpit/components/comprehensiveData.vue

@@ -0,0 +1,113 @@
+<template>
+  <div>
+    <van-tabs v-model="active" color="#008cd6">
+      <van-tab title="日常履职">
+        <div class="boxCard">
+          <van-row class="chartsCls">
+            <van-col :span="12"> 日常履职:完成率 </van-col>
+            <van-col  :span="12" style="text-align: right">
+              <span @click="showEndDate = true">{{ monthVal }}<van-icon name="arrow-down" /></span>
+              <van-popup v-model="showEndDate" position="bottom">
+                <van-picker show-toolbar :columns="columns" @confirm="onConfirm" @cancel="showEndDate = false" />
+              </van-popup>
+            </van-col>
+          </van-row>
+          <chartsCom ref="chartsCom" :option="resumptionData" :id="'lzwcl'"></chartsCom>
+        </div>
+        <div>
+          <van-row class="boxCard">
+            <van-col :span="24" class="titleSty"> <span class="leftSty"></span><span>每日履职</span> </van-col>
+            <van-col :span="8" class="boxmain">
+              <div>应完成</div>
+              <div class="wj-title-blue">130</div>
+            </van-col>
+            <van-col :span="8" class="boxmain centerBox">
+              <div>应完成</div>
+              <div class="wj-title-blue">130</div>
+            </van-col>
+            <van-col :span="8" class="boxmain">
+              <div>应完成</div>
+              <div class="wj-title-blue">130</div>
+            </van-col>
+          </van-row>
+        </div>
+      </van-tab>
+      <van-tab title="隐患整改"> </van-tab>
+      <van-tab title="安全检查"> </van-tab>
+      <van-tab title="预案演练"> </van-tab>
+      <van-tab title="教育培训"> </van-tab>
+      <van-tab title="其他"> </van-tab>
+    </van-tabs>
+  </div>
+</template>
+<script>
+import { pieGaData, resumption } from '@/views/menu/cockpit/indexEcharts.js'
+import chartsCom from '@/components/echarts/index.vue'
+
+export default {
+  components: {
+    chartsCom
+  },
+  name: 'SocAppComprehensiveData',
+
+  data() {
+    return {
+      active: 1,
+      showEndDate: false,
+      monthVal: '本月',
+      columns: ['本月', '上月'],
+      resumptionData: resumption()
+    }
+  },
+
+  mounted() {},
+
+  methods: {
+    onConfirm(val) {
+      this.monthVal = val
+      this.showEndDate = false
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+.boxCard {
+  background-color: #fff;
+  margin: 20px;
+  box-shadow: 0 2px 10px #ccc;
+}
+.leftSty {
+  display: inline-block;
+  width: 10px;
+  height: 5vw;
+  vertical-align: middle;
+  margin-right: 10px;
+  margin-left: 10px;
+  background-color: #008cd6;
+}
+.titleSty {
+  line-height: 5vw;
+  margin: 10px;
+  color: #008cd6;
+}
+.boxmain {
+  display: flex;
+  flex-flow: wrap;
+  text-align: center;
+  margin-bottom: 20px;
+  div {
+    font-size: 30px;
+    width: 100%;
+    height: 100px;
+    line-height: 100px;
+  }
+}
+.centerBox {
+  border-left: 1px solid #008cd6;
+  border-right: 1px solid #008cd6;
+}
+.chartsCls {
+  font-size: 30px;
+  padding: 20px;
+}
+</style>

+ 0 - 0
src/views/menu/cockpit/components/questionInfo.vue


+ 122 - 50
src/views/menu/cockpit/index.vue

@@ -21,77 +21,116 @@
           <div class="GA38">
             <van-row>
               <van-col :span="24">
-               <div class="textTitle">GA38-2021标准</div> 
+                <div class="textTitle">GA38-2021标准</div>
               </van-col>
             </van-row>
             <van-row>
               <van-col :span="11">
-                
-                  <chartsCom
-                    ref="chartsff"
-                    :chartsHeight="'150px'"
-                    :chartsWidth="'200px'"
-                    :id="'yewd'"
-                    :option="dataGA"
-                  ></chartsCom>
-               
+                <chartsCom
+                  ref="chartsff"
+                  :chartsHeight="'150px'"
+                  :chartsWidth="'200px'"
+                  :id="'yewd'"
+                  :option="dataGA"
+                ></chartsCom>
               </van-col>
               <van-col :span="11">
-              
-                  <chartsCom
-                    ref="chartsff"
-                    :chartsHeight="'150px'"
-                    :chartsWidth="'200px'"
-                    :id="'zzyh'"
-                    :option="dataGAzz"
-                  ></chartsCom>
-            
+                <chartsCom
+                  ref="chartsff"
+                  :chartsHeight="'150px'"
+                  :chartsWidth="'200px'"
+                  :id="'zzyh'"
+                  :option="dataGAzz"
+                ></chartsCom>
               </van-col>
             </van-row>
           </div>
-           <!-- GA38-2015标准 -->
-           <div class="GA38">
+          <!-- GA38-2015标准 -->
+          <div class="GA38">
             <van-row>
               <van-col :span="24">
-               <div class="textTitle">GA38-2015标准</div> 
+                <div class="textTitle">GA38-2015标准</div>
               </van-col>
             </van-row>
             <van-row>
               <van-col :span="11">
-                
-                  <chartsCom
-                    ref="chartsff"
-                    :chartsHeight="'150px'"
-                    :chartsWidth="'200px'"
-                    :id="'15yewd'"
-                    :option="dataGA"
-                  ></chartsCom>
-               
+                <chartsCom
+                  ref="chartsff"
+                  :chartsHeight="'150px'"
+                  :chartsWidth="'200px'"
+                  :id="'15yewd'"
+                  :option="dataGA"
+                ></chartsCom>
               </van-col>
               <van-col :span="11">
-              
-                  <chartsCom
-                    ref="chartsff"
-                    :chartsHeight="'150px'"
-                    :chartsWidth="'200px'"
-                    :id="'15zzyh'"
-                    :option="dataGAzz"
-                  ></chartsCom>
-            
+                <chartsCom
+                  ref="chartsff"
+                  :chartsHeight="'150px'"
+                  :chartsWidth="'200px'"
+                  :id="'15zzyh'"
+                  :option="dataGAzz"
+                ></chartsCom>
               </van-col>
             </van-row>
           </div>
           <div class="boxCard">
-             <!-- 网点业务库总览 -->
+            <!-- 网点业务库总览 -->
             <chartsCom ref="charts" :id="'wdyw'" :option="dotPieData"></chartsCom>
           </div>
           <div class="boxCard">
-             <!-- 保安配备情况 -->
+            <!-- 保安配备情况 -->
             <chartsCom ref="charts" :id="'baqk'" :option="securityPieData"></chartsCom>
           </div>
+          <!-- 自助银行设备 -->
+          <div class="GA38">
+            <van-row>
+              <van-col :span="24">
+                <div class="textTitle">自助银行设备</div>
+              </van-col>
+            </van-row>
+            <van-row>
+              <van-col :span="11">
+                <chartsCom
+                  ref="chartsff"
+                  :chartsHeight="'200px'"
+                  :chartsWidth="'180px'"
+                  :id="'lhszz'"
+                  :option="ZHSdata"
+                ></chartsCom>
+              </van-col>
+              <van-col :span="11">
+                <chartsCom
+                  ref="chartsff"
+                  :chartsHeight="'200px'"
+                  :chartsWidth="'180px'"
+                  :id="'zhszz'"
+                  :option="LHSdata"
+                ></chartsCom>
+              </van-col>
+            </van-row>
+          </div>
+        </van-tab>
+        <van-tab title="综合数据">
+          <compreDataCom ref="compreDataCom"></compreDataCom>
         </van-tab>
-        <van-tab title="综合数据">综合数据</van-tab>
-        <van-tab title="履职情况">履职情况</van-tab>
+        <van-tab title="履职情况"
+          ><div class="boxCard">
+            <van-row class="chartsCls">
+              <van-col :span="12">
+                <span @click="showlz = true">{{ lvVal }}<van-icon name="arrow-down" /></span> 
+                <van-popup v-model="showlz" position="bottom">
+                  <van-picker show-toolbar :columns="columnsLz" @confirm="onConfirmLz" @cancel="showlz = false" />
+                </van-popup>
+              </van-col>
+              <van-col :span="12" style="text-align: right">
+                <span @click="showEndDate = true">{{ monthVal }}<van-icon name="arrow-down" /></span>
+                <van-popup v-model="showEndDate" position="bottom">
+                  <van-picker show-toolbar :columns="columns" @confirm="onConfirm" @cancel="showEndDate = false" />
+                </van-popup>
+              </van-col>
+            </van-row>
+            <chartsCom ref="chartsCom" :option="resumptionData" :id="'lzqk'"></chartsCom></div
+        ></van-tab>
       </van-tabs>
     </div>
   </div>
@@ -102,17 +141,33 @@ import NavBar from '@/components/NavBar'
 import OrgTree from '@/components/orgTree'
 import overview from './components/overviewCom'
 import chartsCom from '@/components/echarts/index.vue'
-import { securityPrecautions,securityData,dotData, pieGaData } from '@/views/menu/cockpit/indexEcharts.js'
+import compreDataCom from '@/views/menu/cockpit/components/comprehensiveData.vue'
+import {
+  securityPrecautions,
+  LHSData,
+  resumption,
+  ZHSData,
+  securityData,
+  dotData,
+  pieGaData
+} from '@/views/menu/cockpit/indexEcharts.js'
 export default {
   name: 'works',
   components: {
     NavBar,
     chartsCom,
+    compreDataCom,
     overview,
     OrgTree
   },
   data() {
     return {
+      lvVal:'履职排名',//
+      monthVal:'本月',//
+      showlz:false,//
+      showEndDate:false,//
+      columns: ['本月', '上月'],
+      columnsLz: ['履职排名'],
       cascaderValue: '', //机构ID
       tabOptions: [
         {
@@ -136,7 +191,11 @@ export default {
       // 网点业务库总览
       dotPieData: dotData('离行式自助银行'),
       // 保安情况
-      securityPieData: securityData('保安配备情况')
+      securityPieData: securityData('保安配备情况'),
+      LHSdata: ZHSData('在行式自助银行'),
+      ZHSdata: ZHSData('离行式自助银行'),
+      //履职情况
+      resumptionData: resumption()
     }
   },
   mounted() {
@@ -144,7 +203,16 @@ export default {
   },
   methods: {
     goBack() {},
-    getDataList() {}
+    getDataList() {},
+    onConfirm(val) {
+      this.monthVal = val
+      this.showEndDate = false
+    },
+    onConfirmLz(){
+      this.lvVal = val
+      this.showlz = false
+
+    }
   }
 }
 </script>
@@ -157,13 +225,17 @@ export default {
   margin: 20px;
   box-shadow: 0 2px 10px #ccc;
 }
-.textTitle{
-  text-align: center;
+.textTitle {
+  text-align: left;
   font-size: 30px;
   font-weight: bold;
 }
-.GA38{
+.GA38 {
   margin: 20px;
   box-shadow: 0 2px 10px #ccc;
 }
+.chartsCls {
+  font-size: 30px;
+  padding: 20px;
+}
 </style>

+ 322 - 33
src/views/menu/cockpit/indexEcharts.js

@@ -147,7 +147,7 @@ let pieGaData = (
 //网点业务总览
 let dotData = (
   title = '网点业务库总览',
-  
+
   data = [
     { value: 666, name: '巡查上报' },
     { value: 193, name: '自行处置' },
@@ -156,15 +156,14 @@ let dotData = (
     { value: 100, name: '视频抓拍' }
   ]
 ) => {
-  
   var color = ['#146de0', '#27ef5e', '#ffc140', '#d151d8', 'red']
   let option = {
     color: color,
     title: {
-        text: title,
-  
-        left: 'left'
-      },
+      text: title,
+
+      left: 'left'
+    },
     tooltip: {
       trigger: 'item',
       backgroundColor: 'rgba(0,0,0,0.5)',
@@ -181,13 +180,13 @@ let dotData = (
           '\n' +
           params.data['value'] +
           '</span>'
-        );
+        )
       }
     },
     legend: {
       orient: 'vertical',
-      icon: "circle",
-      left: '8%',
+      icon: 'circle',
+      left: '2%',
       top: '32%',
       itemWidth: 14,
       itemGap: 20,
@@ -206,14 +205,14 @@ let dotData = (
         }
       },
       formatter: function (name) {
-        var target, unit;
+        var target, unit
         for (var i = 0, l = data.length; i < l; i++) {
           if (data[i].name == name) {
-            target = data[i].value;
-            unit = data[i].unit;
+            target = data[i].value
+            unit = data[i].unit
           }
         }
-        return `{a| ${name}}{b|${target}}`;
+        return `{a| ${name}}{b|${target}}`
       }
     },
     series: [
@@ -240,32 +239,129 @@ let dotData = (
         labelLine: {
           show: false
         },
-  
+
         data: data
       }
     ]
-  };
+  }
   return option
 }
 //保安情况
 let securityData = (
   title = '保安配备情况',
-  
+
   data = [
     { value: 666, name: '已配备' },
-    { value: 193, name: '未配备' },
-  
+    { value: 193, name: '未配备' }
   ]
 ) => {
-  
   var color = ['#146de0', '#27ef5e', '#ffc140', '#d151d8', 'red']
   let option = {
     color: color,
     title: {
-        text: title,
-  
-        left: 'left'
+      text: title,
+
+      left: 'left'
+    },
+    tooltip: {
+      trigger: 'item',
+      backgroundColor: 'rgba(0,0,0,0.5)',
+      color: '#fff',
+      formatter: function (params) {
+        return (
+          params.name +
+          '<br/>' +
+          params.marker +
+          '<span style="color:' +
+          params.color +
+          '">' +
+          params.data['name'] +
+          '\n' +
+          params.data['value'] +
+          '</span>'
+        )
+      }
+    },
+    legend: {
+      orient: 'vertical',
+      icon: 'circle',
+      left: '2%',
+      top: '32%',
+      itemWidth: 14,
+      itemGap: 20,
+      textStyle: {
+        rich: {
+          a: {
+            color: '#1f1f1f',
+            fontSize: 16,
+            padding: [0, 10, 0, 0]
+          },
+          b: {
+            color: '#1f1f1f',
+            fontSize: 16,
+            padding: [0, 10, 0, 10]
+          }
+        }
       },
+      formatter: function (name) {
+        var target, unit
+        for (var i = 0, l = data.length; i < l; i++) {
+          if (data[i].name == name) {
+            target = data[i].value
+            unit = data[i].unit
+          }
+        }
+        return `{a| ${name}}{b|${target}}`
+      }
+    },
+    series: [
+      {
+        name: '',
+        type: 'pie',
+        radius: ['20%', '65%'],
+        center: ['75%', '50%'],
+        avoidLabelOverlap: true,
+        label: {
+          normal: {
+            show: true,
+            position: 'inside',
+            formatter: '{d}%',
+            textStyle: {
+              align: 'center',
+              baseline: 'middle',
+              fontSize: 16,
+              fontWeight: '100',
+              color: '#fff'
+            }
+          }
+        },
+        labelLine: {
+          show: false
+        },
+
+        data: data
+      }
+    ]
+  }
+  return option
+}
+//离行式自助银行
+let LHSData = (
+  title = '',
+
+  data = [
+    { value: 666, name: '已配备' },
+    { value: 193, name: '未配备' }
+  ]
+) => {
+  var color = ['#146de0', '#27ef5e', '#ffc140', '#d151d8', 'red']
+  let option = {
+    color: color,
+    title: {
+      text: title,
+
+      left: 'left'
+    },
     tooltip: {
       trigger: 'item',
       backgroundColor: 'rgba(0,0,0,0.5)',
@@ -282,13 +378,13 @@ let securityData = (
           '\n' +
           params.data['value'] +
           '</span>'
-        );
+        )
       }
     },
     legend: {
       orient: 'vertical',
-      icon: "circle",
-      left: '8%',
+      icon: 'circle',
+      left: '2%',
       top: '32%',
       itemWidth: 14,
       itemGap: 20,
@@ -307,14 +403,14 @@ let securityData = (
         }
       },
       formatter: function (name) {
-        var target, unit;
+        var target, unit
         for (var i = 0, l = data.length; i < l; i++) {
           if (data[i].name == name) {
-            target = data[i].value;
-            unit = data[i].unit;
+            target = data[i].value
+            unit = data[i].unit
           }
         }
-        return `{a| ${name}}{b|${target}}`;
+        return `{a| ${name}}{b|${target}}`
       }
     },
     series: [
@@ -341,12 +437,205 @@ let securityData = (
         labelLine: {
           show: false
         },
-  
+
         data: data
       }
     ]
-  };
+  }
+  return option
+}
+//在行式自助银行
+let ZHSData = (
+  title = '在行式自助银行',
+
+  data = [
+    { value: 666, name: '穿墙式设备' },
+    { value: 193, name: '大堂式设备' }
+  ]
+) => {
+  let color = ['#146de0', '#27ef5e', '#ffc140', '#d151d8', 'red']
+  const handleData = {}
+  let sum = 0
+  // 求和
+  data.map(item => {
+    sum += item.value
+  })
+  // 数据处理
+  data.map(item => {
+    handleData[item.name] = item
+    handleData[item.name].percentage = ((item.value / sum) * 100).toFixed(1) + '%'
+  })
+
+  let option = {
+    title: {
+      text: title,
+      left: 'center'
+    },
+    legend: {
+      show: true,
+      icon: 'circle',
+      right: '3%',
+      left: 'center',
+      bottom: '10%',
+      itemWidth: 10,
+      itemStyle: {
+        borderColor: 'none'
+      },
+      textStyle: {
+        rich: {
+          name: {
+            color: '#606266',
+            fontSize: 14
+          },
+          percentage: {
+            color: '#606266',
+            fontSize: 16,
+            padding: [0, 0, 0, 30],
+            align: 'right'
+          }
+        }
+      }
+    },
+    tooltip: {
+      trigger: 'item'
+    },
+    series: [
+      {
+        type: 'pie',
+        color: ['#4D88FE', '#50CCCB', '#FFBF3C'],
+        radius: '130%',
+        left: 'center',
+        label: {
+          normal: {
+            position: 'inside', // 在内部显示,outseide 是在外部显示
+            show: true,
+            formatter: '{c}'
+          }
+        },
+        data: data,
+        emphasis: {
+          itemStyle: {
+            shadowBlur: 10,
+            shadowOffsetX: 0,
+            shadowColor: 'rgba(0, 0, 0, 0.5)'
+          }
+        },
+        labelLine: {
+          normal: {
+            show: false
+          }
+        },
+
+        itemStyle: {
+          borderColor: '#fff'
+        }
+      }
+    ]
+  }
   return option
 }
- 
-export { securityPrecautions,dotData,securityData, pieGaData }
+//日常履职完成率
+let resumption = () => {
+  var getzszy = ['每日履职', '报警测试', 'UPS维护', '夜间值守', '离行巡检'] //数据点名称
+  var getzswcl = [101, 100, 100, 98.65, 98.3] //招生完成率
+  var getzswcl2 = [101, 100, 100, 98.65, 98.3] //招生完成率
+  var getzswclzd = [] //招生完成率100%
+  for (let i = 0; i < getzswcl.length; i++) {
+    if (getzswcl[i] > 100) {
+      getzswcl[i] = 100
+    }
+    getzswclzd.push(100)
+  }
+
+  let option = {
+    grid: {
+     
+      right: '15%',
+      bottom: '3%',
+      left:'20%',
+      top: '3%'
+    },
+    tooltip: {
+      trigger: 'axis',
+      axisPointer: {
+        type: 'none'
+      },
+      formatter: function (params) {
+        return getzszy[params[0].dataIndex] + '<br>招生完成率: ' + getzswcl2[params[0].dataIndex] + '%'
+      }
+    },
+    xAxis: {
+      show: false,
+      type: 'value'
+    },
+    yAxis: [
+      {
+        type: 'category',
+        inverse: true,
+        axisLabel: {
+          show: true,
+          textStyle: {
+            color: '#666666',
+            fontSize: '13'
+          }
+        },
+        splitLine: {
+          show: false
+        },
+        axisTick: {
+          show: false
+        },
+        axisLine: {
+          show: false
+        },
+        data: getzszy
+      },
+      {
+        type: 'category',
+        inverse: true,
+        axisTick: 'none',
+        axisLine: 'none',
+        show: true,
+        axisLabel: {
+          textStyle: {
+            color: '#333333',
+            fontSize: '13'
+          },
+          formatter: '{value}%'
+        },
+        data: getzswcl2
+      }
+    ],
+    series: [
+      {
+        name: '值',
+        type: 'bar',
+        zlevel: 1,
+        itemStyle: {
+          normal: {
+            barBorderRadius: 5,
+            color: '#4E7BFE'
+          }
+        },
+        barWidth: 10,
+        data: getzswcl
+      },
+      {
+        name: '背景',
+        type: 'bar',
+        barWidth: 10,
+        barGap: '-100%',
+        data: getzswclzd,
+        itemStyle: {
+          normal: {
+            color: 'rgba(103,150,253,0.3)',
+            barBorderRadius: 5
+          }
+        }
+      }
+    ]
+  }
+  return option
+}
+
+export { securityPrecautions, resumption, dotData, securityData, ZHSData, LHSData, pieGaData }

+ 2 - 2
src/views/menu/rehearsalTask/components/addRehearsalTask.vue

@@ -92,7 +92,7 @@
         <van-picker show-toolbar :columns="columns" @confirm="onConfirm" @cancel="showPicker = false" />
       </van-popup>
         <!-- 演练类型 -->
-      <van-field
+      <!-- <van-field
         readonly
         clickable
         required
@@ -102,7 +102,7 @@
         :rules="[{ required: true, message: '演练类型不能为空' }]"
         placeholder="请选择演练类型"
         @click="showPickerType = true"
-      />
+      /> -->
       <van-popup v-model="showPickerType" position="bottom">
         <van-picker show-toolbar :columns="columnsType" @confirm="onConfirmType" @cancel="showPickerType = false" />
       </van-popup>

+ 2 - 2
src/views/menu/rehearsalTask/components/rehearsalTaskSign.vue

@@ -23,10 +23,10 @@
       <div class="label">演练地点</div>
       <div>{{ trainingData.drillSite }}</div>
     </div>
-    <div class="mainItem">
+    <!-- <div class="mainItem">
       <div class="label">演练类型</div>
       <div>{{ trainingData.categoryText }}</div>
-    </div>
+    </div> -->
     <div class="mainItem mainItemData">
       <p class="label labelPeople">演练计划资料</p>
       <div>