uad
This commit is contained in:
parent
ed4e9542ea
commit
ab5208c59c
|
@ -30,7 +30,7 @@ import { Push } from '@/common/push'
|
||||||
|
|
||||||
|
|
||||||
var connection = new Push({
|
var connection = new Push({
|
||||||
url: 'ws://192.168.1.22:3131/', // websocket地址
|
url: 'ws://192.168.1.10:3131', // websocket地址
|
||||||
app_key: 'aaea61749929eb53a4bd75a1474c1d27',
|
app_key: 'aaea61749929eb53a4bd75a1474c1d27',
|
||||||
});
|
});
|
||||||
// 假设用户uid为1
|
// 假设用户uid为1
|
||||||
|
|
|
@ -1,11 +1,2 @@
|
||||||
import mitt from 'mitt'
|
import mitt from 'mitt'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export const globalEventBus = mitt()
|
export const globalEventBus = mitt()
|
||||||
|
|
|
@ -31,15 +31,12 @@ const choseTownFn = (id, name) => {
|
||||||
areaStore.changeArea({
|
areaStore.changeArea({
|
||||||
areaCode: areaStore.area.areaCode,
|
areaCode: areaStore.area.areaCode,
|
||||||
streetCode: id,
|
streetCode: id,
|
||||||
name:areaStore.area.name
|
name:name
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
props.choseArea = false
|
props.choseArea = false
|
||||||
emit('offAreaList', name)
|
emit('offAreaList', name)
|
||||||
|
|
||||||
// router.go(0)
|
|
||||||
|
|
||||||
router.replace('/townDetail?code=' + id)
|
router.replace('/townDetail?code=' + id)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<datePicker></datePicker>
|
<datePicker></datePicker>
|
||||||
<div class="rigth-li" @click="choseAreaFn"> <img style="width: 1VW;height:1VW;margin-right: 0.5vw;"
|
<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>
|
</div>
|
||||||
<areaList :choseArea="choseArea" @offAreaList="offAreaList" style="left: 12vw;" :key="areaStore.area.areaCode">
|
<areaList :choseArea="choseArea" @offAreaList="offAreaList" style="left: 12vw;" :key="areaStore.area.areaCode">
|
||||||
</areaList>
|
</areaList>
|
||||||
|
@ -146,7 +146,7 @@ const changeArea = (name, code) => {
|
||||||
// router.go(0)
|
// router.go(0)
|
||||||
|
|
||||||
router.replace('/')
|
router.replace('/')
|
||||||
console.log(areaStore.area)
|
console.log(areaStore.area.name)
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -206,7 +206,12 @@ const choseArea = ref(false)
|
||||||
// 关闭
|
// 关闭
|
||||||
const offAreaList = (name) => {
|
const offAreaList = (name) => {
|
||||||
choseArea.value = false
|
choseArea.value = false
|
||||||
area.value = name
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// area.value = name
|
||||||
}
|
}
|
||||||
const out = () => {
|
const out = () => {
|
||||||
localStorage.removeItem('TRADE_USER')
|
localStorage.removeItem('TRADE_USER')
|
||||||
|
@ -248,18 +253,24 @@ onMounted(() => {
|
||||||
|
|
||||||
|
|
||||||
globalEventBus.on('compheader1', data => {
|
globalEventBus.on('compheader1', data => {
|
||||||
|
showFn(0, '/')
|
||||||
|
|
||||||
|
|
||||||
if (SCREEN_TYPE.type == 'r') {
|
if (SCREEN_TYPE.type == 'r') {
|
||||||
showFn(0, '/')
|
showFn(0, '/')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
globalEventBus.on('compheader2', data => {
|
globalEventBus.on('compheader2', data => {
|
||||||
|
showFn(1, '/commodity')
|
||||||
|
|
||||||
if (SCREEN_TYPE.type == 'r'){
|
if (SCREEN_TYPE.type == 'r'){
|
||||||
showFn(1, '/commodity')
|
showFn(1, '/commodity')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
globalEventBus.on('compheader3', data => {
|
globalEventBus.on('compheader3', data => {
|
||||||
|
showFn(2, '/Businesses')
|
||||||
|
|
||||||
if (SCREEN_TYPE.type == 'r'){
|
if (SCREEN_TYPE.type == 'r'){
|
||||||
showFn(2, '/Businesses')
|
showFn(2, '/Businesses')
|
||||||
|
@ -269,6 +280,9 @@ globalEventBus.on('compheader3', data => {
|
||||||
})
|
})
|
||||||
globalEventBus.on('compheader4', data => {
|
globalEventBus.on('compheader4', data => {
|
||||||
|
|
||||||
|
showFn(3, '/order')
|
||||||
|
|
||||||
|
|
||||||
if (SCREEN_TYPE.type == 'r'){
|
if (SCREEN_TYPE.type == 'r'){
|
||||||
showFn(3, '/order')
|
showFn(3, '/order')
|
||||||
}
|
}
|
||||||
|
@ -277,6 +291,9 @@ globalEventBus.on('compheader4', data => {
|
||||||
|
|
||||||
|
|
||||||
globalEventBus.on('compheader5', data => {
|
globalEventBus.on('compheader5', data => {
|
||||||
|
showFn(4, '/finance')
|
||||||
|
|
||||||
|
|
||||||
if (SCREEN_TYPE.type == 'r'){
|
if (SCREEN_TYPE.type == 'r'){
|
||||||
showFn(4, '/finance')
|
showFn(4, '/finance')
|
||||||
}
|
}
|
||||||
|
@ -287,6 +304,9 @@ globalEventBus.on('compheader5', data => {
|
||||||
globalEventBus.on('choserArea', data => {
|
globalEventBus.on('choserArea', data => {
|
||||||
changeArea(data.name, data.code)
|
changeArea(data.name, data.code)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -218,17 +218,7 @@ const billList = reactive([
|
||||||
num: 1245
|
num: 1245
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
const testList = [
|
|
||||||
|
|
||||||
{
|
|
||||||
uid: "sadsa",
|
|
||||||
nickname: "sdasd",
|
|
||||||
number: 44212,
|
|
||||||
title: "asasa",
|
|
||||||
mark: "assdfjhdsjh",
|
|
||||||
create_time: '2020-12-10'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
financial_record_titleApi(
|
financial_record_titleApi(
|
||||||
{
|
{
|
||||||
|
@ -488,6 +478,7 @@ const detailData = reactive({})
|
||||||
const hdClick3 = (e) => {
|
const hdClick3 = (e) => {
|
||||||
if (e.columnIndex == 5) {
|
if (e.columnIndex == 5) {
|
||||||
|
|
||||||
|
|
||||||
if (billType.value == 1) {
|
if (billType.value == 1) {
|
||||||
financial_record_detailApi(
|
financial_record_detailApi(
|
||||||
{ ...areaStore.area, date: billData[e.rowIndex].time }
|
{ ...areaStore.area, date: billData[e.rowIndex].time }
|
||||||
|
@ -545,7 +536,34 @@ globalEventBus.on('header5-3-2', data => {
|
||||||
changeBill(2)
|
changeBill(2)
|
||||||
})
|
})
|
||||||
globalEventBus.on('header5-3-3', data => {
|
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>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -6,24 +6,24 @@
|
||||||
<div class="box" :style="{ opacity: showLoading ? 0 : 1 }">
|
<div class="box" :style="{ opacity: showLoading ? 0 : 1 }">
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<div class="l">
|
<div class="l">
|
||||||
<topLeft :areaCodes="areaCodes" :key="areaCodes.areaCode" />
|
<topLeft :areaCodes="areaStore.area" :key="areaStore.area.areaCode" />
|
||||||
</div>
|
</div>
|
||||||
<div class="c" id="">
|
<div class="c" id="">
|
||||||
<topCenter :areaCodes="areaCodes" :key="areaCodes.areaCode"></topCenter>
|
<topCenter :areaCodes="areaStore.area" :key="areaStore.area.areaCode"></topCenter>
|
||||||
</div>
|
</div>
|
||||||
<div class="r">
|
<div class="r">
|
||||||
<topRight :areaCodes="areaCodes" :key="areaCodes.areaCode"></topRight>
|
<topRight :areaCodes="areaStore.area" :key="areaStore.area.areaCode"></topRight>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="foot">
|
<div class="foot">
|
||||||
<div class="foot-l">
|
<div class="foot-l">
|
||||||
<bottomLeft :areaCodes="areaCodes" :key="areaCodes.areaCode"></bottomLeft>
|
<bottomLeft :areaCodes="areaStore.area" :key="areaStore.area.areaCode"></bottomLeft>
|
||||||
</div>
|
</div>
|
||||||
<div class="c">
|
<div class="c">
|
||||||
<bottomCenter :areaCodes="areaCodes" :key="areaCodes.areaCode"></bottomCenter>
|
<bottomCenter :areaCodes="areaStore.area" :key="areaStore.area.areaCode"></bottomCenter>
|
||||||
</div>
|
</div>
|
||||||
<div class="r">
|
<div class="r">
|
||||||
<bottomRight :areaCodes="areaCodes" :key="areaCodes.areaCode"></bottomRight>
|
<bottomRight :areaCodes="areaStore.area" :key="areaStore.area.areaCode"></bottomRight>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -53,6 +53,9 @@ console.log(areaCodes,'areacodes')
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
showLoading.value = false
|
showLoading.value = false
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@keyframes jump {
|
@keyframes jump {
|
||||||
|
|
Loading…
Reference in New Issue