|
@@ -134,6 +134,7 @@
|
|
|
<!-- 操作 -->
|
|
|
<span slot="action" slot-scope="text,record">
|
|
|
<a-button type="primary" @click="handleDetail(record)" v-hasPermission="'B_notCleanNetwork_edit'" id="notCleanNetwork-handleDetail">立即清运</a-button>
|
|
|
+ <!-- <a-button type="primary" @click="handleDetail(record)" id="notCleanNetwork-handleDetail">立即清运</a-button> -->
|
|
|
<span v-if="!$hasPermissions('B_notCleanNetwork_edit')">--</span>
|
|
|
</span>
|
|
|
</s-table>
|
|
@@ -142,6 +143,7 @@
|
|
|
:stationNo="itemStationNo"
|
|
|
:deviceNo="itemDeviceNo"
|
|
|
:openModal="isOpenModal"
|
|
|
+ @refresh="refreshTable"
|
|
|
@close="closeCleanModal"></cleanModal>
|
|
|
</a-card>
|
|
|
</template>
|
|
@@ -302,8 +304,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
|
|
@@ -314,6 +316,12 @@ export default {
|
|
|
const _item = res.data.list[i]
|
|
|
// 找出可回收垃圾库存量最大的值
|
|
|
const arr = [_item.clothes, _item.paper, _item.plastic, _item.metal, _item.metPla, _item.glass, _item.recycling]
|
|
|
+ if (arr) {
|
|
|
+ arr.some(item => {
|
|
|
+ const isTrue = item != 0
|
|
|
+ console.log(isTrue)
|
|
|
+ })
|
|
|
+ }
|
|
|
const maxVal = Math.max(...arr)
|
|
|
_item.maxVal = maxVal
|
|
|
}
|
|
@@ -348,6 +356,16 @@ export default {
|
|
|
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
)
|
|
|
},
|
|
|
+ // 编辑后刷新列表
|
|
|
+ refreshTable () {
|
|
|
+ // 编辑
|
|
|
+ if (this.itemStationNo && this.itemDeviceNo) {
|
|
|
+ this.$refs.table.refresh()
|
|
|
+ } else {
|
|
|
+ // 保存
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
+ }
|
|
|
+ },
|
|
|
// 获取网点数据
|
|
|
getStationList () {
|
|
|
stationList().then(res => {
|
|
@@ -413,8 +431,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
|
|
@@ -423,7 +441,6 @@ export default {
|
|
|
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
|