瀏覽代碼

Merge branch 'deploy_0106' of http://git.chelingzhu.com/chelingzhu-web/zxyj-admin-html into deploy_0106
报表

lilei 4 年之前
父節點
當前提交
1cbe5b3db2

+ 22 - 3
src/api/cleanManage.js

@@ -4,7 +4,7 @@ import { axios } from '@/utils/request'
 
 // 列表
 export const cleanRecordList = (params) => {
-  const url = `cleanStation/queryCleanStationByStation/${params.pageNo}/${params.pageSize}`
+  const url = `cleanStationDevice/queryCountByStation/${params.pageNo}/${params.pageSize}`
   delete params.pageNo
   delete params.pageSize
   return axios({
@@ -16,7 +16,7 @@ export const cleanRecordList = (params) => {
 
 // 总计
 export const getCleanStationTotal = (params) => {
-  const url = `cleanStation/getCleanStationTotal`
+  const url = `cleanStationDevice/getCleanStationDeviceTotal`
   return axios.request({
     url: url,
     data: params,
@@ -81,7 +81,7 @@ export const cleanUserList = (params) => {
 
 // 待清运列表
 export const netWorkCleanRecordList = (params) => {
-  const url = `clean/waitToClean/${params.pageNo}/${params.pageSize}`
+  const url = `cleanStation/waitToClean/${params.pageNo}/${params.pageSize}`
   delete params.pageNo
   delete params.pageSize
   return axios({
@@ -91,6 +91,25 @@ export const netWorkCleanRecordList = (params) => {
   })
 }
 
+// 总计
+export const getCleanStationSum = (params) => {
+  const url = `cleanStation/waitToClean/sum`
+  return axios.request({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 立即清运
+export const cleanByDevice = params => {
+  return axios({
+    url: `cleanStationDevice/cleanByDevice`,
+    data: params,
+    method: 'POST'
+  })
+}
+
 // 司机管理
 // 重置密码
 export const resetPSD = params => {

+ 5 - 5
src/views/cleanManage/cleanDetail.vue

@@ -129,8 +129,8 @@ export default {
       loadData: parameter => {
         const searchData = Object.assign(parameter, this.queryParam)
         if (this.time && this.time.length) {
-          searchData.beginDate = moment(this.time[0]).format('YYYY-MM-DD')
-          searchData.endDate = moment(this.time[1]).format('YYYY-MM-DD')
+          searchData.beginDate = moment(this.time[0]).format('YYYY-MM-DD 00:00:00')
+          searchData.endDate = moment(this.time[1]).format('YYYY-MM-DD 23:59:59')
         } else {
           searchData.beginDate = null
           searchData.endDate = null
@@ -197,8 +197,8 @@ export default {
     getTotal () {
       const params = this.queryParam
       if (this.time && this.time.length) {
-        params.beginDate = moment(this.time[0]).format('YYYY-MM-DD')
-        params.endDate = moment(this.time[1]).format('YYYY-MM-DD')
+        params.beginDate = moment(this.time[0]).format('YYYY-MM-DD 00:00:00')
+        params.endDate = moment(this.time[1]).format('YYYY-MM-DD 23:59:59')
       } else {
         params.beginDate = null
         params.endDate = null
@@ -206,7 +206,7 @@ export default {
       getCleanDetailsTotal(params).then(res => {
         if (res.status == 200) {
           if (res.data != 0 || null) {
-            this.cleanWeightTotal = (res.data / 1000).toFixed(2)
+            this.cleanWeightTotal = (res.data.cleanWeight / 1000).toFixed(2)
           }
         } else {
           this.cleanWeightTotal = 0

+ 10 - 58
src/views/cleanManage/cleanDetailModal.vue

@@ -1,12 +1,12 @@
 <template>
-  <a-modal title="清运详情" :footer="null" v-model="isShow" @cancel="isShow=false" centered>
-    <div class="detail-item"><span>废旧衣物:</span>{{ clothes }} kg</div>
+  <a-modal title="清运详情" :footer="null" v-model="isShow" @cancel="cancel" centered>
+    <!-- <div class="detail-item"><span>废旧衣物:</span>{{ clothes }} kg</div>
     <div class="detail-item"><span>废旧金属:</span>{{ metal }} kg</div>
     <div class="detail-item"><span>废旧塑料:</span>{{ plasticv }} kg</div>
     <div class="detail-item"><span>废旧纸张:</span>{{ paper }} kg</div>
     <div class="detail-item"><span>废旧玻璃:</span>{{ glass }} kg</div>
-    <div class="detail-item"><span>可回收物:</span>{{ recycling }} kg</div>
-    <div class="detail-item"><span>废旧金属/塑料:</span>{{ plaMet }} kg</div>
+    <div class="detail-item"><span>可回收物:</span>{{ recycling }} kg</div> -->
+    <div class="detail-item" v-for="item in itemData" :key="item.index"><span>{{item.rubbishType}}:</span>{{ (item.cleanWeight/1000).toFixed(2)}} kg</div>
   </a-modal>
 </template>
 
@@ -31,67 +31,20 @@ export default {
   data () {
     return {
       isShow: this.visible,
-      pageInfo: {}
+      itemData: []
     }
   },
   methods: {
+	  cancel (e) {
+	    this.$emit('close')
+	  },
     getDetailInfo () {
       getCleanDetails({ deviceNo: this.deviceNo, cleanDate: this.cleanTime }).then(res => {
-        this.pageInfo = res.data[0]
+        this.itemData = res.data
+		
       })
     }
   },
-  computed: {
-    clothes () {
-      if (this.pageInfo.clothes && (this.pageInfo.clothes != 0 || null)) {
-        return (this.pageInfo.clothes / 1000).toFixed(2)
-      } else {
-        return 0
-      }
-    },
-    metal () {
-      if (this.pageInfo.metal && (this.pageInfo.metal != 0 || null)) {
-        return (this.pageInfo.metal / 1000).toFixed(2)
-      } else {
-        return 0
-      }
-    },
-    plasticv () {
-      if (this.pageInfo.plasticv && (this.pageInfo.plasticv != 0 || null)) {
-        return (this.pageInfo.plasticv / 1000).toFixed(2)
-      } else {
-        return 0
-      }
-    },
-    paper () {
-      if (this.pageInfo.paper && (this.pageInfo.paper != 0 || null)) {
-        return (this.pageInfo.paper / 1000).toFixed(2)
-      } else {
-        return 0
-      }
-    },
-    glass () {
-      if (this.pageInfo.glass && (this.pageInfo.glass != 0 || null)) {
-        return (this.pageInfo.glass / 1000).toFixed(2)
-      } else {
-        return 0
-      }
-    },
-    recycling () {
-      if (this.pageInfo.recycling && (this.pageInfo.recycling != 0 || null)) {
-        return (this.pageInfo.recycling / 1000).toFixed(2)
-      } else {
-        return 0
-      }
-    },
-    plaMet () {
-      if (this.pageInfo.plaMet && (this.pageInfo.plaMet != 0 || null)) {
-        return (this.pageInfo.plaMet / 1000).toFixed(2)
-      } else {
-        return 0
-      }
-    }
-  },
   watch: {
     visible (newValue, oldValue) {
       this.isShow = newValue
@@ -112,7 +65,6 @@ export default {
 	.detail-item{
 		margin:10px 0;
 		letter-spacing: 0.5px;
-		font-weight: bold;
 		span{
 			display: inline-block;
 			text-align: right;

+ 32 - 24
src/views/cleanManage/cleanModal.vue

@@ -2,11 +2,11 @@
   <div>
     <a-modal title="确认清运" :footer="null" v-model="isShow" @cancel="cancel" centered>
       <a-form-model ref="ruleForm" :model="queryParam" :rules="rules" :label-col="{span:5}" :wrapper-col="{span:17}">
-        <a-form-model-item label="清运司机" prop="stationNo">
+        <a-form-model-item label="清运司机" prop="diverId">
           <a-select
             placeholder="请选择清运司机"
             allowClear
-            v-model="queryParam.stationNo"
+            v-model="queryParam.diverId"
             :showSearch="true"
             option-filter-prop="children"
             :filter-option="filterOption">
@@ -22,7 +22,7 @@
             autoSize />
         </a-form-model-item>
         <a-form-model-item :wrapper-col="{ span: 24, offset: 8 }">
-          <a-button type="primary" @click="handleSubmit()" :style="{ marginRight: '15px' }">
+          <a-button type="primary" @click="handleSubmit" :style="{ marginRight: '15px' }">
             保存
           </a-button>
           <a-button :style="{ marginLeft: '15px' }" @click="isShow=false" >
@@ -35,7 +35,7 @@
 </template>
 
 <script>
-import { driverQueryList } from '@/api/cleanManage.js'
+import { driverQueryList, cleanByDevice } from '@/api/cleanManage.js'
 export default {
   name: 'CleanModal',
   props: {
@@ -43,9 +43,13 @@ export default {
       type: Boolean,
       default: false
     },
-    clernId: {
-      type: [Number, String],
-      default: ''
+    stationNo: {
+		  type: [Number, String],
+		  default: ''
+    },
+    deviceNo: {
+		  type: [Number, String],
+		  default: ''
     }
   },
   data () {
@@ -53,11 +57,11 @@ export default {
       optionData: [], // 司机列表数据
       isShow: this.openModal,
       queryParam: {
-        stationNo: undefined,
+        diverId: undefined,
         remarks: ''
       },
       // 校验规则
-      rules: { stationNo: [{ required: true, message: '请选择清运司机', trigger: ['blur', 'change'] }] }
+      rules: { diverId: [{ required: true, message: '请选择清运司机', trigger: ['blur', 'change'] }] }
     }
   },
   methods: {
@@ -78,19 +82,24 @@ export default {
     // 保存
     handleSubmit () {
       this.$refs.ruleForm.validate(valid => {
+		 const _this = this
         if (valid) {
-          const params = JSON.parse(JSON.stringify(this.queryParam))
-          console.log(params)
-          // saveUserPower(formData).then(res => {
-          //   console.log(res, 'rrrrrrrrr')
-          //   if (res.status == 200) {
-          //     _this.$message.success(res.message)
-          //     _this.$emit('refresh')
-          //     setTimeout(function () {
-          //       _this.isshow = false
-          //     }, 300)
-          //   }
-          // })
+          const params = {
+            stationNo: this.stationNo,
+            deviceNo: this.deviceNo,
+            operatorUserId: this.queryParam.diverId,
+            remarks: this.queryParam.remarks
+          }
+          cleanByDevice(params).then(res => {
+            console.log(res, 'rrrrrrrrr')
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$emit('refresh')
+              setTimeout(function () {
+                _this.cancel()
+              }, 300)
+            }
+          })
         }
       })
     },
@@ -102,9 +111,8 @@ export default {
     // 重置input框
     clear () {
       this.$refs.ruleForm.resetFields()
-      delete this.queryParam.id
       this.queryParam = {
-        stationNo: undefined,
+        diverId: undefined,
         remarks: ''
       }
     }
@@ -122,7 +130,7 @@ export default {
         })
       }
     },
-    clernId (newValue, oldValue) {
+    stationNo (newValue, oldValue) {
       console.log(this.isShow, newValue)
       if (this.isShow && newValue) {
         this.getDriverList()

+ 2 - 2
src/views/cleanManage/netWorkCleanModal.vue

@@ -54,8 +54,8 @@ export default {
       loadData: parameter => {
         const searchDateModal = this.searchDate
         if (this.searchDate && this.searchDate.length) {
-          searchDateModal.beginDate = moment(this.searchDate[0]).format('YYYY-MM-DD')
-          searchDateModal.endDate = moment(this.searchDate[1]).format('YYYY-MM-DD')
+          searchDateModal.beginDate = moment(this.searchDate[0]).format('YYYY-MM-DD 00:00:00')
+          searchDateModal.endDate = moment(this.searchDate[1]).format('YYYY-MM-DD 23:59:59')
         } else {
           searchDateModal.beginDate = null
           searchDateModal.endDate = null

+ 1 - 1
src/views/cleanManage/netWorkCleanRecord.vue

@@ -176,7 +176,7 @@ export default {
       getCleanStationTotal(params).then(res => {
         if (res.status == 200) {
           if (res.data != 0 || null) {
-            this.cleanWeightTotal = (res.data / 1000).toFixed(2)
+            this.cleanWeightTotal = (res.data.cleanWeight / 1000).toFixed(2)
           }
         } else {
           this.cleanWeightTotal = 0

+ 181 - 66
src/views/cleanManage/notCleanNetwork.vue

@@ -37,12 +37,12 @@
           </a-col>
           <a-col :xs="24" :sm="12" :md="6" :lg="5">
             <a-form-model-item label="设备编号" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
-              <a-input allowClear placeholder="请输入设备编号" v-model.trim="queryParam.srcDeviceCode" id="notCleanNetwork-stationNo"/>
+              <a-input allowClear placeholder="请输入设备编号" v-model.trim="queryParam.srcDeviceCode" id="notCleanNetwork-stationNo" />
             </a-form-model-item>
           </a-col>
           <a-col :xs="24" :sm="12" :md="6" :lg="5">
             <a-form-model-item label="排序规则" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
-              <v-select code="WAIT_CLEAN_SORT_RULE" v-model="queryParam.orderType" allowClear placeholder="请选择" id="notCleanNetwork-stationNo" ></v-select>
+              <v-select code="WAIT_CLEAN_SORT_RULE" v-model="queryParam.orderType" allowClear placeholder="请选择" id="notCleanNetwork-stationNo"></v-select>
             </a-form-model-item>
           </a-col>
           <a-col :xs="24" :sm="12" :md="6" :lg="4">
@@ -53,14 +53,24 @@
         <a-row :gutter="24">
           <a-col :xs="24" :sm="12" :md="6" :lg="5">
             <a-form-model-item prop="provinceCode" label="所属区域:" :label-col="{ span:8 }" :wrapper-col="{ span:16}">
-              <a-select id="notCleanNetwork-provinceCode" allowClear v-model="queryParam.provinceCode" @change="getCityList" placeholder="请选择省">
+              <a-select
+                id="notCleanNetwork-provinceCode"
+                allowClear
+                v-model="queryParam.provinceCode"
+                @change="getCityList"
+                placeholder="请选择省">
                 <a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
               </a-select>
             </a-form-model-item>
           </a-col>
           <a-col :xs="24" :sm="12" :md="6" :lg="5">
             <a-form-model-item prop="cityCode" label=" " :colon="false" :label-col="{ span:8 }" :wrapper-col="{ span:16}">
-              <a-select allowClear id="notCleanNetwork-cityCode" v-model="queryParam.cityCode" @change="getAreaList" placeholder="请选择市">
+              <a-select
+                allowClear
+                id="notCleanNetwork-cityCode"
+                v-model="queryParam.cityCode"
+                @change="getAreaList"
+                placeholder="请选择市">
                 <a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
               </a-select>
             </a-form-model-item>
@@ -77,10 +87,13 @@
     </div>
     <!-- 合计 -->
     <a-alert type="info" showIcon style="margin-bottom:15px">
-      <div class="ftext" slot="message">总计<span> {{ orderTotal }} </span>条,可回收垃圾总计<span> {{ recyclableWasteTotal }} </span>kg。  其中,废旧衣物<span> {{ wasteClothes }} </span>kg,废旧纸张<span> {{ wastePaper }} </span>kg,废旧金属<span> {{ wasteMetal }} </span>kg,废旧塑料<span> {{ wastePlastics }} </span>kg,废旧金属/塑料<span> {{ wasteMetalPlastic }} </span>kg,废旧玻璃<span> {{ wasteGlass }} </span>kg,可回收物<span> {{ recyclable }} </span>kg</div>
+      <div class="ftext" slot="message">总计<span> {{ orderTotal }} </span>条,可回收垃圾总计<span> {{ recyclableWasteTotal }} </span>kg。
+        其中,废旧衣物<span> {{ wasteClothes }} </span>kg,废旧纸张<span> {{ wastePaper }} </span>kg,废旧金属<span> {{ wasteMetal }} </span>kg,废旧塑料<span>
+          {{ wastePlastics }} </span>kg,废旧金属/塑料<span> {{ wasteMetalPlastic }} </span>kg,废旧玻璃<span> {{ wasteGlass }} </span>kg,可回收物<span>
+          {{ recyclable }} </span>kg</div>
     </a-alert>
     <!-- 列表 -->
-    <s-table ref="table" :rowKey="(record) => record.id" :columns="columns" :data="loadData" bordered >
+    <s-table ref="table" :rowKey="(record) => record.id" :columns="columns" :data="loadData" bordered>
       <template slot="customTitle">
         <a-tooltip placement="top">
           <template slot="title">
@@ -124,27 +137,52 @@
       </span>
     </s-table>
     <!-- 清运弹窗 -->
-    <cleanModal :clernId="clernId" :openModal="isOpenModal" @close="closeCleanModal"></cleanModal>
+    <cleanModal
+      :stationNo="itemStationNo"
+      :deviceNo="itemDeviceNo"
+      :openModal="isOpenModal"
+      @close="closeCleanModal"></cleanModal>
   </a-card>
 </template>
 
 <script>
-import { STable, VSelect } from '@/components'
-import { stationList } from '@/api/releaseRecord.js'
-import { netWorkCleanRecordList } from '@/api/cleanManage.js'
-import { getProvince, getCityByPro, getDistrictByCity } from '@/api/station'
+import {
+  STable,
+  VSelect
+} from '@/components'
+import {
+  stationList
+} from '@/api/releaseRecord.js'
+import {
+  netWorkCleanRecordList,
+  getCleanStationSum
+} from '@/api/cleanManage.js'
+import {
+  getProvince,
+  getCityByPro,
+  getDistrictByCity
+} from '@/api/station'
 import cleanModal from './cleanModal.vue'
 import moment from 'moment'
 export default {
-  components: { STable, VSelect, cleanModal },
+  components: {
+    STable,
+    VSelect,
+    cleanModal
+  },
   data () {
     return {
       formItemLayout: {
-        labelCol: { span: 8 },
-        wrapperCol: { span: 16 }
+        labelCol: {
+          span: 8
+        },
+        wrapperCol: {
+          span: 16
+        }
       },
       isOpenModal: false, // 默认弹窗关闭
-      clernId: null, // 当前待清运记录id
+      itemStationNo: null, // 当前待清运记录id
+      itemDeviceNo: null,
       orderTotal: '', //  总计条数
       recyclableWasteTotal: '', //  可回收垃圾总计
       wasteClothes: '', //  废旧衣物总计
@@ -171,23 +209,93 @@ export default {
       // 将默认当天时间日期回显在时间选择框中
       time: [],
       dateFormat: 'YYYY-MM-DD', // 日期格式
-      columns: [
-        { title: '网点名称', dataIndex: 'stationName', width: 100, align: 'center' },
+      columns: [{ title: '网点名称', dataIndex: 'stationName', width: 100, align: 'center' },
         { title: '设备编号', dataIndex: 'srcDeviceCode', width: 100, align: 'center', customRender: (text) => { return text || '--' } },
         { slots: { title: 'customTitle' },
-          children: [
-            { title: '废旧衣物', scopedSlots: { customRender: 'clothes' }, width: 100, align: 'center' },
-            { title: '废旧纸张', scopedSlots: { customRender: 'paper' }, width: 100, align: 'center' },
-            { title: '废旧塑料', scopedSlots: { customRender: 'plastic' }, width: 100, align: 'center' },
-            { title: '废旧金属', scopedSlots: { customRender: 'metal' }, width: 100, align: 'center' },
-            { title: '废旧金属/塑料', scopedSlots: { customRender: 'metPla' }, width: 100, align: 'center' },
-            { title: '废旧玻璃', scopedSlots: { customRender: 'glass' }, width: 100, align: 'center' },
-            { title: '可回收物', scopedSlots: { customRender: 'recycling' }, width: 100, align: 'center' }
+          children: [{ title: '废旧衣物',
+            scopedSlots: {
+              customRender: 'clothes'
+            },
+            width: 100,
+            align: 'center'
+          },
+          {
+            title: '废旧纸张',
+            scopedSlots: {
+              customRender: 'paper'
+            },
+            width: 100,
+            align: 'center'
+          },
+          {
+            title: '废旧塑料',
+            scopedSlots: {
+              customRender: 'plastic'
+            },
+            width: 100,
+            align: 'center'
+          },
+          {
+            title: '废旧金属',
+            scopedSlots: {
+              customRender: 'metal'
+            },
+            width: 100,
+            align: 'center'
+          },
+          {
+            title: '废旧金属/塑料',
+            scopedSlots: {
+              customRender: 'metPla'
+            },
+            width: 100,
+            align: 'center'
+          },
+          {
+            title: '废旧玻璃',
+            scopedSlots: {
+              customRender: 'glass'
+            },
+            width: 100,
+            align: 'center'
+          },
+          {
+            title: '可回收物',
+            scopedSlots: {
+              customRender: 'recycling'
+            },
+            width: 100,
+            align: 'center'
+          }
           ]
         },
-        { title: '可回收垃圾小计(kg)', dataIndex: 'totalWeight', width: 100, align: 'center',customRender: (text) => { return (text/1000).toFixed(2) || 0 } },
-        { title: '最后清运时间', dataIndex: 'lastCleanDate', width: 100, align: 'center', customRender: (text) => { return text || '--' } },
-        { title: '操作', dataIndex: 'action', width: 100, align: 'center', scopedSlots: { customRender: 'action' } }
+        {
+          title: '可回收垃圾小计(kg)',
+          dataIndex: 'totalWeight',
+          width: 100,
+          align: 'center',
+          customRender: (text) => {
+            return (text / 1000).toFixed(2) || 0
+          }
+        },
+        {
+          title: '最后清运时间',
+          dataIndex: 'lastCleanDate',
+          width: 100,
+          align: 'center',
+          customRender: (text) => {
+            return text || '--'
+          }
+        },
+        {
+          title: '操作',
+          dataIndex: 'action',
+          width: 100,
+          align: 'center',
+          scopedSlots: {
+            customRender: 'action'
+          }
+        }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -207,23 +315,12 @@ export default {
               const arr = [_item.clothes, _item.paper, _item.plastic, _item.metal, _item.metPla, _item.glass, _item.recycling]
               const maxVal = Math.max(...arr)
               _item.maxVal = maxVal
-              // const obj = [
-              //   { 'clothes': _item.clothes },
-              //   { 'paper': _item.paper },
-              //   { 'plastic': _item.plastic },
-              //   { 'metal': _item.metal },
-              //   { 'metPla': _item.metPla },
-              //   { 'glass': _item.glass },
-              //   { 'recycling': _item.recycling }
-              // ]
-              // Object.keys(obj).forEach(key => {
-              //   if (obj[key] == maxVal) {
-              //     _item.maxName = key
-              //   }
-              // })
             }
+            this.orderTotal = res.data.count || 0
+            this.getTotal()
             return res.data
-			this.getTotal()
+          } else {
+            this.orderTotal = 0
           }
         })
       }
@@ -284,7 +381,9 @@ export default {
       this.getCityListRequest(val)
     },
     getCityListRequest (val) {
-      getCityByPro({ id: val }).then(res => {
+      getCityByPro({
+        id: val
+      }).then(res => {
         if (res.status == 200) {
           this.addrCityList = res.data || []
         } else {
@@ -299,7 +398,9 @@ export default {
       this.getAreaListRequest(val)
     },
     getAreaListRequest (val) {
-      getDistrictByCity({ id: val }).then(res => {
+      getDistrictByCity({
+        id: val
+      }).then(res => {
         if (res.status == 200) {
           this.addrDistrictList = res.data || []
         } else {
@@ -307,26 +408,39 @@ export default {
         }
       })
     },
-	// 总计
-	getTotal(){
-		const params=this.queryParam
-		if (this.time && this.time.length) {
-			params.beginDate = moment(this.time[0]).format('YYYY-MM-DD')
-			params.endDate = moment(this.time[1]).format('YYYY-MM-DD')
-		} else {
-			params.beginDate = null
-			params.endDate = null
-		}
-		// getCleanStationTotal(params).then(res => {
-		//   if (res.status == 200) {
-		//     if (res.data != 0 || null) {
-		//       this.cleanWeightTotal = (res.data / 1000).toFixed(2)
-		//     }
-		//   } else {
-		//     this.cleanWeightTotal = 0
-		//   }
-		// })
-	},
+    // 总计
+    getTotal () {
+      const params = this.queryParam
+      if (this.time && this.time.length) {
+        params.beginDate = moment(this.time[0]).format('YYYY-MM-DD')
+        params.endDate = moment(this.time[1]).format('YYYY-MM-DD')
+      } else {
+        params.beginDate = null
+        params.endDate = null
+      }
+      getCleanStationSum(params).then(res => {
+        if (res.status == 200) {
+          this.recyclableWasteTotal = (res.data.totalWeight / 1000).toFixed(2) || 0
+          this.wastePaper = (res.data.paper / 1000).toFixed(2) || 0
+
+          this.wasteClothes = (res.data.clothes / 1000).toFixed(2) || 0
+          this.wasteMetal = (res.data.metal / 1000).toFixed(2) || 0
+          this.wastePlastics = (res.data.plastic / 1000).toFixed(2) || 0
+          this.wasteMetalPlastic = (res.data.metPla / 1000).toFixed(2) || 0
+          this.wasteGlass = (res.data.glass / 1000).toFixed(2) || 0
+          this.recyclable = (res.data.recycling / 1000).toFixed(2) || 0
+        } else {
+          this.recyclableWasteTotal = 0
+          this.wasteClothes = 0
+          this.wastePaper = 0
+          this.wasteMetal = 0
+          this.wastePlastics = 0
+          this.wasteMetalPlastic = 0
+          this.wasteGlass = 0
+          this.recyclable = 0
+        }
+      })
+    },
     // 重置
     reset () {
       this.queryParam.srcDeviceCode = undefined
@@ -341,7 +455,8 @@ export default {
     },
     // 查看清运详情
     handleDetail (record) {
-      this.clernId = '11'
+      this.itemStationNo = record.stationNo
+      this.itemDeviceNo = record.deviceNo
       this.isOpenModal = true
     }
   }