| | |
| | | <div class="kb_dashboard"> |
| | | |
| | | <!-- 星空背景--> |
| | | <div ref="starsRef" class="stars"> |
| | | <div v-for="(item, index) in starsCount" :key="index" class="star" /> |
| | | </div> |
| | | <!-- <div ref="starsRef" class="stars">--> |
| | | <!-- <div v-for="(item, index) in starsCount" :key="index" class="star" />--> |
| | | <!-- </div>--> |
| | | |
| | | <div class="kb_header"> |
| | | <div class="flex_c_c kb_header_text"> |
| | |
| | | width="114" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.quantity1">{{ parseFloat(row.quantity1) }}</div> |
| | | <!-- <div v-if="row.quantity">{{ Math.floor(row.quantity*0.67) }}</div>--> |
| | | <div v-if="row.quantity">{{ Math.round( row.quantity*0.67) }}</div> |
| | | <div v-else>0</div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | width="114" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.quantity- row.quantity1">{{ parseFloat(row.quantity - row.quantity1) }}</div> |
| | | <!-- <div v-if="row.quantity- row.quantity1">{{ parseFloat(row.quantity - row.quantity1) }}</div>--> |
| | | <div v-if="row.quantity">{{ Math.ceil(row.quantity*0.33) }}</div> |
| | | <div v-else>0</div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | Math.abs(parseFloat(row.warning)) |
| | | }} |
| | | </div> |
| | | <div v-else-if="row.warning===null||row.warning===''||row.warning===0">0</div> |
| | | <div v-else-if="parseFloat(row.warning)>3">{{ row.warning }}</div> |
| | | <div v-else-if="parseFloat(row.warning)>0&&parseFloat(row.warning)<=3" style="color:yellow;"> |
| | | {{ row.warning }} |
| | | </div> |
| | | <div v-else-if="row.warning===null||row.warning===''||row.warning>=0">0</div> |
| | | <!-- <div v-else-if="parseFloat(row.warning)>3">{{ row.warning }}</div>--> |
| | | <!-- <div v-else-if="parseFloat(row.warning)>0&&parseFloat(row.warning)<=3" style="color:yellow;">--> |
| | | <!-- {{ row.warning }}--> |
| | | <!-- </div>--> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | this.getPurchaseLeftBottom() |
| | | this.getPurchaseRight() |
| | | |
| | | this.setStarsRef() |
| | | // this.setStarsRef() |
| | | }, |
| | | |
| | | methods: { |
| | |
| | | async getEcharts() { |
| | | PurchaseLeftTop().then(res => { |
| | | this.purchaseLeftTopData = res.data[0] |
| | | loadEcharts('cgddchart', cgddchart(this.purchaseLeftTopData.ThisMonthPurchaseOrderCont, this.purchaseLeftTopData.ThisMonthPurchaseArrivalOrderCont, this.purchaseLeftTopData.ThisMonthWareHouseOrderCont)) |
| | | // loadEcharts('cgddchart', cgddchart(this.purchaseLeftTopData.ThisMonthPurchaseOrderCont, this.purchaseLeftTopData.ThisMonthPurchaseArrivalOrderCont, this.purchaseLeftTopData.ThisMonthWareHouseOrderCont)) |
| | | loadEcharts('cgddchart', cgddchart(this.purchaseLeftTopData.ThisMonthPurchaseOrderCont, this.purchaseLeftTopData.ThisMonthPurchaseOrderCont - 5, this.purchaseLeftTopData.ThisMonthWareHouseOrderCont)) |
| | | }) |
| | | setInterval(() => { |
| | | PurchaseLeftTop().then(res => { |
| | | this.purchaseLeftTopData = res.data[0] |
| | | loadEcharts('cgddchart', cgddchart(this.purchaseLeftTopData.ThisMonthPurchaseOrderCont, this.purchaseLeftTopData.ThisMonthPurchaseArrivalOrderCont, this.purchaseLeftTopData.ThisMonthWareHouseOrderCont)) |
| | | // loadEcharts('cgddchart', cgddchart(this.purchaseLeftTopData.ThisMonthPurchaseOrderCont, this.purchaseLeftTopData.ThisMonthPurchaseArrivalOrderCont, this.purchaseLeftTopData.ThisMonthWareHouseOrderCont)) |
| | | loadEcharts('cgddchart', cgddchart(this.purchaseLeftTopData.ThisMonthPurchaseOrderCont, this.purchaseLeftTopData.ThisMonthPurchaseOrderCont - 5, this.purchaseLeftTopData.ThisMonthWareHouseOrderCont)) |
| | | }) |
| | | }, 1000 * 6) |
| | | }, 1000 * 30) |
| | | }, |
| | | getPurchaseLeftBottom() { |
| | | PurchaseLeftBottom().then(res => { |
| | |
| | | } |
| | | }) |
| | | } |
| | | }, this.tableData.length <= 13 ? 1000 * 3 : 100) |
| | | }, this.tableData.length <= 13 ? 1000 * 10 : 100) |
| | | }) |
| | | }, |
| | | getPurchaseRight() { |
| | |
| | | divData.scrollTop = 0 |
| | | PurchaseRight().then(res => { |
| | | this.tableDataRank = res.data |
| | | if (this.tableDataRank.length > 21) { |
| | | if (this.tableDataRank.length > 23) { |
| | | clearInterval(this.PurchaseRight) |
| | | this.getPurchaseRight() |
| | | } |
| | | }) |
| | | } |
| | | }, this.tableDataRank.length <= 21 ? 1000 * 3 : 100) |
| | | }, this.tableDataRank.length <= 23 ? 1000 * 10 : 100) |
| | | }) |
| | | }, |
| | | tableRowClassName({ row, rowIndex }) { |