Эх сурвалжийг харах

Merge remote-tracking branch 'origin/V0.0.3' into V0.0.3

yinbangyuan 1 жил өмнө
parent
commit
4c76f5a489

+ 2 - 2
src/api/cockpit.js

@@ -2,12 +2,12 @@
 import request from '@/utils/request'
 
 // 获取驾驶舱总览
-export function getOverview() {
+export function getOverview(query) {
   return request({
     url: '/core/cockpit/app/overview',
 
     method: 'get',
-    
+    params: query
   })
 }
 // 获取基础信息

+ 72 - 104
src/views/home/works.vue

@@ -5,67 +5,69 @@
     <!-- 步骤条 -->
     <van-tabs class="tab-tabs" color="#008cd6" @click="tabClickHandler" v-if="workList && workList.length > 0">
       <van-tab
-        :title="item.taskTypeText"
-        :name="worksLink(1, item.taskType)"
-        v-for="item in workList"
-        :key="item.taskType"
-        :badge="item.nums"
-      ></van-tab>
-    </van-tabs>
-
-    <div :class="big_box" @scroll="scrolling">
-      <!-- 列表 -->
-      <div class="cellMargin" v-for="item in workList" :key="item.taskType">
-        <!-- 标题区域 -->
-        <!-- lz -->
-        <van-cell
-          :value="item.nums"
-          is-link
-          :to="{ path: worksLink(3, item.taskType) }"
-          :id="worksLink(1, item.taskType)"
-        >
-          <!-- 使用 title 插槽来自定义标题 -->
-          <template #title>
-            <span class="titleLeft"> </span>
-            <span class="custom-title">{{ item.taskTypeText }} </span>
-          </template>
-        </van-cell>
-        <!-- 待办区域 -->
-        <div class="marginCls">
-          <!-- <van-empty description="暂无数据" /> -->
-          <van-cell-group>
-            <van-cell
-              @click.stop="isFalgHandler(i, item.taskType, item.id)"
-              v-for="(i, index) in item.dataList"
-              :key="index"
-              class="mainTitle"
-              :value="worksLink(2, item.taskType, i.recStatus ? i.recStatus : i.status)"
-              :label="
-                i.startTime.substring(5, i.startTime.length - 3) + '至' + i.endTime.substring(5, i.endTime.length - 3)
-              "
-              :value-class="iColorClas(item.taskType, i.status)"
-            >
-              <template #title>
-                <span class="custom-title"
-                  >{{ i.taskName }}
-                  <van-tag
-                    class="resetDy"
-                    @click.stop="resetHandler(item.id)"
-                    v-if="i.status == 1 && item.taskType == 3"
-                    type="primary"
-                    >重新调阅</van-tag
-                  ></span
-                >
-              </template>
+        :title="i.taskTypeText"
+        :name="worksLink(1, i.taskType)"
+        v-for="i in workList"
+        :key="i.taskType"
+        :badge="i.nums"
+      >
+        <!-- 列表 -->
+        <div class="cellMargin" v-for="item in workList" :key="item.taskType">
+          <!-- 标题区域 -->
+          <!-- lz -->
+          <van-cell
+            :value="item.nums"
+            is-link
+            :to="{ path: worksLink(3, item.taskType) }"
+            :id="worksLink(1, item.taskType)"
+            v-if="item.taskType==i.taskType"
+          >
+            <!-- 使用 title 插槽来自定义标题 -->
+            <template #title>
+              <span class="titleLeft"> </span>
+              <span class="custom-title">{{ item.taskTypeText }} </span>
+            </template>
+          </van-cell>
+          <!-- 待办区域 -->
+          <div class="marginCls" v-if="item.taskType==i.taskType">
+            <!-- <van-empty description="暂无数据" /> -->
+            <van-cell-group >
+              <van-cell
+              
+                @click.stop="isFalgHandler(i, item.taskType, item.id)"
+                v-for="(i, index) in item.dataList"
+                :key="index"
+                class="mainTitle"
+                :value="worksLink(2, item.taskType, i.recStatus ? i.recStatus : i.status)"
+                :label="
+                  i.startTime.substring(5, i.startTime.length - 3) + '至' + i.endTime.substring(5, i.endTime.length - 3)
+                "
+                :value-class="iColorClas(item.taskType, i.status)"
+              >
+                <template #title>
+                  <span class="custom-title"
+                    >{{ i.taskName }}
+                    <van-tag
+                      class="resetDy"
+                      @click.stop="resetHandler(item.id)"
+                      v-if="i.status == 1 && item.taskType == 3"
+                      type="primary"
+                      >重新调阅</van-tag
+                    ></span
+                  >
+                </template>
 
-              <template #right-icon>
-                <van-icon name="arrow" class="rightIcon" />
-              </template>
-            </van-cell>
-         
-          </van-cell-group>
+                <template #right-icon>
+                  <van-icon name="arrow" class="rightIcon" />
+                </template>
+              </van-cell>
+            </van-cell-group>
+          </div>
         </div>
-      </div>
+      </van-tab>
+    </van-tabs>
+
+    <div :class="big_box">
       <!-- 扫描弹框 -->
       <scandialog ref="scandialog" @input="resultImg" @changeNFC="getNFC"></scandialog>
     </div>
@@ -106,7 +108,7 @@ export default {
   },
   methods: {
     iColorClas(type, status) {
-      if (status == 0 || (type == 0 && status == 1)|| (type == 2 && status == 1)) {
+      if (status == 0 || (type == 0 && status == 1) || (type == 2 && status == 1)) {
         return 'wj-title-blue'
       } else {
         return 'wj-title-orange'
@@ -129,40 +131,7 @@ export default {
         this.$router.push({ path: this.worksLink(4, taskType, i.status, i.id, i) })
       }
     },
-    scrolling(el) {
-      // 滚动条距文档顶部的距离
-      let scrollTop = document.querySelector(`.${this.big_box}`).scrollTop || document.body.scrollTop
-      // 滚动条滚动的距离
-      let scrollStep = scrollTop - this.oldScrollTop
-      console.log('header 滚动距离 ', scrollTop)
-      // 更新——滚动前,滚动条距文档顶部的距离
-      this.oldScrollTop = scrollTop
 
-      //变量windowHeight是可视区的高度
-      let windowHeight = document.querySelector(`.${this.big_box}`).clientHeight || document.body.clientHeight
-      //变量scrollHeight是滚动条的总高度
-      let scrollHeight = document.querySelector(`.${this.big_box}`).scrollHeight || document.body.scrollHeight
-      console.log(scrollTop, 'sssssssssssss')
-      //滚动条到底部的条件
-      if (scrollTop + windowHeight == scrollHeight) {
-        console.log('到了最底')
-        this.active = 5
-        console.log(this.active, 'sss')
-        //你想做的事情
-        return
-      }
-      if (scrollTop >= 260) {
-        this.active = Math.floor(scrollTop / 250)
-      } else {
-        this.active = 0
-      }
-      // 判断是否到了最顶部
-      if (scrollTop <= 0) {
-        console.log('header 到了最顶部')
-        this.active = 0
-      }
-      console.log(this.active)
-    },
     getList() {
       getPanelList().then(res => {
         let { data, code, msg } = res
@@ -283,8 +252,8 @@ export default {
           pathInfo = '/personnelSignature/' + id + '_edit'
         }
         //安全检查跳转
-        if (val == 2 && taskType == 1||(val == 2 && taskType == 2)) {
-          pathInfo = `/securityDetail?id=${id}&enable=${taskType}` 
+        if ((val == 2 && taskType == 1) || (val == 2 && taskType == 2)) {
+          pathInfo = `/securityDetail?id=${id}&enable=${taskType}`
         }
         //履职跳转
         if ((val == 0 && taskType == 1) || (val == 0 && taskType == 2)) {
@@ -322,15 +291,14 @@ export default {
     },
     //tab栏点击
     tabClickHandler(name) {
-      const filePath = `/#${name}`
-      const tempLink = document.createElement('a')
-      tempLink.style.display = 'none'
-      tempLink.href = filePath
-
-      tempLink.setAttribute('target', '_self')
-      document.body.appendChild(tempLink)
-      tempLink.click()
-      document.body.removeChild(tempLink)
+      // const filePath = `/#${name}`
+      // const tempLink = document.createElement('a')
+      // tempLink.style.display = 'none'
+      // tempLink.href = filePath
+      // tempLink.setAttribute('target', '_self')
+      // document.body.appendChild(tempLink)
+      // tempLink.click()
+      // document.body.removeChild(tempLink)
     },
     //重新调阅
     resetHandler(id) {

+ 2 - 2
src/views/menu/cockpit/baseInfoMixins.js

@@ -14,8 +14,8 @@ export const baseInfoApi = {
   },
   methods: {
     //获取基础信息
-    getBaseInfoHandler() {
-      getAllbaseInfo().then(res => {
+    getBaseInfoHandler(data) {
+      getAllbaseInfo(data).then(res => {
         let { code, data } = res
         if (code == 200) {
           this.baseData = data

+ 27 - 10
src/views/menu/cockpit/components/comprehensiveData.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <van-tabs v-model="active" color="#008cd6">
+    <van-tabs v-model="active" class="tabsCard" color="#008cd6" type="card">
       <van-tab title="日常履职">
         <div class="boxCard">
           <van-row class="chartsCls">
@@ -278,7 +278,9 @@ export default {
   },
   name: 'SocAppComprehensiveData',
   mixins: [baseInfoApi],
-
+  props: {
+    orgId: ''
+  },
   data() {
     return {
       active: 1,
@@ -310,17 +312,29 @@ export default {
       otherEdu: null //教育培训
     }
   },
+  watch: {
+    orgId() {
+      //履职
+      this.getsynthesisResumptionfo({ month: this.month, orgId: this.orgId })
+      //问题整改
+      this.getSyntheticQuestionHandler({ month: this.questionMonth, orgId: this.orgId })
+      // 安全检查
+      this.getSafetycheck({ month: this.safetyCheckMonth, orgId: this.orgId })
+      // 其他
+      this.getQtHandler({ date: this.otherValMonth, orgId: this.orgId })
+    }
+  },
   created() {
     //设置默认月份
     this.otherValMonth = this.safetyCheckMonth = this.questionMonth = this.month = newDateMonth()
     //履职
-    this.getsynthesisResumptionfo({ month: this.month })
+    this.getsynthesisResumptionfo({ month: this.month  ,orgId: this.orgId})
     //问题整改
-    this.getSyntheticQuestionHandler({ month: this.questionMonth })
+    this.getSyntheticQuestionHandler({ month: this.questionMonth ,orgId: this.orgId })
     // 安全检查
-    this.getSafetycheck({ month: this.safetyCheckMonth })
+    this.getSafetycheck({ month: this.safetyCheckMonth ,orgId: this.orgId })
     // 其他
-    this.getQtHandler({ date: this.otherValMonth })
+    this.getQtHandler({ date: this.otherValMonth ,orgId: this.orgId })
   },
   mounted() {},
 
@@ -334,7 +348,7 @@ export default {
           } else {
             this.month = newDateMonth(new Date(), 1)
           }
-          this.getsynthesisResumptionfo({ month: this.month })
+          this.getsynthesisResumptionfo({ month: this.month ,orgId: this.orgId})
           break
         case '2': //问题整改
           this.questionVal = val
@@ -343,7 +357,7 @@ export default {
           } else {
             this.questionMonth = newDateMonth(new Date(), 1)
           }
-          this.getSyntheticQuestionHandler({ month: this.questionMonth })
+          this.getSyntheticQuestionHandler({ month: this.questionMonth ,orgId: this.orgId})
           break
 
         case '3': //安全检查
@@ -353,7 +367,7 @@ export default {
           } else {
             this.safetyCheckMonth = newDateMonth(new Date(), 1)
           }
-          this.getSafetycheck({ month: this.safetyCheckMonth })
+          this.getSafetycheck({ month: this.safetyCheckMonth ,orgId: this.orgId})
           break
         case '4': //其他
           this.otherVal = val
@@ -362,7 +376,7 @@ export default {
           } else {
             this.otherValMonth = newDateMonth(new Date(), 1)
           }
-          this.getQtHandler({ date: this.otherValMonth })
+          this.getQtHandler({ date: this.otherValMonth ,orgId: this.orgId})
           break
         default:
           break
@@ -443,4 +457,7 @@ export default {
   font-size: 28px;
   padding: 20px;
 }
+.tabsCard {
+  margin-top: 20px;
+}
 </style>

+ 14 - 6
src/views/menu/cockpit/components/overviewCom.vue

@@ -109,7 +109,9 @@ import { getOverview } from '@/api/cockpit.js'
 export default {
   name: 'SocAppOverviewCom',
   components: {},
-
+  props:{
+    orgId:''
+  },
   data() {
     return {
       list: [
@@ -167,11 +169,16 @@ export default {
     //获取基础信息
   },
   mounted() {},
-
+  watch:{
+    orgId(){
+        this.getAllList()
+    }
+  },
   methods: {
+    
     // 获取总览数据
     getAllList() {
-      getOverview().then(res => {
+      getOverview({orgId:this.orgId}).then(res => {
         let { data } = res
         this.allData = data
         this.allData.bankingCount = this.remedyZero(this.allData.bankingCount)
@@ -199,12 +206,13 @@ export default {
 </script>
 <style lang="scss" scoped>
 .titleCom {
-  background-color: #f0f0f0;
-  margin: 10px;
-  box-shadow: 0 2px 10px #ccc;
+  // background-color: #f0f0f0;
+  // margin: 10px;
+  // box-shadow: 0 2px 10px #ccc;
   .titleRow{
     box-shadow: 0 2px 10px #ccc;
     margin-left: 12px;
+    // margin-top: 10px;
   margin-right: 14px;
   }
   .itemNum {

+ 11 - 6
src/views/menu/cockpit/index.vue

@@ -7,10 +7,10 @@
       </van-col>
     </van-row>
     <div>
-      <van-tabs type="card" color="#008cd6">
+      <van-tabs color="#008cd6">
         <van-tab title="总览">
           <!-- 总览组件 -->
-          <overview></overview>
+          <overview :orgId="cascaderValue"></overview>
         </van-tab>
         <van-tab title="基础信息">
           <!-- 安全防范改造情况 -->
@@ -111,7 +111,7 @@
           </div>
         </van-tab>
         <van-tab title="综合数据">
-          <compreDataCom ref="compreDataCom"></compreDataCom>
+          <compreDataCom ref="compreDataCom" :orgId="cascaderValue"></compreDataCom>
         </van-tab>
         <van-tab title="履职情况"
           ><div class="boxCard">
@@ -209,7 +209,7 @@ export default {
   },
   mounted() {
     this.cascaderValue = JSON.parse(window.sessionStorage.getItem('SET_USER_ORGID')) + ''
-    this.getBaseInfoHandler()
+    this.getBaseInfoHandler({ orgId: this.cascaderValue })
     //设置默认排序
 
     if (this.lvVal == '升序' || this.lvVal == '履职排名') {
@@ -219,10 +219,15 @@ export default {
     }
     //设置默认月份
     this.month = newDateMonth()
-    this.getResumptionfoHandler({ desc: this.desc, month: this.month })
+    this.getResumptionfoHandler({ desc: this.desc, month: this.month, orgId: this.cascaderValue })
   },
   methods: {
-    getDataList() {},
+    getDataList(data) {
+      
+      this.cascaderValue=data.id
+      this.getResumptionfoHandler({ desc: this.desc, month: this.month, orgId: this.cascaderValue })
+      this.getBaseInfoHandler({ orgId: this.cascaderValue })
+    },
     onConfirm(val) {
       this.monthVal = val
       if (val == '本月') {

+ 41 - 13
src/views/menu/cockpit/indexEcharts.js

@@ -38,16 +38,22 @@ let securityPrecautions = (
     },
     series: [
       {
-        center: ['20%', '60%'],
+        center: ['25%', '60%'],
         name: '生命周期统计',
         type: 'pie',
         radius: '50%',
         data: data,
+      
         itemStyle: {
-          color: function (param) {
-            // console.log(param.dataIndex)
-            return colors[param.dataIndex]
-          }
+          normal: {
+            shadowColor: 'rgba(0, 0, 0, 0.8)',
+            shadowBlur: 5,
+            color: function (param) {
+              // console.log(param.dataIndex)
+              return colors[param.dataIndex]
+            }
+          },
+          
         },
         label: {
           position: 'inner',
@@ -70,7 +76,13 @@ let securityPrecautions = (
           }
         }
       }
-    ]
+    ],
+    itemStyle: {
+      normal: {
+        shadowColor: 'rgba(0, 0, 0, 0.8)',
+        shadowBlur: 5
+      }
+    },
   }
   return option
 }
@@ -221,7 +233,7 @@ let dotData = (
         name: '',
         type: 'pie',
         radius: ['20%', '65%'],
-        center: ['75%', '50%'],
+        center: ['65%', '50%'],
         avoidLabelOverlap: true,
         label: {
           normal: {
@@ -240,7 +252,12 @@ let dotData = (
         labelLine: {
           show: false
         },
-
+        itemStyle: {
+          normal: {
+            shadowColor: 'rgba(0, 0, 0, 0.8)',
+            shadowBlur: 5
+          }
+        },
         data: data
       }
     ]
@@ -320,7 +337,7 @@ let securityData = (
         name: '',
         type: 'pie',
         radius: ['20%', '65%'],
-        center: ['75%', '50%'],
+        center: ['65%', '50%'],
         avoidLabelOverlap: true,
         label: {
           normal: {
@@ -339,7 +356,12 @@ let securityData = (
         labelLine: {
           show: false
         },
-
+        itemStyle: {
+          normal: {
+            shadowColor: 'rgba(0, 0, 0, 0.8)',
+            shadowBlur: 5
+          }
+        },
         data: data
       }
     ]
@@ -526,10 +548,16 @@ let ZHSData = (
             show: false
           }
         },
-
         itemStyle: {
-          borderColor: '#fff'
-        }
+          normal: {
+            shadowColor: 'rgba(0, 0, 0, 0.8)',
+            shadowBlur: 5,
+            borderColor: '#fff'
+          }
+        },
+        // itemStyle: {
+        //   borderColor: '#fff'
+        // }
       }
     ]
   }