瀏覽代碼

设备总量等数值的统计

yuedefeng 6 年之前
父節點
當前提交
ce22a02f56

+ 151 - 0
src/dashoo.cn/frontend_web/src/pages/lims/secondcenter/checkTotal.vue

@@ -0,0 +1,151 @@
+<template>
+  <div>
+    <el-form :inline="true" :model="formSearch" class="demo-form-inline" size="mini">
+      <el-form-item label="检测地点">
+        <el-select v-model="formSearch.checkPosition" placeholder="检测地点">
+          <el-option label="采油一厂" value="shanghai"></el-option>
+          <el-option label="采油二厂" value="beijing"></el-option>
+          <el-option label="采油三厂" value="beijing2"></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" @click="onSubmit">查询</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10">
+      <el-col :span="12">
+        <v-chart :forceFit="true" :height="height" :data="data" :scale="scale">
+          <v-tooltip />
+          <v-axis />
+          <v-bar position="year*sales" />
+        </v-chart>
+      </el-col>
+      <el-col :span="12">
+        <el-table
+          :data="tableData"
+          size="mini"
+          :height="450"
+          stripe>
+          <el-table-column
+            prop="address"
+            width="190"
+            fixed="left"
+            label="检测地点">
+          </el-table-column>
+
+          <el-table-column
+            prop="number"
+            label="设备总量"
+            width="180">
+          </el-table-column>
+
+          <el-table-column
+            prop="number"
+            label="全年待检"
+            width="180">
+          </el-table-column>
+
+          <el-table-column
+            prop="name"
+            label="全年已检"
+            width="180">
+          </el-table-column>
+
+          <el-table-column
+            prop="name"
+            label="合格率"
+            width="180">
+          </el-table-column>
+
+        </el-table>
+      </el-col>
+
+    </el-row>
+
+  </div>
+
+
+</template>
+
+<style>
+  .el-table .warning-row {
+    background: oldlace;
+  }
+
+  .el-table .success-row {
+    background: #f0f9eb;
+  }
+</style>
+
+<script>
+  const data = [
+    { year: '采油一厂', sales: 38 },
+    { year: '采油二厂', sales: 52 },
+    { year: '采油三厂', sales: 61 },
+    { year: '采油四厂', sales: 145 },
+    { year: '采油五厂', sales: 48 },
+    { year: '采油六厂', sales: 38 }
+  ]
+
+  const scale = [{
+    dataKey: 'sales',
+    tickInterval: 20
+  }]
+
+  export default {
+    created () {
+
+    },
+    data () {
+      return {
+        formSearch: {
+          daterange: [],
+          checkPosition: '',
+          equipments: []
+        },
+        data,
+        scale,
+        height: 400,
+        tableData: [{
+          precent: 70,
+          date: '120',
+          name: '111',
+          address: '采油一厂',
+        }, {
+          precent: 60,
+          date: '120',
+          name: '111',
+          address: '采油二厂'
+        }, {
+          precent: 66,
+          date: '120',
+          name: '111',
+          address: '采油三厂',
+        }, {
+          precent: 80,
+          date: '120',
+          name: '111',
+          address: '采油四厂'
+        }],
+
+        data,
+        scale,
+        pieStyle: {
+          stroke: "#fff",
+          lineWidth: 1
+        },
+        labelConfig: ['percent', {
+          formatter: (val, item) => {
+            return item.point.item + ': ' + val;
+          }
+        }]
+
+      }
+    },
+    methods: {
+      onSubmit () {
+      }
+    }
+  }
+</script>

+ 0 - 2
src/dashoo.cn/frontend_web/src/pages/lims/secondcenter/pieCheckResult.vue

@@ -82,7 +82,6 @@
 
 <script>
   const DataSet = require('@antv/data-set')
-  import ElCol from "element-ui/packages/col/src/col";
 
   const sourceData = [
     { item: '全年待检', count: 40 },
@@ -105,7 +104,6 @@
   const data = dv.rows
 
   export default {
-    components: {ElCol},
     created () {
 
     },

+ 32 - 6
src/dashoo.cn/frontend_web/src/pages/lims/secondcenter/towLevelCenter.vue

@@ -42,19 +42,35 @@
           </template>
         </el-table-column>
 
-        <el-table-column prop="DeviceQty" label="设备总量" ></el-table-column>
+        <el-table-column prop="DeviceQty" label="设备总量" >
+          <template slot-scope="scope">
+            <el-link @click="showCheckTotal(scope.row)">{{scope.row.DeviceQty}}</el-link>
+          </template>
+        </el-table-column>
 
         <!--<el-table-column prop="WaitMonth" label="本月待检"></el-table-column>
 
         <el-table-column prop="FinishMonth" label="本月检测" ></el-table-column>-->
 
-        <el-table-column prop="WaitYear" label="全年待检"></el-table-column>
+        <el-table-column prop="WaitYear" label="全年待检">
+          <template slot-scope="scope">
+            <el-link @click="showCheckTotal(scope.row)">{{scope.row.WaitYear}}</el-link>
+          </template>
+        </el-table-column>
 
-        <el-table-column prop="FinishYear" label="全年已检"></el-table-column>
+        <el-table-column prop="FinishYear" label="全年已检">
+          <template slot-scope="scope">
+            <el-link @click="showCheckTotal(scope.row)">{{scope.row.FinishYear}}</el-link>
+          </template>
+        </el-table-column>
 
        <!-- <el-table-column prop="FinishYear" label="全年检测"></el-table-column>-->
 
-        <el-table-column prop="PassRate" label="合格率(%)"></el-table-column>
+        <el-table-column prop="PassRate" label="合格率(%)">
+          <template slot-scope="scope">
+            <el-link @click="showCheckTotal(scope.row)">{{scope.row.PassRate}}</el-link>
+          </template>
+        </el-table-column>
       </el-table>
     </el-card>
 
@@ -68,10 +84,14 @@
       </v-chart>
     </el-card>
 
-    <el-dialog :visible="pieDialogVisible" width="85%" title="防雷装置检测率">
+    <el-dialog :visible.sync="pieDialogVisible" width="85%" title="防雷装置检测率">
       <pie-check-result></pie-check-result>
     </el-dialog>
 
+    <el-dialog :visible.sync="totalDialogVisible" width="85%" title="防雷装置设备总量">
+      <check-total></check-total>
+    </el-dialog>
+
   </div>
 
 
@@ -81,6 +101,7 @@
   import api from '@/api/lims/secondcenter'
 
   import pieCheckResult from './pieCheckResult.vue'
+  import checkTotal from './checkTotal.vue'
   import {
     mapGetters
   } from 'vuex'
@@ -91,12 +112,14 @@
       authUser: 'authUser'
     }),
     components: {
-      pieCheckResult
+      pieCheckResult,
+      checkTotal
     },
     data () {
       return {
         loading: true,
         pieDialogVisible: false,
+        totalDialogVisible: false,
         Isauthority: false,
         beijiance: false,
         jiancedidian: false,
@@ -170,6 +193,9 @@
       showPie (row) {
         this.pieDialogVisible = true
       },
+      showCheckTotal (row) {
+        this.totalDialogVisible = true
+      },
       getAuthority () {
         let params = {
           Code: 'lims.secondcenter.all'