From 645834e1c3efb3a8c50dcbda98d87caba04bd421 Mon Sep 17 00:00:00 2001 From: fei.wang <wf18701153496@163.com> Date: 星期三, 13 八月 2025 14:34:02 +0800 Subject: [PATCH] v1.2.8 --- pages/index/index.vue | 181 +++++++++++++++++++++++++++++---------------- 1 files changed, 117 insertions(+), 64 deletions(-) diff --git a/pages/index/index.vue b/pages/index/index.vue index d9aba26..c8fe3c4 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -26,24 +26,28 @@ <mainCom v-show="currentIndex == 0" ref="mainRef"></mainCom> <bumenCom v-show="currentIndex == 5" ref="mainRef" @tobumen="tobumen"></bumenCom> - <equipmentCom v-show="currentIndex == 1"></equipmentCom> + <equipmentCom v-show="currentIndex == 1" @toposition="toposition"></equipmentCom> <homeCom v-show="currentIndex == 2 && !isceju" :tabheight='tabBarHeight' :webHeight='webHeight' - :topheight='topheight' :bottomheight='bottomheight' :fenceposition="fenceposition"></homeCom> + :topheight='topheight' :bottomheight='bottomheight' :fenceposition="fenceposition" :ishide='ishide' + :isweimap='isweimap'></homeCom> <cejuCom v-if="currentIndex == 3 && isceju" :webHeight='webHeight' :topheight='topheight'></cejuCom> <fenceCom v-show="currentIndex == 3" @toggle="toggle" @toposition="toposition"></fenceCom> - <personCom v-show="currentIndex == 4" @tobumen="tobumen"></personCom> + <personCom v-show="currentIndex == 4" @tobumen="tobumen" @hidemap="hidemap" @weimap="weimap"></personCom> <view class="tn-skeleton tn-skeleton-fillet"> <tn-tabbar @change="chenge" :shadow="false" v-model="currentIndex" :safeAreaInsetBottom="true" :list="tabbarList" activeColor="#838383" inactiveColor="#AAAAAA" :activeIconColor="activeIconColor" :animation="true" v-if="showTabbar"></tn-tabbar> </view> - + <tn-skeleton :show="showSkeleton"></tn-skeleton> <u-modal confirmText="鍘荤櫥褰�" title="鎮ㄨ繕鏈櫥褰�" content="璇风櫥褰曞悗鏌ョ湅鏇村鍐呭!" cancelText="鍐嶇湅鐪�" :show="showfaka" @cancel="cancelfaka" @confirm="confirmfaka" ref="uModal" :showCancelButton="true" :closeOnClickOverlay="false"> </u-modal> + + <tn-modal v-model="showqued" :title="titlequeding" :content="contentqueding" :button="buttonqueding" + @click="clickqued"></tn-modal> <successCom ref="refSuccess"></successCom> </view> </template> @@ -73,7 +77,7 @@ import equipmentCom from './equipment.vue'; import fenceCom from './fence.vue'; - export default { + export default { components: { bumenCom, successCom, @@ -85,6 +89,22 @@ }, data() { return { + buttonqueding: [{ + text: '鍙栨秷', + backgroundColor: '#E6E6E6', + fontColor: '#FFFFFF' + }, + { + text: '纭畾', + backgroundColor: 'tn-bg-indigo', + fontColor: '#FFFFFF' + } + ], + contentqueding: '', + titlequeding: '浣跨敤鎻愰啋', + showqued: false, + isweimap: false, + ishide: false, indexlist: [2], fenceposition: '', step: '', @@ -121,8 +141,8 @@ { title: '淇℃伅', - activeIcon: '/static/tabbar/info_l_icon.png', - inactiveIcon: '/static/tabbar/info_f_icon.png', + activeIcon: '/static/tabbar/message1.png', + inactiveIcon: '/static/tabbar/message0.png', iconSize: 42, activeColor: '#40A290', // count: 0, @@ -133,8 +153,8 @@ }, { title: '鏍囩', - activeIcon: '/static/tabbar/equipment_f_icon.png', - inactiveIcon: '/static/tabbar/equipment_l_icon.png', + activeIcon: '/static/tabbar/shebei1.png', + inactiveIcon: '/static/tabbar/shebeilx.png', iconSize: 42, activeColor: '#40A290', // activeIconColor: '#FFFFFF', @@ -155,8 +175,8 @@ }, { title: '鍥存爮', - activeIcon: '/static/tabbar/fence_f_icon.png', - inactiveIcon: '/static/tabbar/fence_l_icon.png', + activeIcon: '/static/tabbar/fence1.png', + inactiveIcon: '/static/tabbar/fengce0.png', iconSize: 42, activeColor: '#40A290', // activeIconColor: '#FFFFFF', @@ -167,8 +187,8 @@ { title: '鎴戠殑', - activeIcon: '/static/tabbar/my_f_icon.png', - inactiveIcon: '/static/tabbar/my_l_icon.png', + activeIcon: '/static/tabbar/wo1.png', + inactiveIcon: '/static/tabbar/wo0.png', iconSize: 42, activeColor: '#40A290', } @@ -310,12 +330,18 @@ this.getapp(); }, 1000); }, + hidemap(e) { + this.ishide = e + }, + weimap(e) { + this.isweimap = e + }, + tobumen(e) { this.currentIndex = e }, toposition(e) { this.currentIndex = 2 - console.log(e); this.fenceposition = e }, // beforeSwitch(index) { @@ -416,12 +442,53 @@ }); }, + clickqued(e) { + var state = '' + if (e.index == 0) { + this.showqued = false + } else { + console.log(11111111); + this.showqued = false + + if (this.step == 'START' || this.step == '') { + this.tabbarList[2].title = '鏆傚仠' + this.tabbarList[2].activeIcon = 'stop' + this.activeIconColor = 'tn-cool-bg-color-16' + this.step = 'STOP' + state = 'START' + // zystate = 'START' + store.commit('$tStore', { + name: 'zystate', + value: 'START' + }) + this.workAudio() + } else if (this.step == 'STOP') { + this.tabbarList[2].title = '寮�濮�' + this.tabbarList[2].activeIcon = 'play' + this.activeIconColor = 'tn-cool-bg-color-9' + this.step = 'START' + state = 'STOP' + store.commit('$tStore', { + name: 'zystate', + value: 'STOP' + }) + this.workAudio() + } + + // } + const params1 = { + status: state, + company: this.company, + addperson: this.vuex_user, + + } + startorstop(params1).then((res) => {}) + } + }, + chenge(index) { - console.log(3333333); - console.log(index); this.indexlist.push(index) - console.log(this.tarindex); - var state = '' + if (this.vuex_is_login) { if (this.tarindex == 2 && index == 2) { const params = { @@ -431,41 +498,44 @@ if (uni.getStorageSync('isfence') == true) { findAllFence(params).then((res) => { if (res.data.length > 0) { + this.showqued = true if (this.step == 'START' || this.step == '') { - console.log(111111); - this.tabbarList[2].title = '鏆傚仠' - this.tabbarList[2].activeIcon = 'stop' - this.activeIconColor = 'tn-cool-bg-color-16' - this.step = 'STOP' - state = 'START' - // zystate = 'START' - store.commit('$tStore', { - name: 'zystate', - value: 'START' - }) - this.workAudio() + this.contentqueding = "鏄惁纭畾寮�濮嬩綔涓�" + // console.log(111111); + // this.tabbarList[2].title = '鏆傚仠' + // this.tabbarList[2].activeIcon = 'stop' + // this.activeIconColor = 'tn-cool-bg-color-16' + // this.step = 'STOP' + // state = 'START' + // // zystate = 'START' + // store.commit('$tStore', { + // name: 'zystate', + // value: 'START' + // }) + // this.workAudio() } else if (this.step == 'STOP') { - console.log(222222); - this.tabbarList[2].title = '寮�濮�' - this.tabbarList[2].activeIcon = 'play' - this.activeIconColor = 'tn-cool-bg-color-9' - this.step = 'START' - state = 'STOP' - store.commit('$tStore', { - name: 'zystate', - value: 'STOP' - }) - this.workAudio() + this.contentqueding = "鏄惁纭畾鏆傚仠浣滀笟" + // console.log(222222); + // this.tabbarList[2].title = '寮�濮�' + // this.tabbarList[2].activeIcon = 'play' + // this.activeIconColor = 'tn-cool-bg-color-9' + // this.step = 'START' + // state = 'STOP' + // store.commit('$tStore', { + // name: 'zystate', + // value: 'STOP' + // }) + // this.workAudio() } // } - const params1 = { - status: state, - company: this.company, - addperson: this.vuex_user, + // const params1 = { + // status: state, + // company: this.company, + // addperson: this.vuex_user, - } - startorstop(params1).then((res) => {}) + // } + // startorstop(params1).then((res) => {}) } else { this.$refs.refSuccess.showBox({ type: 'error', @@ -487,18 +557,7 @@ txt: '璇峰厛鐧诲綍' }); } - - - //鍒ゆ柇鏄惁鏈夊洿鏍忥紝浠ュ強鍥存爮鏄惁鍚敤 - - - - - - - } else { - if (index != 2) { this.tabbarList[2].title = '棣栭〉' this.activeIconColor = 'tn-cool-bg-color-7' @@ -510,9 +569,7 @@ // this.tabbarList[2].title = '寮�濮�' // this.tabbarList[2].activeIcon = 'play' // this.activeIconColor = 'tn-cool-bg-color-9' - console.log(this.step); if (this.step == 'START' || this.step == '') { - console.log(111111); this.tabbarList[2].title = '寮�濮�' this.tabbarList[2].activeIcon = 'play' this.activeIconColor = 'tn-cool-bg-color-9' @@ -525,7 +582,6 @@ // }) // this.workAudio() } else if (this.step == 'STOP') { - console.log(222222); this.tabbarList[2].title = '鏆傚仠' this.tabbarList[2].activeIcon = 'stop' this.activeIconColor = 'tn-cool-bg-color-16' @@ -542,9 +598,6 @@ } this.tarindex = index } else { - // this.tarindex == 2 && index == 2'' - console.log(index); - console.log(this.currentIndex); if (index != 4) { this.showfaka = true } -- Gitblit v1.9.3