fix: bug 修复

This commit is contained in:
binbin_pan 2024-05-15 09:50:45 +08:00
parent f0180f4186
commit a377d31610
6 changed files with 38 additions and 36 deletions

View File

@ -17,7 +17,7 @@
<div class="box1-item_two">
<div>
<div class="box_header_div">
<div class="box_list" v-for="(item, index) of newArr" :key="index" @click="handleClickItem">
<div class="box_list" v-for="(item, index) of newArr" :key="index" @click="handleClickItem(index)">
<div class="item-value">
{{ item.value }}
</div>
@ -48,7 +48,7 @@ export default {
isCollapse: false,
newArrOne: [
{ name: '施工机具总保有量', value: 9999 },
// { url: GROUP, name: '', value: 9999 },
{ url: GROUP, name: '工器具总保有量', value: 9999 },
],
newArr: [
{ url: GROUP, name: '在库机具', value: 999 },
@ -62,7 +62,6 @@ export default {
{ url: GROUP, name: '报废机具', value: 999 },
{ url: GROUP, name: '报废机具', value: 999 },
],
maType: 1
}
},
mounted() {
@ -73,12 +72,6 @@ export default {
setInterval(() => {
this.getTotalOwnershipApiPage()
}, 60 * 1000);
this.$eventBus.$on('maType', (maType) => {
this.maType = maType
});
},
destroyed() {
this.$eventBus.$off('maType');
},
methods: {
getTotalOwnershipApiPage() {
@ -116,10 +109,13 @@ export default {
this.$refs['box1'].style.height = height
}
},
handleClickItem() {
setTimeout(() => {
this.$refs.inventoryDialog.setOpen({ open: true, maType: this.maType })
}, 10)
handleClickItem(index) {
// console.log('🚀 ~ handleClickItem ~ index:', index);
if (index < 5) {
this.$refs.inventoryDialog.setOpen({ open: true, maType: 1 })
} else {
this.$refs.inventoryDialog.setOpen({ open: true, maType: 2 })
}
}
}
}

View File

@ -1,7 +1,7 @@
<template>
<div class="count-title">
<p>{{ sonTitle }}</p>
<div class="count-flop" :key="compKey" @click="handleClick">
<div class="count-flop" :key="compKey">
<div
:class="item != ',' ? 'count-flop-box' : 'count-flop-point'"
v-for="(item, index) in value"
@ -41,7 +41,6 @@ export default {
value: [],
numberList: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
compKey: 0,
maType: ''
};
},
props: ["val", "suffix", 'sonTitle'],
@ -53,18 +52,13 @@ export default {
},
mounted() {
this.value = this.val.toString().split("");
this.$eventBus.$on('maType', (maType) => {
this.maType = maType
});
},
destroyed() {
this.$eventBus.$off('maType');
},
methods: {
handleClick() {
handleClick(maType) {
console.log('🚀 ~ handleClick ~ maType:', maType);
const params = {
open: true,
maType: this.maType
maType
}
this.$refs.materialsDialog.setOpen(params);
}

View File

@ -1,7 +1,7 @@
<template>
<div class="count-title">
<p>{{ sonTitle }}</p>
<div class="count-flop" :key="compKey" @click="handleClick">
<div class="count-flop" :key="compKey">
<div
:class="item != ',' ? 'count-flop-box' : 'count-flop-point'"
v-for="(item, index) in value"
@ -62,10 +62,10 @@ export default {
this.$eventBus.$off('maType');
},
methods: {
handleClick() {
handleClick(maType) {
const params = {
open: true,
maType: this.maType
maType
}
this.$refs.returnMaterialsDialog.setOpen(params);
}

View File

@ -4,9 +4,11 @@
<div class="access-rate-box-title-bg">
<h5 class="access-rate-box-title">领料数据</h5>
</div>
<CountFlopOne :val="num" sonTitle="施工机具今日出库"></CountFlopOne>
<div class="access-rate-box-top">
<CountFlopOne :val="num2" sonTitle="工器具今日出库"></CountFlopOne>
<div @click="handleClick(1)">
<CountFlopOne :val="num" sonTitle="施工机具今日出库" ref="countFlop"></CountFlopOne>
</div>
<div class="access-rate-box-top" @click="handleClick(2)">
<CountFlopOne :val="num2" sonTitle="工器具今日出库" ref="countFlopTools"></CountFlopOne>
</div>
</div>
</div>
@ -54,7 +56,11 @@ export default {
}
},
handleClick(maType) {
this.$refs.countFlopOne.handleClick(maType)
if (maType == 1) {
this.$refs.countFlop.handleClick(maType)
} else {
this.$refs.countFlopTools.handleClick(maType)
}
}
}
}

View File

@ -4,9 +4,11 @@
<div class="access-rate-box-title-bg">
<h5 class="access-rate-box-title">退料数据</h5>
</div>
<CountFlopTwo :val="num" sonTitle="施工机具今日入库"></CountFlopTwo>
<div class="access-rate-box-top">
<CountFlopTwo :val="num2" sonTitle="工器具今日退料"></CountFlopTwo>
<div @click="handleClick(1)">
<CountFlopTwo :val="num" sonTitle="施工机具今日入库" ref="countFlop"></CountFlopTwo>
</div>
<div class="access-rate-box-top" @click="handleClick(2)">
<CountFlopTwo :val="num2" sonTitle="工器具今日退料" ref="countFlopTools"></CountFlopTwo>
</div>
</div>
</div>
@ -53,7 +55,11 @@ export default {
})
},
handleClick(maType) {
this.$refs.countFlopOne.handleClick(maType)
if (maType == 1) {
this.$refs.countFlop.handleClick(maType)
} else {
this.$refs.countFlopTools.handleClick(maType)
}
}
}

View File

@ -42,10 +42,10 @@ module.exports = {
// target: `https://test-cc.zhgkxt.com`,//线上环境-南网
// target: `https://z.csgmall.com.cn`,
target: `http://10.40.92.13:38080`, //超
// target: `http://10.40.92.13:38080`, //超
// target: `http://10.40.92.81:8080`, //韩/
// target: `http://10.40.92.74:8080`,//旭/
// target: `http://10.40.92.140:28080`, //帅
target: `http://10.40.92.138:28080`, //帅
// target: `http://10.40.92.14:28080`, //福
//******** 注意事项 ********* */