|
@@ -37,12 +37,12 @@
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :xs="24" :sm="12" :md="6" :lg="5">
|
|
<a-col :xs="24" :sm="12" :md="6" :lg="5">
|
|
<a-form-model-item label="设备编号" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
|
|
<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-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :xs="24" :sm="12" :md="6" :lg="5">
|
|
<a-col :xs="24" :sm="12" :md="6" :lg="5">
|
|
<a-form-model-item label="排序规则" :label-col="formItemLayout.labelCol" :wrapper-col="formItemLayout.wrapperCol">
|
|
<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-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :xs="24" :sm="12" :md="6" :lg="4">
|
|
<a-col :xs="24" :sm="12" :md="6" :lg="4">
|
|
@@ -53,14 +53,24 @@
|
|
<a-row :gutter="24">
|
|
<a-row :gutter="24">
|
|
<a-col :xs="24" :sm="12" :md="6" :lg="5">
|
|
<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-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-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
|
|
</a-select>
|
|
</a-select>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :xs="24" :sm="12" :md="6" :lg="5">
|
|
<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-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-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
|
|
</a-select>
|
|
</a-select>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
@@ -77,10 +87,13 @@
|
|
</div>
|
|
</div>
|
|
<!-- 合计 -->
|
|
<!-- 合计 -->
|
|
<a-alert type="info" showIcon style="margin-bottom:15px">
|
|
<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>
|
|
</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">
|
|
<template slot="customTitle">
|
|
<a-tooltip placement="top">
|
|
<a-tooltip placement="top">
|
|
<template slot="title">
|
|
<template slot="title">
|
|
@@ -124,27 +137,52 @@
|
|
</span>
|
|
</span>
|
|
</s-table>
|
|
</s-table>
|
|
<!-- 清运弹窗 -->
|
|
<!-- 清运弹窗 -->
|
|
- <cleanModal :clernId="clernId" :openModal="isOpenModal" @close="closeCleanModal"></cleanModal>
|
|
|
|
|
|
+ <cleanModal
|
|
|
|
+ :stationNo="itemStationNo"
|
|
|
|
+ :deviceNo="itemDeviceNo"
|
|
|
|
+ :openModal="isOpenModal"
|
|
|
|
+ @close="closeCleanModal"></cleanModal>
|
|
</a-card>
|
|
</a-card>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<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 cleanModal from './cleanModal.vue'
|
|
import moment from 'moment'
|
|
import moment from 'moment'
|
|
export default {
|
|
export default {
|
|
- components: { STable, VSelect, cleanModal },
|
|
|
|
|
|
+ components: {
|
|
|
|
+ STable,
|
|
|
|
+ VSelect,
|
|
|
|
+ cleanModal
|
|
|
|
+ },
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
formItemLayout: {
|
|
formItemLayout: {
|
|
- labelCol: { span: 8 },
|
|
|
|
- wrapperCol: { span: 16 }
|
|
|
|
|
|
+ labelCol: {
|
|
|
|
+ span: 8
|
|
|
|
+ },
|
|
|
|
+ wrapperCol: {
|
|
|
|
+ span: 16
|
|
|
|
+ }
|
|
},
|
|
},
|
|
isOpenModal: false, // 默认弹窗关闭
|
|
isOpenModal: false, // 默认弹窗关闭
|
|
- clernId: null, // 当前待清运记录id
|
|
|
|
|
|
+ itemStationNo: null, // 当前待清运记录id
|
|
|
|
+ itemDeviceNo: null,
|
|
orderTotal: '', // 总计条数
|
|
orderTotal: '', // 总计条数
|
|
recyclableWasteTotal: '', // 可回收垃圾总计
|
|
recyclableWasteTotal: '', // 可回收垃圾总计
|
|
wasteClothes: '', // 废旧衣物总计
|
|
wasteClothes: '', // 废旧衣物总计
|
|
@@ -171,23 +209,93 @@ export default {
|
|
// 将默认当天时间日期回显在时间选择框中
|
|
// 将默认当天时间日期回显在时间选择框中
|
|
time: [],
|
|
time: [],
|
|
dateFormat: 'YYYY-MM-DD', // 日期格式
|
|
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 || '--' } },
|
|
{ title: '设备编号', dataIndex: 'srcDeviceCode', width: 100, align: 'center', customRender: (text) => { return text || '--' } },
|
|
{ slots: { title: 'customTitle' },
|
|
{ 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 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
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 arr = [_item.clothes, _item.paper, _item.plastic, _item.metal, _item.metPla, _item.glass, _item.recycling]
|
|
const maxVal = Math.max(...arr)
|
|
const maxVal = Math.max(...arr)
|
|
_item.maxVal = maxVal
|
|
_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
|
|
return res.data
|
|
- this.getTotal()
|
|
|
|
|
|
+ } else {
|
|
|
|
+ this.orderTotal = 0
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -284,7 +381,9 @@ export default {
|
|
this.getCityListRequest(val)
|
|
this.getCityListRequest(val)
|
|
},
|
|
},
|
|
getCityListRequest (val) {
|
|
getCityListRequest (val) {
|
|
- getCityByPro({ id: val }).then(res => {
|
|
|
|
|
|
+ getCityByPro({
|
|
|
|
+ id: val
|
|
|
|
+ }).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
this.addrCityList = res.data || []
|
|
this.addrCityList = res.data || []
|
|
} else {
|
|
} else {
|
|
@@ -299,7 +398,9 @@ export default {
|
|
this.getAreaListRequest(val)
|
|
this.getAreaListRequest(val)
|
|
},
|
|
},
|
|
getAreaListRequest (val) {
|
|
getAreaListRequest (val) {
|
|
- getDistrictByCity({ id: val }).then(res => {
|
|
|
|
|
|
+ getDistrictByCity({
|
|
|
|
+ id: val
|
|
|
|
+ }).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
this.addrDistrictList = res.data || []
|
|
this.addrDistrictList = res.data || []
|
|
} else {
|
|
} 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 () {
|
|
reset () {
|
|
this.queryParam.srcDeviceCode = undefined
|
|
this.queryParam.srcDeviceCode = undefined
|
|
@@ -341,7 +455,8 @@ export default {
|
|
},
|
|
},
|
|
// 查看清运详情
|
|
// 查看清运详情
|
|
handleDetail (record) {
|
|
handleDetail (record) {
|
|
- this.clernId = '11'
|
|
|
|
|
|
+ this.itemStationNo = record.stationNo
|
|
|
|
+ this.itemDeviceNo = record.deviceNo
|
|
this.isOpenModal = true
|
|
this.isOpenModal = true
|
|
}
|
|
}
|
|
}
|
|
}
|