| | |
| | | |
| | | <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" |
| | |
| | | :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> |
| | |
| | | }, |
| | | 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: '', |
| | |
| | | |
| | | { |
| | | 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, |
| | |
| | | }, |
| | | { |
| | | 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', |
| | |
| | | }, |
| | | { |
| | | 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', |
| | |
| | | |
| | | { |
| | | 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', |
| | | } |
| | |
| | | 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) { |
| | |
| | | }); |
| | | }, |
| | | |
| | | chenge(index) { |
| | | console.log(3333333); |
| | | console.log(index); |
| | | this.indexlist.push(index) |
| | | console.log(this.tarindex); |
| | | clickqued(e) { |
| | | var state = '' |
| | | if (this.vuex_is_login) { |
| | | if (this.tarindex == 2 && index == 2) { |
| | | const params = { |
| | | company: this.company, |
| | | } |
| | | if (this.vuex_is_login) { |
| | | if (uni.getStorageSync('isfence') == true) { |
| | | findAllFence(params).then((res) => { |
| | | if (res.data.length > 0) { |
| | | if (e.index == 0) { |
| | | this.showqued = false |
| | | } else { |
| | | console.log(11111111); |
| | | this.showqued = false |
| | | |
| | | 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.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' |
| | |
| | | |
| | | } |
| | | startorstop(params1).then((res) => {}) |
| | | } |
| | | }, |
| | | |
| | | chenge(index) { |
| | | this.indexlist.push(index) |
| | | |
| | | if (this.vuex_is_login) { |
| | | if (this.tarindex == 2 && index == 2) { |
| | | const params = { |
| | | company: this.company, |
| | | } |
| | | if (this.vuex_is_login) { |
| | | if (uni.getStorageSync('isfence') == true) { |
| | | findAllFence(params).then((res) => { |
| | | if (res.data.length > 0) { |
| | | this.showqued = true |
| | | if (this.step == 'START' || this.step == '') { |
| | | 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') { |
| | | 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, |
| | | |
| | | // } |
| | | // startorstop(params1).then((res) => {}) |
| | | } else { |
| | | this.$refs.refSuccess.showBox({ |
| | | type: 'error', |
| | |
| | | txt: '请先登录' |
| | | }); |
| | | } |
| | | |
| | | |
| | | //判断是否有围栏,以及围栏是否启用 |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } else { |
| | | |
| | | if (index != 2) { |
| | | this.tabbarList[2].title = '首页' |
| | | this.activeIconColor = 'tn-cool-bg-color-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' |
| | |
| | | // }) |
| | | // 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' |
| | |
| | | } |
| | | this.tarindex = index |
| | | } else { |
| | | // this.tarindex == 2 && index == 2'' |
| | | console.log(index); |
| | | console.log(this.currentIndex); |
| | | if (index != 4) { |
| | | this.showfaka = true |
| | | } |