@@ -1,7 +1,7 @@
<template>
<a-modal title="清运详情" :footer="null" v-model="isShow" @cancel="cancel" centered>
<div class="detail-item" v-for="item in itemData" :key="item.index"><span>{{ item.rubbishType }}:</span>{{ (item.cleanWeight/1000).toFixed(2) }} kg</div>
- <div><a-empty v-if="itemData.length == 0" style="text-align: center;" /></div>
+ <a-empty v-if="itemData.length == 0" style="text-align: center;" />
</a-modal>
</template>
@@ -25,7 +25,7 @@
<a-button type="primary" @click="handleSubmit" :style="{ marginRight: '15px' }">
保存
</a-button>
- <a-button :style="{ marginLeft: '15px' }" @click="isShow=false" >
+ <a-button :style="{ marginLeft: '15px' }" @click="cancel" >
取消
</a-form-model-item>
@@ -316,12 +316,19 @@ 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)
- })
- }
+ // if (arr) {
+ // const maxVal = Math.max(...arr)
+ // arr.some(item => {
+ // const isTrue = item === 0
+ // console.log(isTrue)
+ // if (isTrue == false) {
+ // // const maxVal = Math.max(...arr)
+ // _item.maxVal = maxVal
+ // } else {
+ // _item.maxVal = ''
+ // }
+ // })
const maxVal = Math.max(...arr)
_item.maxVal = maxVal
}
@@ -1,5 +1,5 @@
- <a-modal :footer="null" centered :title="titleText" v-model="isShow" @cancle="isShow=false">
+ <a-modal :footer="null" centered :title="titleText" v-model="isShow" @cancle="cancel">
<a-form-model :model="formData" ref="ruleForm" :rules="rules">
<a-form-model-item label="设备MAC地址" :label-col="{span:6}" :wrapper-col="{span:16}" prop="macAddress">
<a-input
@@ -26,7 +26,7 @@
<a-button type="primary" @click="handleSubmit()" :style="{ marginRight: '15px' }">
- <a-button :style="{ marginLeft: '15px' }" @click="isShow=false">
+ <a-button :style="{ marginLeft: '15px' }" @click="cancel">