This commit is contained in:
lxz 2024-01-09 18:34:29 +08:00
parent ed4e9542ea
commit ab5208c59c
6 changed files with 63 additions and 34 deletions

View File

@ -30,7 +30,7 @@ import { Push } from '@/common/push'
var connection = new Push({
url: 'ws://192.168.1.22:3131/', // websocket
url: 'ws://192.168.1.10:3131', // websocket
app_key: 'aaea61749929eb53a4bd75a1474c1d27',
});
// uid1

View File

@ -1,11 +1,2 @@
import mitt from 'mitt'
export const globalEventBus = mitt()

View File

@ -31,15 +31,12 @@ const choseTownFn = (id, name) => {
areaStore.changeArea({
areaCode: areaStore.area.areaCode,
streetCode: id,
name:areaStore.area.name
name:name
})
props.choseArea = false
emit('offAreaList', name)
// router.go(0)
router.replace('/townDetail?code=' + id)
}

View File

@ -54,7 +54,7 @@
<div class="right">
<datePicker></datePicker>
<div class="rigth-li" @click="choseAreaFn"> <img style="width: 1VW;height:1VW;margin-right: 0.5vw;"
src="/static/index/DW.png" alt=""> {{ area }}
src="/static/index/DW.png" alt=""> {{ areaStore.area.name||"泸县" }}
</div>
<areaList :choseArea="choseArea" @offAreaList="offAreaList" style="left: 12vw;" :key="areaStore.area.areaCode">
</areaList>
@ -146,7 +146,7 @@ const changeArea = (name, code) => {
// router.go(0)
router.replace('/')
console.log(areaStore.area)
console.log(areaStore.area.name)
}
@ -206,7 +206,12 @@ const choseArea = ref(false)
//
const offAreaList = (name) => {
choseArea.value = false
area.value = name
// area.value = name
}
const out = () => {
localStorage.removeItem('TRADE_USER')
@ -248,18 +253,24 @@ onMounted(() => {
globalEventBus.on('compheader1', data => {
showFn(0, '/')
if (SCREEN_TYPE.type == 'r') {
showFn(0, '/')
}
})
globalEventBus.on('compheader2', data => {
showFn(1, '/commodity')
if (SCREEN_TYPE.type == 'r'){
showFn(1, '/commodity')
}
})
globalEventBus.on('compheader3', data => {
showFn(2, '/Businesses')
if (SCREEN_TYPE.type == 'r'){
showFn(2, '/Businesses')
@ -269,6 +280,9 @@ globalEventBus.on('compheader3', data => {
})
globalEventBus.on('compheader4', data => {
showFn(3, '/order')
if (SCREEN_TYPE.type == 'r'){
showFn(3, '/order')
}
@ -277,6 +291,9 @@ globalEventBus.on('compheader4', data => {
globalEventBus.on('compheader5', data => {
showFn(4, '/finance')
if (SCREEN_TYPE.type == 'r'){
showFn(4, '/finance')
}
@ -287,6 +304,9 @@ globalEventBus.on('compheader5', data => {
globalEventBus.on('choserArea', data => {
changeArea(data.name, data.code)
})
</script>

View File

@ -218,17 +218,7 @@ const billList = reactive([
num: 1245
},
])
const testList = [
{
uid: "sadsa",
nickname: "sdasd",
number: 44212,
title: "asasa",
mark: "assdfjhdsjh",
create_time: '2020-12-10'
}
]
financial_record_titleApi(
{
@ -488,6 +478,7 @@ const detailData = reactive({})
const hdClick3 = (e) => {
if (e.columnIndex == 5) {
if (billType.value == 1) {
financial_record_detailApi(
{ ...areaStore.area, date: billData[e.rowIndex].time }
@ -545,7 +536,34 @@ globalEventBus.on('header5-3-2', data => {
changeBill(2)
})
globalEventBus.on('header5-3-3', data => {
hdClick(2)
if (billType.value == 1) {
financial_record_detailApi(
{ ...areaStore.area, date: data.time }
).then(res => {
for (let key in res.data) {
detailData[key] = res.data[key]
}
})
}
if (billType.value == 2) {
financial_record_detailApi2(
{ ...areaStore.area, date:data.time }
).then(res => {
for (let key in res.data) {
detailData[key] = res.data[key]
}
})
}
showPop.value = true
})
globalEventBus.on('header5-3-4', data => {
showPop.value = false
})
</script>

View File

@ -6,24 +6,24 @@
<div class="box" :style="{ opacity: showLoading ? 0 : 1 }">
<div class="body">
<div class="l">
<topLeft :areaCodes="areaCodes" :key="areaCodes.areaCode" />
<topLeft :areaCodes="areaStore.area" :key="areaStore.area.areaCode" />
</div>
<div class="c" id="">
<topCenter :areaCodes="areaCodes" :key="areaCodes.areaCode"></topCenter>
<topCenter :areaCodes="areaStore.area" :key="areaStore.area.areaCode"></topCenter>
</div>
<div class="r">
<topRight :areaCodes="areaCodes" :key="areaCodes.areaCode"></topRight>
<topRight :areaCodes="areaStore.area" :key="areaStore.area.areaCode"></topRight>
</div>
</div>
<div class="foot">
<div class="foot-l">
<bottomLeft :areaCodes="areaCodes" :key="areaCodes.areaCode"></bottomLeft>
<bottomLeft :areaCodes="areaStore.area" :key="areaStore.area.areaCode"></bottomLeft>
</div>
<div class="c">
<bottomCenter :areaCodes="areaCodes" :key="areaCodes.areaCode"></bottomCenter>
<bottomCenter :areaCodes="areaStore.area" :key="areaStore.area.areaCode"></bottomCenter>
</div>
<div class="r">
<bottomRight :areaCodes="areaCodes" :key="areaCodes.areaCode"></bottomRight>
<bottomRight :areaCodes="areaStore.area" :key="areaStore.area.areaCode"></bottomRight>
</div>
</div>
</div>
@ -53,6 +53,9 @@ console.log(areaCodes,'areacodes')
setTimeout(() => {
showLoading.value = false
}, 1000);
</script>
<style lang="scss">
@keyframes jump {