11 files modified
11 files added
| | |
| | | |
| | | |
| | | export const getTabbarList = (roleType = 1) => { |
| | | if (roleType == 2) { |
| | | if (roleType == 1) { //居民 |
| | | return [{ |
| | | name: '首页', |
| | | iconPathSelected: '/static/img/tabbar-01-selected.png', |
| | | iconPath: '/static/img/tabbar-01.png', |
| | | url: '/pages/home/index' |
| | | }, |
| | | { |
| | | name: '圈子', |
| | | iconPathSelected: '/static/img/tabbar-02-selected.png', |
| | | iconPath: '/static/img/tabbar-02.png', |
| | | url: '/pages/circle/index' |
| | | }, |
| | | { |
| | | name: '我的', |
| | | iconPathSelected: '/static/img/tabbar-03-selected.png', |
| | | iconPath: '/static/img/tabbar-03.png', |
| | | url: '/pages/user/center' |
| | | } |
| | | ] |
| | | } else if (roleType == 2) { //民警 |
| | | return [{ |
| | | name: '首页', |
| | | iconPathSelected: '/static/img/tabbar-04-selected.png', |
| | |
| | | name: '我的', |
| | | iconPathSelected: '/static/img/tabbar-06-selected.png', |
| | | iconPath: '/static/img/tabbar-06.png', |
| | | |
| | | url: '/pages/user/center' |
| | | } |
| | | ] |
| | | } else { |
| | | } else if (roleType == 3) { // 网格员 |
| | | return [{ |
| | | name: '首页', |
| | | iconPathSelected: '/static/img/tabbar-01-selected.png', |
| | |
| | | url: '/pages/circle/index' |
| | | }, |
| | | { |
| | | name: '驾驶舱', |
| | | iconPathSelected: '/static/img/tabbar-07-selected.png', |
| | | iconPath: '/static/img/tabbar-07.png', |
| | | url: '/pages/statistics/index' |
| | | }, |
| | | |
| | | { |
| | | name: '我的', |
| | | iconPathSelected: '/static/img/tabbar-03-selected.png', |
| | | iconPath: '/static/img/tabbar-03.png', |
| | | url: '/pages/user/center' |
| | | } |
| | | ] |
| | | } else if (roleType == 4) { //系统管理员 |
| | | return [{ |
| | | name: '首页', |
| | | iconPathSelected: '/static/img/tabbar-01-selected.png', |
| | | iconPath: '/static/img/tabbar-01.png', |
| | | url: '/pages/home/index' |
| | | }, |
| | | { |
| | | name: '驾驶舱', |
| | | iconPathSelected: '/static/img/tabbar-07-selected.png', |
| | | iconPath: '/static/img/tabbar-07.png', |
| | | url: '/pages/statistics/index' |
| | | }, |
| | | { |
| | | name: '我的', |
| | | iconPathSelected: '/static/img/tabbar-03-selected.png', |
| | | iconPath: '/static/img/tabbar-03.png', |
| | |
| | | data() { |
| | | return { |
| | | tabbarList: [], |
| | | inactiveColor: '#AFB8C3', |
| | | activeColor: '#5086FA', |
| | | inactiveColor: '#C7CED7', |
| | | activeColor: '#017BFC', |
| | | // activeColor: '#003399' |
| | | } |
| | | }, |
| | |
| | | list: { |
| | | handler(newVal) { |
| | | if (newVal && newVal.length > 0) { |
| | | this.tabbarList = newVal |
| | | this.tabbarList = newVal; |
| | | if (uni.getStorageSync("activeRole").roleName == "民警") { |
| | | this.inactiveColor = "#AFB8C3"; |
| | | this.activeColor = "#003399"; |
| | | } else { |
| | | this.inactiveColor = "#C7CED7" |
| | | this.activeColor = "#017BFC"; |
| | | } |
| | | } |
| | | }, |
| | | deep: true, |
| | | immediate: true |
| | | } |
| | | }, |
| | | |
| | | created() { |
| | | if (uni.getStorageSync("activeRole").roleName == "民警") { |
| | | this.activeColor = "#003399"; |
| | | } else { |
| | | this.activeColor = "#5086FA"; |
| | | } |
| | | |
| | | }, |
| | | |
| | | methods: { |
| | |
| | | } |
| | | } |
| | | ] |
| | | }, |
| | | |
| | | |
| | | |
| | | { |
| | | "root": "subPackage/people", |
| | | "pages": [{ |
| | | "path": "people", |
| | | "style": { |
| | | "navigationBarTitleText": "", |
| | | "navigationBarBackgroundColor": "#fff", |
| | | "navigationBarTextStyle": "black", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }] |
| | | } |
| | | |
| | | |
| | | ], |
| | | "globalStyle": { |
| | | "navigationBarTextStyle": "black", |
| | |
| | | }, |
| | | |
| | | onLoad() { |
| | | this.tabList = getTabbarList(1); |
| | | |
| | | |
| | | let role = uni.getStorageSync('activeRole') |
| | | if (role.roleAlias == "inhabitant") { |
| | | if (role.roleName == "居民") { |
| | | this.tabList = getTabbarList(1); |
| | | this.roleType = 0 |
| | | } else { |
| | | |
| | | if (role.roleName == '网格员') { |
| | | this.tabList = getTabbarList(3); |
| | | } |
| | | this.roleType = 1; |
| | | } |
| | | // this.getCircleList() |
| | |
| | | </view>
|
| | |
|
| | | <view class="block flex a-i-c j-c-s-b mb-20" v-if="roleType == 1">
|
| | | <view @click="scan" class="block-item">
|
| | | <image class="block-item-bg" src="/static/icon/nav-bg-04.png" mode="aspectFill" />
|
| | | <view class="block-item-box flex a-i-c ">
|
| | | <u-icon name="/static/icon/nav-05.png" width="70rpx" height="70rpx"></u-icon>
|
| | | <view class="item-text flex f-d-c j-c-s-b">
|
| | | <view @click="scan" class="module-item">
|
| | | <image class="module-item-bg" src="/static/icon/nav-bg-04.png" mode="aspectFill" />
|
| | | <view class="module-item-box flex a-i-c ">
|
| | | <u-icon name="/static/icon/nav-05.png" width="90rpx" height="90rpx"></u-icon>
|
| | | <view class="module-text flex f-d-c j-c-s-b">
|
| | | <text class="f-28 fw">扫一扫</text>
|
| | | <text class="f-24 opacity">场所采集</text>
|
| | | </view>
|
| | | </view>
|
| | | </view>
|
| | | <view class="block-item" @click="navigatorPage('/subPackage/user/clockIn/index')">
|
| | | <image class="block-item-bg" src="/static/icon/nav-bg-05.png" mode="aspectFill" />
|
| | | <view class="block-item-box flex a-i-c">
|
| | | <u-icon name="/static/icon/nav-06.png" width="70rpx" height="70rpx"></u-icon>
|
| | | <view class="item-text flex f-d-c j-c-s-b">
|
| | | <view class="module-item" @click="navigatorPage('/subPackage/user/clockIn/index')">
|
| | | <image class="module-item-bg" src="/static/icon/nav-bg-05.png" mode="aspectFill" />
|
| | | <view class="module-item-box flex a-i-c">
|
| | | <u-icon name="/static/icon/nav-06.png" width="90rpx" height="90rpx"></u-icon>
|
| | | <view class="module-text flex f-d-c j-c-s-b">
|
| | | <text class="f-28 fw">打卡登记</text>
|
| | | <text class="f-24 opacity">在线打卡</text>
|
| | | </view>
|
| | | </view>
|
| | | </view>
|
| | | <view class="block-item" @click="navigatorPage('/subPackage/statistics/index')">
|
| | | <!-- <view class="block-item" @click="navigatorPage('/subPackage/statistics/index')">
|
| | | <image class="block-item-bg" src="/static/icon/nav-bg-04.png" mode="aspectFill" />
|
| | | <view class="block-item-box flex a-i-c">
|
| | | <u-icon name="/static/icon/nav-12.png" width="70rpx" height="70rpx"></u-icon>
|
| | |
| | | <text class="f-24 opacity">数据统计</text>
|
| | | </view>
|
| | | </view>
|
| | | </view>
|
| | | </view> -->
|
| | |
|
| | |
|
| | | </view>
|
| | |
| | | // });
|
| | | // },
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | //获取待办事项数量
|
| | | getTaskCount() {
|
| | | if (uni.getStorageSync('activeRole').roleAlias === 'wgy') {
|
| | |
| | | let type = null
|
| | | let roleName = this.selectRole.roleName
|
| | | if (roleName == '网格员' || roleName == '系统管理员') {
|
| | | this.tabList = getTabbarList(1);
|
| | | if (roleName == '网格员') {
|
| | | this.tabList = getTabbarList(3);
|
| | | } else {
|
| | | this.tabList = getTabbarList(4);
|
| | | }
|
| | | type = 1
|
| | | this.roleType = 1;
|
| | | this.roleTypeName = "街道社区网格"
|
| | |
|
| | | this.$set(this.background, "top", "#017BFC");
|
| | | this.$set(this.background, "banner",
|
| | | "linear-gradient(180deg, #017BFC 0%, rgba(1, 123, 252, 0) 100%)");
|
| | |
| | | },
|
| | |
|
| | | navigatorPage(path) {
|
| | | if (path) {
|
| | | if (path.trim()) {
|
| | | if ((path == '/subPackage/bs/views/zhsb' || path == '/subPackage/bs/views/repair') && this
|
| | | .curHouseCode === '') {
|
| | | uni.showToast({
|
| | |
| | | </view> |
| | | |
| | | </view> |
| | | <tabBar :current="1" :list="tabList" /> |
| | | <tabBar :current="tabbarIndex" :list="tabList" /> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | gridData: {}, |
| | | houseLabelData: [], |
| | | sexData: [], |
| | | tabList: [] |
| | | tabList: [], |
| | | tabbarIndex: 1 |
| | | } |
| | | }, |
| | | |
| | |
| | | // console.log(e) |
| | | // this.refreshData(); |
| | | // }, |
| | | onLoad() { |
| | | this.tabList = getTabbarList(2); |
| | | onShow() { |
| | | let { |
| | | roleName |
| | | } = uni.getStorageSync("activeRole"); |
| | | if (roleName == "网格员") { |
| | | this.tabList = getTabbarList(3); |
| | | this.tabbarIndex = 2; |
| | | } |
| | | if (roleName == "民警") { |
| | | this.tabList = getTabbarList(2); |
| | | this.tabbarIndex = 1; |
| | | } |
| | | |
| | | if (roleName == "系统管理员") { |
| | | this.tabList = getTabbarList(4); |
| | | this.tabbarIndex = 1; |
| | | } |
| | | |
| | | this.refreshData(); |
| | | }, |
| | | |
| | |
| | | </view> |
| | | |
| | | |
| | | <tabBar :current="2" :list="tabbarList" /> |
| | | <tabBar :current="tabbarIndex" :list="tabbarList" /> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | addressType: 1, |
| | | user_info: {}, |
| | | color: "#017BFC", |
| | | tabbarList: [] |
| | | tabbarList: [], |
| | | tabbarIndex: 2 |
| | | }; |
| | | }, |
| | | |
| | |
| | | this.tabbarList = getTabbarList(1) |
| | | this.roleType = 1 |
| | | this.color = "#017BFC" |
| | | |
| | | } else { |
| | | this.tabbarIndex = 2; |
| | | } else if (role.roleName == "民警") { |
| | | this.tabbarList = getTabbarList(2) |
| | | this.roleType = 2; |
| | | this.color = "#003399" |
| | | this.tabbarIndex = 2; |
| | | } else if (role.roleName == "系统管理员") { |
| | | this.tabbarList = getTabbarList(4) |
| | | this.roleType = 1 |
| | | this.color = "#017BFC"; |
| | | this.tabbarIndex = 2; |
| | | } else if (role.roleName == "网格员") { |
| | | this.tabbarList = getTabbarList(3) |
| | | this.roleType = 1 |
| | | this.color = "#017BFC"; |
| | | this.tabbarIndex = 3; |
| | | } |
| | | this.addressType = uni.getStorageSync("siteInfo").addressType; |
| | | }, |
| New file |
| | |
| | | <template> |
| | | <view> |
| | | |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | </script> |
| | | |
| | | <style> |
| | | </style> |
| | |
| | | <template> |
| | | <view class="container"> |
| | | |
| | | <view class="row bgc-ff mt-20 flex j-c-c"> |
| | | <view class="row bgc-ff mt-20 flex f-d-c a-i-c j-c-c"> |
| | | |
| | | |
| | | <!-- <u-row customStyle="margin-bottom: 10px"> |
| | |
| | | </u-col> |
| | | </u-row> --> |
| | | |
| | | |
| | | <view class="round bgc-main"> |
| | | {{onLine?"离线":"在线"}} |
| | | <view class="f-32 mb-20"> |
| | | 当前状态 {{onLine?"在线 ":"离线"}} |
| | | </view> |
| | | <view class="round" :class="onLine?'bgc-main':' bgc-gray '" @click="asyncChange(!onLine)"> |
| | | {{onLine?"在线 ":"离线"}} |
| | | </view> |
| | | |
| | | |
| | |
| | | data() { |
| | | return { |
| | | onLine: false, |
| | | // userInfo: {}, |
| | | userInfo: {}, |
| | | loading: false, |
| | | } |
| | | }, |
| | |
| | | // padding: 20rpx; |
| | | // margin: 0 20rpx; |
| | | // border-radius: 4rpx; |
| | | padding-top: 200rpx; |
| | | } |
| | | |
| | | .container { |
| | |
| | | } |
| | | |
| | | .round { |
| | | width: 80rpx; |
| | | height: 80rpx; |
| | | width: 200rpx; |
| | | height: 200rpx; |
| | | line-height: 200rpx; |
| | | border-radius: 50%; |
| | | margin-top: 30%; |
| | | |
| | | text-align: center; |
| | | color: #fff; |
| | | font-weight: bold; |
| | | |
| | | } |
| | | |
| | | .bgc-gray { |
| | | background: #949494; |
| | | } |
| | | </style> |
| | |
| | | <view class="info" v-for="(item, index) in personNumArr" :key="index">
|
| | | <view class="flex a-i-c j-c-s-b" style="padding:20rpx;">
|
| | | <view class="title fw" style="text-align:center;">人员信息-#{{ index*1 + 1 }}</view>
|
| | | <view v-if="(index+1) > 1">
|
| | | <view>
|
| | | <u-icon name="trash-fill" color="#ff0000" size="20" @click="deletePerson(index)" />
|
| | | </view>
|
| | | </view>
|
| | |
| | | genderValue: "",
|
| | | showNationPicker: false,
|
| | | showGenderPicker: false,
|
| | | personNum: 1,
|
| | | personNumArr: [1],
|
| | | personNum: 0,
|
| | | personNumArr: [],
|
| | | isLegalSame: 1 //法人信息是否与负责人一致 1是 2否
|
| | | }
|
| | | },
|
| | |
| | | <view class="info" v-for="(item, index) in personNumArr" :key="index"> |
| | | <view class="flex a-i-c j-c-s-b" style="padding:20rpx;"> |
| | | <view class="title fw" style="text-align:center;">人员信息-#{{ index*1 + 1 }}</view> |
| | | <view v-if="(index+1) > 1"> |
| | | <view> |
| | | <u-icon name="trash-fill" color="#ff0000" size="20" @click="deletePerson(index)" /> |
| | | </view> |
| | | </view> |
| | |
| | | genderValue: "", |
| | | showNationPicker: false, |
| | | showGenderPicker: false, |
| | | personNum: 1, |
| | | personNumArr: [1], |
| | | personNum: 0, |
| | | personNumArr: [], |
| | | } |
| | | }, |
| | | options: { |
| | |
| | | <view class="info" v-for="(item, index) in personNumArr" :key="index">
|
| | | <view class="flex a-i-c j-c-s-b" style="padding:20rpx;">
|
| | | <view class="title fw" style="text-align:center;">人员信息-#{{ index*1 + 1 }}</view>
|
| | | <view v-if="(index+1) > 1">
|
| | | <view>
|
| | | <u-icon name="trash-fill" color="#ff0000" size="20" @click="deletePerson(index)" />
|
| | | </view>
|
| | | </view>
|
| | |
| | | }
|
| | | ]
|
| | | },
|
| | | personNum: 1,
|
| | | personNum: 0,
|
| | | curSelectSite: {},
|
| | | jwd: "",
|
| | | placeList: [],
|
| | |
| | | genderValue: "",
|
| | | showNationPicker: false,
|
| | | showGenderPicker: false,
|
| | | personNumArr: [1],
|
| | | personNumArr: [],
|
| | | }
|
| | | },
|
| | | onShow() {
|