| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160 |
- <template>
- <view class="container">
- <!-- 首页 -->
- <Home v-if="show === 'home'" />
- <!-- 工单管理 -->
- <Management v-if="show === 'management'" />
- <!-- 接单池 -->
- <Order v-if="show === 'order'" />
- <!-- 通讯录 -->
- <AddressBook v-if="show === 'addressBook'" />
- <!-- 待分配单 -->
- <WaitAllot v-if="show === 'waitAllot'" />
- <!-- 待处理池 -->
- <Pending v-if="show === 'pending'" />
- <!-- 报修 -->
- <Repairs v-if="show === 'repairs'" />
- <!-- 我的报修 -->
- <MyRepairs v-if="show === 'myRepairs'" />
- <!-- 底部导航栏 -->
- <Tabbar :list="list" @changeRouter="handleChangeRouter" />
- </view>
- </template>
- <script>
- import Home from '../home/home.vue'
- import Management from '../management/management.vue'
- import Order from '../order/order.vue'
- import AddressBook from '../addressBook/addressBook.vue'
- import WaitAllot from '../waitAllot/waitAllot.vue'
- import Pending from '../pending/pending.vue'
- import Repairs from '../repairs/repairs.vue'
- import MyRepairs from '../myRepairs/myRepairs.vue'
- import Tabbar from '../components/tabbar.vue'
- export default {
- components: {
- Home,
- Management,
- Order,
- AddressBook,
- WaitAllot,
- Pending,
- Repairs,
- MyRepairs,
- Tabbar
- },
- mounted() {
- this.list = this.userList
- this.show = this.list[0].show
- uni.setNavigationBarTitle({
- title: this.list[0].text
- })
- },
- data() {
- return {
- list: [],
- show: 'home',
- // 用户路由
- userList: [
- {
- text: '报修',
- imgUrl: '../../static/images/repairsImg/repairs.png',
- imgUrlActive: '../../static/images/repairsImg/repairs-active.png',
- show: 'repairs'
- },
- {
- text: '我的报修',
- imgUrl: '../../static/images/repairsImg/myRepairs.png',
- imgUrlActive: '../../static/images/repairsImg/myRepairs-active.png',
- show: 'myRepairs'
- }
- ],
- // 师傅路由
- workerList: [
- {
- text: '首页',
- icon: 'home',
- show: 'home'
- },
- {
- text: '工单管理',
- icon: 'list-dot',
- show: 'management'
- },
- {
- text: '待分配单',
- icon: 'clock',
- show: 'waitAllot'
- },
- {
- text: '接单池',
- icon: 'order',
- show: 'order'
- }
- ],
- // 后勤路由
- logisticsList: [
- {
- text: '首页',
- icon: 'home',
- show: 'home'
- },
- {
- text: '工单管理',
- icon: 'list-dot',
- show: 'management'
- },
- {
- text: '待处理池',
- icon: 'warning',
- show: 'pending'
- },
- {
- text: '通讯录',
- icon: 'phone',
- show: 'addressBook'
- }
- ],
- // 管理者路由
- adminList: [
- {
- text: '首页',
- icon: 'home',
- show: 'home'
- },
- {
- text: '工单管理',
- icon: 'list-dot',
- show: 'management'
- },
- {
- text: '待处理池',
- icon: 'warning',
- show: 'pending'
- },
- {
- text: '通讯录',
- icon: 'phone',
- show: 'addressBook'
- }
- ]
- }
- },
- methods: {
- handleChangeRouter(show, text) {
- this.show = show
- uni.setNavigationBarTitle({
- title: text
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .container {
- width: 100vw;
- height: calc(100vh - 102rpx);
- }
- </style>
|