|
@@ -80,13 +80,13 @@
|
|
<div class="ftext" slot="message">总计<span> {{ }} </span>条,可回收垃圾总计<span> {{ }} </span>kg。 其中,废旧衣物<span> {{ }} </span>kg,废旧纸张<span> {{ }} </span>kg,废旧金属<span> {{ }} </span>kg,废旧塑料<span> {{ }} </span>kg,废旧金属/塑料<span> {{ }} </span>kg,废旧玻璃<span> {{ }} </span>kg,可回收物<span> {{ }} </span>kg</div>
|
|
<div class="ftext" slot="message">总计<span> {{ }} </span>条,可回收垃圾总计<span> {{ }} </span>kg。 其中,废旧衣物<span> {{ }} </span>kg,废旧纸张<span> {{ }} </span>kg,废旧金属<span> {{ }} </span>kg,废旧塑料<span> {{ }} </span>kg,废旧金属/塑料<span> {{ }} </span>kg,废旧玻璃<span> {{ }} </span>kg,可回收物<span> {{ }} </span>kg</div>
|
|
</a-alert>
|
|
</a-alert>
|
|
<!-- 列表 -->
|
|
<!-- 列表 -->
|
|
- <a-table
|
|
|
|
|
|
+ <s-table
|
|
ref="table"
|
|
ref="table"
|
|
:rowKey="(record) => record.id"
|
|
:rowKey="(record) => record.id"
|
|
:columns="columns"
|
|
:columns="columns"
|
|
- :data-source="data"
|
|
|
|
|
|
+ :data="loadData"
|
|
bordered
|
|
bordered
|
|
- @change="changeSort">
|
|
|
|
|
|
+ >
|
|
<template slot="customTitle">
|
|
<template slot="customTitle">
|
|
<a-tooltip placement="top">
|
|
<a-tooltip placement="top">
|
|
<template slot="title">
|
|
<template slot="title">
|
|
@@ -100,110 +100,19 @@
|
|
<span slot="action" slot-scope="text,record">
|
|
<span slot="action" slot-scope="text,record">
|
|
<a-button type="primary" @click="handleDetail(record)">立即清运</a-button>
|
|
<a-button type="primary" @click="handleDetail(record)">立即清运</a-button>
|
|
</span>
|
|
</span>
|
|
- </a-table>
|
|
|
|
|
|
+ </s-table>
|
|
<!-- 清运弹窗 -->
|
|
<!-- 清运弹窗 -->
|
|
<cleanModal :id="itemId" :visible="isOpenModal" @close="isOpenModal=false"></cleanModal>
|
|
<cleanModal :id="itemId" :visible="isOpenModal" @close="isOpenModal=false"></cleanModal>
|
|
</a-card>
|
|
</a-card>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import {
|
|
|
|
- STable,
|
|
|
|
- VSelect
|
|
|
|
-} from '@/components'
|
|
|
|
-import {
|
|
|
|
- stationList
|
|
|
|
-} from '@/api/releaseRecord.js'
|
|
|
|
-import {
|
|
|
|
- getProvince,
|
|
|
|
- getCityByPro,
|
|
|
|
- getDistrictByCity
|
|
|
|
-} from '@/api/station'
|
|
|
|
|
|
+import { STable, VSelect } from '@/components'
|
|
|
|
+import { stationList } from '@/api/releaseRecord.js'
|
|
|
|
+import { cleanDetailsList } 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'
|
|
-import getDate from '@/libs/getDate.js'
|
|
|
|
-const columns = [{title: '网点名称', dataIndex: 'no',width: 60,align: 'center'},
|
|
|
|
-{title: '设备编号', dataIndex: 'name',width: 100,align: 'center',customRender: (text) => {return text || '--' }},
|
|
|
|
-{slots: { title: 'customTitle' },
|
|
|
|
- children: [
|
|
|
|
- { title: '废旧衣物', dataIndex: 'yiwu', width: 100, align: 'center', customRender: (text) => { return text || 0 } },
|
|
|
|
- { title: '废旧纸张', dataIndex: 'zhizhang', width: 100, align: 'center', customRender: (text) => { return text || 0 } },
|
|
|
|
- { title: '废旧塑料', dataIndex: 'suliao', width: 100, align: 'center', customRender: (text) => { return text || 0 } },
|
|
|
|
- { title: '废旧金属', dataIndex: 'jinshu', width: 100, align: 'center', customRender: (text) => { return text || 0 } },
|
|
|
|
- { title: '废旧金属/塑料', dataIndex: 'jssl', width: 100, align: 'center', customRender: (text) => { return text || 0 } },
|
|
|
|
- { title: '废旧玻璃', dataIndex: 'boli', width: 100, align: 'center', customRender: (text) => { return text || 0 } },
|
|
|
|
- { title: '可回收物', dataIndex: 'huishou', width: 100, align: 'center', customRender: (text) => { return text || 0 } }
|
|
|
|
- ]
|
|
|
|
-},
|
|
|
|
-{title: '可回收垃圾小计(kg)',dataIndex: 'createDate',width: 100,align: 'center'},
|
|
|
|
-{title: '最后清运时间',dataIndex: 'changjia',width: 100,align: 'center',customRender: (text) => {return text || '--'}},
|
|
|
|
-{title: '操作',dataIndex: 'action',width: 100,align: 'center',scopedSlots: {customRender: 'action'}}]
|
|
|
|
-const data = [{
|
|
|
|
- createDate: '2020-01-05',
|
|
|
|
- MAC: '22210245224555',
|
|
|
|
- name: '电子秤',
|
|
|
|
- num: '2222554585877',
|
|
|
|
- org: 'X-001',
|
|
|
|
- changjia: '上海电子厂',
|
|
|
|
- yiwu: '50',
|
|
|
|
- zhizhang: '45',
|
|
|
|
- suliao: '55',
|
|
|
|
- jinshu: '70',
|
|
|
|
- jssl: '80',
|
|
|
|
- boli: '100',
|
|
|
|
- huishou: '152'
|
|
|
|
-},
|
|
|
|
-{
|
|
|
|
- createDate: '2020-01-05',
|
|
|
|
- MAC: '22210245224555',
|
|
|
|
- name: '电子秤',
|
|
|
|
- num: '2222554585877',
|
|
|
|
- org: 'X-001',
|
|
|
|
- changjia: '上海电子厂',
|
|
|
|
- yiwu: '50',
|
|
|
|
- zhizhang: '45',
|
|
|
|
- suliao: '55',
|
|
|
|
- jinshu: '270',
|
|
|
|
- jssl: '80',
|
|
|
|
- boli: '100',
|
|
|
|
- huishou: '152'
|
|
|
|
-},
|
|
|
|
-{
|
|
|
|
- createDate: '2020-01-05',
|
|
|
|
- MAC: '22210245224555',
|
|
|
|
- name: '电子秤',
|
|
|
|
- num: '2222554585877',
|
|
|
|
- org: 'X-001',
|
|
|
|
- changjia: '上海电子厂',
|
|
|
|
- yiwu: '50',
|
|
|
|
- zhizhang: '45',
|
|
|
|
- suliao: '155',
|
|
|
|
- jinshu: '70',
|
|
|
|
- jssl: '80',
|
|
|
|
- boli: '100',
|
|
|
|
- huishou: '152'
|
|
|
|
-},
|
|
|
|
-{
|
|
|
|
- createDate: '2020-01-05',
|
|
|
|
- MAC: '22210245224555',
|
|
|
|
- name: '电子秤',
|
|
|
|
- num: '2222554585877',
|
|
|
|
- org: 'X-001',
|
|
|
|
- changjia: '上海电子厂',
|
|
|
|
- yiwu: '50',
|
|
|
|
- zhizhang: '45',
|
|
|
|
- suliao: '55',
|
|
|
|
- jinshu: '70',
|
|
|
|
- jssl: '180',
|
|
|
|
- boli: '100',
|
|
|
|
- huishou: '152'
|
|
|
|
-}
|
|
|
|
-]
|
|
|
|
-const arr = [{ yiwu: '50', zhizhang: '45', suliao: '55', jinshu: '70', jssl: '180', boli: '100', huishou: '152' },
|
|
|
|
- { yiwu: '50', zhizhang: '45', suliao: '55', jinshu: '70', jssl: '180', boli: '100', huishou: '152' },
|
|
|
|
- { yiwu: '50', zhizhang: '45', suliao: '55', jinshu: '70', jssl: '180', boli: '100', huishou: '152' },
|
|
|
|
- { yiwu: '50', zhizhang: '45', suliao: '55', jinshu: '70', jssl: '180', boli: '100', huishou: '152' }]
|
|
|
|
-// let maxNum=
|
|
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
STable,
|
|
STable,
|
|
@@ -220,32 +129,70 @@ export default {
|
|
span: 16
|
|
span: 16
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- isOpenModal: false, // 默认弹窗关闭
|
|
|
|
- itemId: '', // 行id
|
|
|
|
|
|
+ isOpenModal: false, // 默认弹窗关闭
|
|
|
|
+ itemId: '', // 行id
|
|
// 查询参数
|
|
// 查询参数
|
|
queryParam: {
|
|
queryParam: {
|
|
- stationNo: undefined,
|
|
|
|
- phone: '',
|
|
|
|
- loginFlag: '',
|
|
|
|
- beginDate: null,
|
|
|
|
- endDate: null,
|
|
|
|
|
|
+ stationNo: undefined, // 设备编号
|
|
|
|
+ phone: '', // 手机号码
|
|
|
|
+ loginFlag: '', // 状态
|
|
|
|
+ beginDate: null, // 开始时间
|
|
|
|
+ endDate: null, // 结束时间
|
|
provinceCode: undefined, // 省
|
|
provinceCode: undefined, // 省
|
|
cityCode: undefined, // 市
|
|
cityCode: undefined, // 市
|
|
districtCode: undefined // 区
|
|
districtCode: undefined // 区
|
|
},
|
|
},
|
|
// 网点名称数据
|
|
// 网点名称数据
|
|
optionData: [],
|
|
optionData: [],
|
|
- addrProvinceList: [], // 省下拉
|
|
|
|
- addrCityList: [], // 市下拉
|
|
|
|
- addrDistrictList: [], // 区下拉
|
|
|
|
- columns,
|
|
|
|
- data,
|
|
|
|
|
|
+ addrProvinceList: [], // 省下拉
|
|
|
|
+ addrCityList: [], // 市下拉
|
|
|
|
+ addrDistrictList: [], // 区下拉
|
|
// 将默认当天时间日期回显在时间选择框中
|
|
// 将默认当天时间日期回显在时间选择框中
|
|
- time: [
|
|
|
|
- moment(getDate.getRecentday().starttime, 'YYYY-MM-DD'),
|
|
|
|
- moment(getDate.getRecentday().endtime, 'YYYY-MM-DD')
|
|
|
|
- ],
|
|
|
|
- dateFormat: 'YYYY-MM-DD'
|
|
|
|
|
|
+ time: [],
|
|
|
|
+ dateFormat: 'YYYY-MM-DD', // 日期格式
|
|
|
|
+ columns: [{ title: '网点名称', dataIndex: 'no', width: 100, align: 'center' },
|
|
|
|
+ { title: '设备编号', dataIndex: 'name', width: 100, align: 'center', customRender: (text) => { return text || '--' } },
|
|
|
|
+ { slots: { title: 'customTitle' },
|
|
|
|
+ children: [
|
|
|
|
+ { title: '废旧衣物', dataIndex: 'yiwu', width: 100, align: 'center', customRender: (text) => { return text || 0 } },
|
|
|
|
+ { title: '废旧纸张', dataIndex: 'zhizhang', width: 100, align: 'center', customRender: (text) => { return text || 0 } },
|
|
|
|
+ { title: '废旧塑料', dataIndex: 'suliao', width: 100, align: 'center', customRender: (text) => { return text || 0 } },
|
|
|
|
+ { title: '废旧金属', dataIndex: 'jinshu', width: 100, align: 'center', customRender: (text) => { return text || 0 } },
|
|
|
|
+ { title: '废旧金属/塑料', dataIndex: 'jssl', width: 100, align: 'center', customRender: (text) => { return text || 0 } },
|
|
|
|
+ { title: '废旧玻璃', dataIndex: 'boli', width: 100, align: 'center', customRender: (text) => { return text || 0 } },
|
|
|
|
+ { title: '可回收物', dataIndex: 'huishou', width: 100, align: 'center', customRender: (text) => { return text || 0 } }
|
|
|
|
+ ]
|
|
|
|
+ },
|
|
|
|
+ { title: '可回收垃圾小计(kg)', dataIndex: 'createDate', width: 100, align: 'center' },
|
|
|
|
+ { title: '最后清运时间', dataIndex: 'changjia', width: 100, align: 'center', customRender: (text) => { return text || '--' } },
|
|
|
|
+ { title: '操作', dataIndex: 'action', width: 100, align: 'center', scopedSlots: { customRender: 'action' } }],
|
|
|
|
+ // 加载数据方法 必须为 Promise 对象
|
|
|
|
+ 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')
|
|
|
|
+ } else {
|
|
|
|
+ searchData.beginDate = null
|
|
|
|
+ searchData.endDate = null
|
|
|
|
+ }
|
|
|
|
+ // return cleanDetailsList(searchData).then(res => {
|
|
|
|
+ // if (res.status == 200) {
|
|
|
|
+ // const no = (res.data.pageNo - 1) * res.data.pageSize
|
|
|
|
+ // for (let i = 0; i < res.data.list.length; i++) {
|
|
|
|
+ // const _item = res.data.list[i]
|
|
|
|
+ // _item.no = no + i + 1
|
|
|
|
+ // if (_item.cleanWeight != null || 0) {
|
|
|
|
+ // _item.cleanWeight = (_item.cleanWeight / 1000).toFixed(2)
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // this.totalNum = res.data.count
|
|
|
|
+ // return res.data
|
|
|
|
+ // } else {
|
|
|
|
+ // this.totalNum = 0
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted () {
|
|
mounted () {
|
|
@@ -278,55 +225,51 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- // 获取省列表'
|
|
|
|
|
|
+ // 获取省列表
|
|
getProvinceList () {
|
|
getProvinceList () {
|
|
- getProvince().then(res => {
|
|
|
|
- if (res.status == 200) {
|
|
|
|
- this.addrProvinceList = res.data || []
|
|
|
|
- } else {
|
|
|
|
- this.addrProvinceList = []
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ getProvince().then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ this.addrProvinceList = res.data || []
|
|
|
|
+ } else {
|
|
|
|
+ this.addrProvinceList = []
|
|
|
|
+ }
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// 获取城市列表
|
|
// 获取城市列表
|
|
getCityList (val) {
|
|
getCityList (val) {
|
|
- this.addrCityList = []
|
|
|
|
- this.addrDistrictList = []
|
|
|
|
- this.queryParam.cityCode = undefined
|
|
|
|
- this.queryParam.districtCode = undefined
|
|
|
|
- this.getCityListRequest(val)
|
|
|
|
|
|
+ this.addrCityList = []
|
|
|
|
+ this.addrDistrictList = []
|
|
|
|
+ this.queryParam.cityCode = undefined
|
|
|
|
+ this.queryParam.districtCode = undefined
|
|
|
|
+ this.getCityListRequest(val)
|
|
},
|
|
},
|
|
getCityListRequest (val) {
|
|
getCityListRequest (val) {
|
|
- getCityByPro({
|
|
|
|
- id: val
|
|
|
|
- }).then(res => {
|
|
|
|
- if (res.status == 200) {
|
|
|
|
- this.addrCityList = res.data || []
|
|
|
|
- } else {
|
|
|
|
- this.addrCityList = []
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ getCityByPro({
|
|
|
|
+ id: val
|
|
|
|
+ }).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ this.addrCityList = res.data || []
|
|
|
|
+ } else {
|
|
|
|
+ this.addrCityList = []
|
|
|
|
+ }
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// 获取区县列表
|
|
// 获取区县列表
|
|
getAreaList (val) {
|
|
getAreaList (val) {
|
|
- this.addrDistrictList = []
|
|
|
|
- this.queryParam.districtCode = undefined
|
|
|
|
- this.getAreaListRequest(val)
|
|
|
|
|
|
+ this.addrDistrictList = []
|
|
|
|
+ this.queryParam.districtCode = undefined
|
|
|
|
+ this.getAreaListRequest(val)
|
|
},
|
|
},
|
|
getAreaListRequest (val) {
|
|
getAreaListRequest (val) {
|
|
- getDistrictByCity({
|
|
|
|
- id: val
|
|
|
|
- }).then(res => {
|
|
|
|
- if (res.status == 200) {
|
|
|
|
- this.addrDistrictList = res.data || []
|
|
|
|
- } else {
|
|
|
|
- this.addrDistrictList = []
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- // 排序
|
|
|
|
- changeSort () {
|
|
|
|
- console.log('-------------排序 ')
|
|
|
|
|
|
+ getDistrictByCity({
|
|
|
|
+ id: val
|
|
|
|
+ }).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ this.addrDistrictList = res.data || []
|
|
|
|
+ } else {
|
|
|
|
+ this.addrDistrictList = []
|
|
|
|
+ }
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// 重置
|
|
// 重置
|
|
reset () {
|
|
reset () {
|
|
@@ -337,16 +280,11 @@ export default {
|
|
beginDate: null,
|
|
beginDate: null,
|
|
endDate: null
|
|
endDate: null
|
|
}
|
|
}
|
|
- this.time = [
|
|
|
|
- moment(getDate.getRecentday().starttime, 'YYYY-MM-DD'),
|
|
|
|
- moment(getDate.getRecentday().endtime, 'YYYY-MM-DD')
|
|
|
|
- ]
|
|
|
|
|
|
+ this.time = []
|
|
},
|
|
},
|
|
// 查看清运详情
|
|
// 查看清运详情
|
|
handleDetail (record) {
|
|
handleDetail (record) {
|
|
- // this.itemId = record.id
|
|
|
|
this.isOpenModal = true
|
|
this.isOpenModal = true
|
|
- console.log(this.isOpenModal, '----------详情')
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|