Ver Fonte

修改首页

caojunjie há 4 anos atrás
pai
commit
0fcfbff99b
2 ficheiros alterados com 15 adições e 60 exclusões
  1. 15 58
      src/views/index.vue
  2. 0 2
      src/views/startApproval.vue

+ 15 - 58
src/views/index.vue

@@ -98,9 +98,8 @@
     </div>
     <div style="width: 100%;float: left;margin-top:20px;">
       <div style="display: flex;">
-        <div id="box_s" style="width:33%;height:350px;"></div>
-        <div id="box_" style="width:33%;height:350px;"></div>
-        <div id="box_ss" style="width:30%;height:350px;margin-left: 40px"></div>
+        <div id="commoDity" style="width:68%;height:350px;margin-left: 40px"></div>
+        <div id="cargoOwner" style="width:30%;height:350px;"></div>
       </div>
     </div>
     <el-dialog
@@ -119,8 +118,8 @@
     <el-button type="primary" @click="addOrUpdateHandle">查看审批</el-button>
     <el-button type="primary" @click="addOrUpdateHand">审批弹窗</el-button>
     <!-- 弹窗, 新增 / 修改 -->
-    <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate"></add-or-update>
-    <approval-comments v-if="addOrUpdateVisib" ref="ApprovalComments"></approval-comments>
+    <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
+    <approval-comments v-if="addOrUpdateVisib" ref="ApprovalComments" @refreshDataList="returnData"></approval-comments>
   </div>
 </template>
 
@@ -175,9 +174,14 @@ export default {
     this.firstinventory()
   },
   methods: {
+    getDataList(){
+      this.addOrUpdateVisible = false
+    },
+    returnData(){
+      this.addOrUpdateVisib = false
+    },
     addOrUpdateHandle(){
       this.addOrUpdateVisible = true
-      this.addOrUpdateVisib = false
       let id = '448'
       let actId = '110'
       this.$nextTick(() => {
@@ -186,7 +190,6 @@ export default {
     },
     addOrUpdateHand(){
       this.addOrUpdateVisib = true
-      this.addOrUpdateVisible = false
       let id = '448'
       let actId = '110'
       this.$nextTick(() => {
@@ -218,8 +221,7 @@ export default {
 
         this.drawLine()
         this.drawLinetwo()
-        this.drawLine_ss()
-        this.drawLinetwos()
+        this.commoDity()
       })
     },
     query() {
@@ -245,7 +247,7 @@ export default {
           }
           this.drawLine()
           this.drawLinetwo()
-          this.drawLine_ss()
+          this.commoDity()
         })
       }
     },
@@ -386,54 +388,9 @@ export default {
         ]
       })
     },
-    drawLinetwos() {
-      // 基于准备好的dom,初始化echarts实例,所以只能在mounted中调用
-      let myChart = this.$echarts.init(document.getElementById('box_'))
-      // 绘制图表
-      myChart.setOption({
-        title: {
-          text: '数据统计',
-          subtext: '实时数据',
-          left: 'center'
-        },
-        tooltip: {
-          trigger: 'item',
-          formatter: '{a} <br/>{b}: {c} ({d}%)'
-        },
-        legend: {
-          bottom: 10,
-          left: 'center',
-          data: this.name
-        },
-        series: [
-          {
-            name: '访问来源',
-            type: 'pie',
-            radius: ['40%', '60%'],
-            avoidLabelOverlap: false,
-            label: {
-              show: false,
-              position: 'center'
-            },
-            emphasis: {
-              label: {
-                // show: true,
-                fontSize: '30',
-                fontWeight: 'bold'
-              }
-            },
-            labelLine: {
-              show: false
-            },
-            data:
-            this.master
-          }
-        ]
-      })
-    },
     drawLinetwo() {
       // 基于准备好的dom,初始化echarts实例,所以只能在mounted中调用
-      let myChart = this.$echarts.init(document.getElementById('box_s'))
+      let myChart = this.$echarts.init(document.getElementById('cargoOwner'))
       // 绘制图表
       myChart.setOption({
         title: {
@@ -476,9 +433,9 @@ export default {
         ]
       })
     },
-    drawLine_ss() {
+    commoDity() {
       // 基于准备好的dom,初始化echarts实例,所以只能在mounted中调用
-      let myChart = this.$echarts.init(document.getElementById('box_ss'))
+      let myChart = this.$echarts.init(document.getElementById('commoDity'))
       // 绘制图表
       myChart.setOption({
         title: {

+ 0 - 2
src/views/startApproval.vue

@@ -114,8 +114,6 @@ import { queryUserVal } from '@/api/warehouseBusiness/agreement'
           })
       },
       closeDialog (done) {
-        done()
-        // location.reload()
         this.visible = false
         this.$emit('returnApproval', this.dataForm.id, false)
         Object.assign(this.$data, this.$options.data.call(this))