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

View File

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

View File

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

View File

@ -4,9 +4,11 @@
<div class="access-rate-box-title-bg"> <div class="access-rate-box-title-bg">
<h5 class="access-rate-box-title">领料数据</h5> <h5 class="access-rate-box-title">领料数据</h5>
</div> </div>
<CountFlopOne :val="num" sonTitle="施工机具今日出库"></CountFlopOne> <div @click="handleClick(1)">
<div class="access-rate-box-top"> <CountFlopOne :val="num" sonTitle="施工机具今日出库" ref="countFlop"></CountFlopOne>
<CountFlopOne :val="num2" sonTitle="工器具今日出库"></CountFlopOne> </div>
<div class="access-rate-box-top" @click="handleClick(2)">
<CountFlopOne :val="num2" sonTitle="工器具今日出库" ref="countFlopTools"></CountFlopOne>
</div> </div>
</div> </div>
</div> </div>
@ -54,7 +56,11 @@ export default {
} }
}, },
handleClick(maType) { 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"> <div class="access-rate-box-title-bg">
<h5 class="access-rate-box-title">退料数据</h5> <h5 class="access-rate-box-title">退料数据</h5>
</div> </div>
<CountFlopTwo :val="num" sonTitle="施工机具今日入库"></CountFlopTwo> <div @click="handleClick(1)">
<div class="access-rate-box-top"> <CountFlopTwo :val="num" sonTitle="施工机具今日入库" ref="countFlop"></CountFlopTwo>
<CountFlopTwo :val="num2" sonTitle="工器具今日退料"></CountFlopTwo> </div>
<div class="access-rate-box-top" @click="handleClick(2)">
<CountFlopTwo :val="num2" sonTitle="工器具今日退料" ref="countFlopTools"></CountFlopTwo>
</div> </div>
</div> </div>
</div> </div>
@ -53,7 +55,11 @@ export default {
}) })
}, },
handleClick(maType) { 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://test-cc.zhgkxt.com`,//线上环境-南网
// target: `https://z.csgmall.com.cn`, // 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.81:8080`, //韩/
// target: `http://10.40.92.74: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`, //福 // target: `http://10.40.92.14:28080`, //福
//******** 注意事项 ********* */ //******** 注意事项 ********* */