|
@@ -10,7 +10,7 @@
|
|
|
>
|
|
|
<a-row :gutter="24">
|
|
|
<a-col :xs="24" :sm="12" :md="6" :lg="5">
|
|
|
- <a-form-model-item label="最后清运时间" :label-col="{ span:8 }" :wrapper-col="{ span:16}">
|
|
|
+ <a-form-model-item label="查询时间区间" :label-col="{ span:8 }" :wrapper-col="{ span:16}">
|
|
|
<a-range-picker
|
|
|
id="notCleanNetwork-time"
|
|
|
v-model="time"
|
|
@@ -23,7 +23,7 @@
|
|
|
</a-col>
|
|
|
<a-col :xs="24" :sm="12" :md="6" :lg="5">
|
|
|
<a-form-model-item label="采集员" :label-col="{ span:8}" :wrapper-col="{ span:16}">
|
|
|
- <a-input id="network-queryWord" allowClear :maxLength="30" v-model="queryParam.queryWord" placeholder="请输入姓名/手机号码" />
|
|
|
+ <a-input id="network-gatherNameOrPhone" allowClear :maxLength="30" v-model="queryParam.gatherNameOrPhone" placeholder="请输入姓名/手机号码" />
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :xs="24" :sm="12" :md="6" :lg="5">
|
|
@@ -33,7 +33,6 @@
|
|
|
id="notCleanNetwork-stationNo"
|
|
|
placeholder="请选择网点名称"
|
|
|
allowClear
|
|
|
- mode="multiple"
|
|
|
v-model="queryParam.stationNo"
|
|
|
:showSearch="true"
|
|
|
option-filter-prop="children"
|
|
@@ -42,9 +41,9 @@
|
|
|
</a-select>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
- <a-col :xs="24" :sm="12" :md="6" :lg="4">
|
|
|
- <a-button type="primary" @click="$refs.table.refresh(true)" id="notCleanNetwork-refresh" style="margin: 4px 10px 0 20px">查询</a-button>
|
|
|
- <a-button type="" @click="reset" id="notCleanNetwork-reset" style="margin-top: 4px">重置</a-button>
|
|
|
+ <a-col :xs="24" :sm="12" :md="6" :lg="5">
|
|
|
+ <a-button type="primary" @click="$refs.table.refresh(true)" id="notCleanNetwork-refresh" style="margin-top: 4px">查询</a-button>
|
|
|
+ <a-button type="" @click="reset" id="notCleanNetwork-reset" style="margin: 4px 0 0 10px">重置</a-button>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
|
|
@@ -52,19 +51,19 @@
|
|
|
</div>
|
|
|
<!-- 合计 -->
|
|
|
<a-alert type="info" showIcon style="margin-bottom:15px">
|
|
|
- <div class="ftext" slot="message">总计<span> {{ orderTotal }} </span>条,<span> {{ recyclableWasteTotal }} </span>kg。
|
|
|
- 其中,其他垃圾总计<span> {{ }} </span>kg,厨余垃圾总计<span>{{ }} </span>kg,建筑垃圾总计<span> {{ }} </span>kg
|
|
|
+ <div class="ftext" slot="message">总计<span> {{ orderTotal }} </span>条,<span> {{ total }} </span>kg。
|
|
|
+ 其中,其他垃圾总计<span> {{ otherTotal }} </span>kg,厨余垃圾总计<span>{{ chuyuTotal }} </span>kg,建筑垃圾总计<span> {{ jianzhuTotal }} </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="img">
|
|
|
- <img :src="images[0]" class="image1" @click="isShow">
|
|
|
- <viewer :images="images" class="viewer" ref="viewer"@inited="inited">
|
|
|
- <img v-for="src in images" :src="src" :key="src" class="image">
|
|
|
+ <template slot="img" slot-scope="text,record">
|
|
|
+ <img :src="record.imageUrlList ? record.imageUrlList[0] :''" class="image1" @click="isShow">
|
|
|
+ <viewer :images="record.imageUrlList? record.imageUrlList:[]" class="viewer" ref="viewer" @inited="inited" rebuild>
|
|
|
+ <img v-for="src in record.imageUrlList" :src="src" :key="src" class="image">
|
|
|
</viewer>
|
|
|
- <P>{{ images ? images.length+' 张' :'' }}</P>
|
|
|
+ <P>{{ record.imageUrlList ? record.imageUrlList.length+' 张' :'0 张' }}</P>
|
|
|
</template>
|
|
|
</s-table>
|
|
|
</s-table>
|
|
@@ -85,14 +84,15 @@ export default {
|
|
|
data () {
|
|
|
return {
|
|
|
orderTotal: 0, // 总计条数
|
|
|
- recyclableWasteTotal: 0, // 可回收垃圾总计
|
|
|
- wasteClothes: 0, // 废旧衣物总计
|
|
|
- wastePaper: 0, // 废旧纸张总计
|
|
|
- wasteMetal: 0, // 废旧金属总计
|
|
|
+ total: 0, // 可回收垃圾总计
|
|
|
+ otherTotal: 0, // 其他垃圾总计
|
|
|
+ jianzhuTotal: 0, // 建筑垃圾总计
|
|
|
+ chuyuTotal: 0, // 厨余垃圾总计
|
|
|
queryParam: {
|
|
|
stationNo: undefined, // 网点名称
|
|
|
beginDate: null, // 开始时间
|
|
|
- endDate: null // 结束时间
|
|
|
+ endDate: null, // 结束时间
|
|
|
+ gatherNameOrPhone: ''
|
|
|
},
|
|
|
optionData: [], // 网点列表数据
|
|
|
// 将默认当天时间日期回显在时间选择框中
|
|
@@ -103,22 +103,19 @@ export default {
|
|
|
dateFormat: 'YYYY-MM-DD', // 日期格式
|
|
|
columns: [
|
|
|
{ title: '序号', dataIndex: 'no', width: 60, align: 'center' },
|
|
|
- { title: '网点名称', dataIndex: 'stationName', width: 100, align: 'center', customRender: (text) => { return text || '--' } },
|
|
|
- { title: '采集员姓名', dataIndex: '', width: 100, align: 'center', customRender: (text) => { return text || '--' } },
|
|
|
- { title: '采集员手机', dataIndex: '', width: 100, align: 'center' },
|
|
|
- { title: '其他垃圾(kg)', dataIndex: 'gatherOther', width: 100, align: 'center', customRender: (text) => { return text ? (text / 1000).toFixed(3) : '0' } },
|
|
|
- { title: '厨余垃圾(kg)', dataIndex: 'gatherKitchen', width: 100, align: 'center', customRender: (text) => { return text ? (text / 1000).toFixed(3) : '0' } },
|
|
|
- { title: '建筑垃圾(kg)', dataIndex: 'gatherBuilding', width: 100, align: 'center', customRender: (text) => { return text ? (text / 1000).toFixed(3) : '0' } },
|
|
|
- { title: '总计(kg)', dataIndex: 'gatherTotal', width: 100, align: 'center', customRender: (text) => { return text ? (text / 1000).toFixed(3) : '0' } },
|
|
|
- { title: '备注', dataIndex: '', width: 100, align: 'center', customRender: (text) => { return text || '--' } },
|
|
|
- { title: '图片', width: 100, dataIndex: 'img', align: 'center', scopedSlots: { customRender: 'img' } }
|
|
|
+ { title: '创建时间', dataIndex: 'createDate', width: 150, align: 'center' },
|
|
|
+ { title: '网点名称', dataIndex: 'stationName', width: 120, align: 'center', customRender: (text) => { return text || '--' } },
|
|
|
+ { title: '采集员姓名', dataIndex: 'gatherName', width: 100, align: 'center', customRender: (text) => { return text || '--' } },
|
|
|
+ { title: '采集员手机', dataIndex: 'gatherPhone', width: 100, align: 'center', customRender: (text) => { return text || '--' } },
|
|
|
+ { title: '其他垃圾(kg)', dataIndex: 'gatherOther', width: 80, align: 'center', customRender: (text) => { return text ? (text / 1000).toFixed(3) / 1 : '0' } },
|
|
|
+ { title: '厨余垃圾(kg)', dataIndex: 'gatherKitchen', width: 80, align: 'center', customRender: (text) => { return text ? (text / 1000).toFixed(3) / 1 : '0' } },
|
|
|
+ { title: '建筑垃圾(kg)', dataIndex: 'gatherBuilding', width: 80, align: 'center', customRender: (text) => { return text ? (text / 1000).toFixed(3) / 1 : '0' } },
|
|
|
+ { title: '总计(kg)', dataIndex: 'gatherTotal', width: 80, align: 'center', customRender: (text) => { return text ? (text / 1000).toFixed(3) / 1 : '0' } },
|
|
|
+ { title: '备注', dataIndex: 'remarks', width: 100, align: 'center', customRender: (text) => { return text || '--' } },
|
|
|
+ { title: '图片', width: 100, align: 'center', scopedSlots: { customRender: 'img' } }
|
|
|
],
|
|
|
// 图片
|
|
|
- images: [
|
|
|
- 'https://picsum.photos/400/400',
|
|
|
- 'https://picsum.photos/600/600',
|
|
|
- 'https://picsum.photos/500/500'
|
|
|
- ],
|
|
|
+ images: [],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
const searchData = Object.assign(parameter, this.queryParam)
|
|
@@ -135,6 +132,7 @@ export default {
|
|
|
for (let i = 0; i < res.data.list.length; i++) {
|
|
|
const _item = res.data.list[i]
|
|
|
_item.no = no + i + 1
|
|
|
+ // this.images = _item.imageUrlList ? _item.imageUrlList : []
|
|
|
}
|
|
|
this.orderTotal = res.data.count || 0
|
|
|
this.getTotal()
|
|
@@ -189,8 +187,10 @@ export default {
|
|
|
getRubbishDetailTotal(params).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
if (res.data) {
|
|
|
- this.recyclableWasteTotal = res.data.totalWeight ? (res.data.totalWeight / 1000).toFixed(3) : '0'
|
|
|
- this.wastePaper = res.data.paper ? (res.data.paper / 1000).toFixed(3) : '0'
|
|
|
+ this.otherTotal = res.data.GATHER_OTHER ? (res.data.GATHER_OTHER / 1000).toFixed(3) / 1 : '0'
|
|
|
+ this.jianzhuTotal = res.data.GATHER_BUILDING ? (res.data.GATHER_BUILDING / 1000).toFixed(3) / 1 : '0'
|
|
|
+ this.chuyuTotal = res.data.GATHER_KITCHEN ? (res.data.GATHER_KITCHEN / 1000).toFixed(3) / 1 : '0'
|
|
|
+ this.total = res.data.GATHER_TOTAL ? (res.data.GATHER_TOTAL / 1000).toFixed(3) / 1 : '0'
|
|
|
}
|
|
|
}
|
|
|
})
|
|
@@ -200,6 +200,7 @@ export default {
|
|
|
this.queryParam.stationNo = undefined
|
|
|
this.queryParam.beginDate = null
|
|
|
this.queryParam.endDate = null
|
|
|
+ this.queryParam.gatherNameOrPhone = ''
|
|
|
this.time = [
|
|
|
moment(getDate.getRecentday().starttime, 'YYYY-MM-DD'),
|
|
|
moment(getDate.getRecentday().endtime, 'YYYY-MM-DD')
|
|
@@ -207,10 +208,16 @@ export default {
|
|
|
this.$refs.table.refresh(true)
|
|
|
},
|
|
|
inited (viewer) {
|
|
|
+ console.log('-------------44444', this.$viewer)
|
|
|
this.$viewer = viewer
|
|
|
+ console.log()
|
|
|
},
|
|
|
isShow () {
|
|
|
- this.$viewer.view()
|
|
|
+ console.log('-dianji', this.$viewer)
|
|
|
+ // const vuer = this.$el.querySelector('.viewer').$vuer
|
|
|
+ // vuer.isShow()
|
|
|
+ this.$viewer.update()
|
|
|
+ // this.$viewer.view()
|
|
|
}
|
|
|
}
|
|
|
}
|