Lou
2024-03-20 ee5bd20779565d6231c3b58374e431adb068ca7d
更新
11 files modified
11 files added
239 ■■■■ changed files
common/common.js 52 ●●●●● patch | view | raw | blame | history
components/tabBar/tabBar.vue 22 ●●●● patch | view | raw | blame | history
pages.json 17 ●●●●● patch | view | raw | blame | history
pages/circle/index.vue 10 ●●●● patch | view | raw | blame | history
pages/home/index.vue 37 ●●●● patch | view | raw | blame | history
pages/statistics/index.vue 25 ●●●● patch | view | raw | blame | history
pages/user/center.vue 20 ●●●● patch | view | raw | blame | history
static/icon/menu-21.png patch | view | raw | blame | history
static/icon/menu-22.png patch | view | raw | blame | history
static/icon/menu-23.png patch | view | raw | blame | history
static/icon/menu-24.png patch | view | raw | blame | history
static/icon/menu-25.png patch | view | raw | blame | history
static/icon/menu-26.png patch | view | raw | blame | history
static/icon/menu-27.png patch | view | raw | blame | history
static/icon/menu-28.png patch | view | raw | blame | history
static/img/tabbar-07-selected.png patch | view | raw | blame | history
static/img/tabbar-07.png patch | view | raw | blame | history
subPackage/people/people.vue 11 ●●●●● patch | view | raw | blame | history
subPackage/police/onLine.vue 27 ●●●● patch | view | raw | blame | history
subPackage/workbench/views/cscj.vue 6 ●●●● patch | view | raw | blame | history
subPackage/workbench/views/editCscj.vue 6 ●●●● patch | view | raw | blame | history
subPackage/workbench/views/editExamine.vue 6 ●●●● patch | view | raw | blame | history
common/common.js
@@ -97,7 +97,27 @@
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',
@@ -117,11 +137,10 @@
                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',
@@ -136,6 +155,33 @@
                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',
components/tabBar/tabBar.vue
@@ -23,8 +23,8 @@
        data() {
            return {
                tabbarList: [],
                inactiveColor: '#AFB8C3',
                activeColor: '#5086FA',
                inactiveColor: '#C7CED7',
                activeColor: '#017BFC',
                // activeColor: '#003399'
            }
        },
@@ -32,21 +32,19 @@
            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: {
pages.json
@@ -945,7 +945,24 @@
                    }
                }
            ]
        },
        {
            "root": "subPackage/people",
            "pages": [{
                "path": "people",
                "style": {
                    "navigationBarTitleText": "",
                    "navigationBarBackgroundColor": "#fff",
                    "navigationBarTextStyle": "black",
                    "enablePullDownRefresh": false
                }
            }]
        }
    ],
    "globalStyle": {
        "navigationBarTextStyle": "black",
pages/circle/index.vue
@@ -126,12 +126,16 @@
        },
        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()
pages/home/index.vue
@@ -28,27 +28,27 @@
                </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>
@@ -57,7 +57,7 @@
                                <text class="f-24 opacity">数据统计</text>
                            </view>
                        </view>
                    </view>
                    </view> -->
                </view>
@@ -640,10 +640,6 @@
            //     });
            // },
            //获取待办事项数量
            getTaskCount() {
                if (uni.getStorageSync('activeRole').roleAlias === 'wgy') {
@@ -753,11 +749,14 @@
                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%)");
@@ -1046,7 +1045,7 @@
            },
            navigatorPage(path) {
                if (path) {
                if (path.trim()) {
                    if ((path == '/subPackage/bs/views/zhsb' || path == '/subPackage/bs/views/repair') && this
                        .curHouseCode === '') {
                        uni.showToast({
pages/statistics/index.vue
@@ -179,7 +179,7 @@
            </view>
        </view>
        <tabBar :current="1" :list="tabList" />
        <tabBar :current="tabbarIndex" :list="tabList" />
    </view>
</template>
@@ -287,7 +287,8 @@
                gridData: {},
                houseLabelData: [],
                sexData: [],
                tabList: []
                tabList: [],
                tabbarIndex: 1
            }
        },
@@ -296,8 +297,24 @@
        //     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();
        },
pages/user/center.vue
@@ -80,7 +80,7 @@
        </view>
        <tabBar :current="2" :list="tabbarList" />
        <tabBar :current="tabbarIndex" :list="tabbarList" />
    </view>
</template>
@@ -117,7 +117,8 @@
                addressType: 1,
                user_info: {},
                color: "#017BFC",
                tabbarList: []
                tabbarList: [],
                tabbarIndex: 2
            };
        },
@@ -128,11 +129,22 @@
                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;
        },
static/icon/menu-21.png
static/icon/menu-22.png
static/icon/menu-23.png
static/icon/menu-24.png
static/icon/menu-25.png
static/icon/menu-26.png
static/icon/menu-27.png
static/icon/menu-28.png
static/img/tabbar-07-selected.png
static/img/tabbar-07.png
subPackage/people/people.vue
New file
@@ -0,0 +1,11 @@
<template>
    <view>
    </view>
</template>
<script>
</script>
<style>
</style>
subPackage/police/onLine.vue
@@ -1,7 +1,7 @@
<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">
@@ -15,9 +15,11 @@
                </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>
@@ -51,7 +53,7 @@
        data() {
            return {
                onLine: false,
                // userInfo: {},
                userInfo: {},
                loading: false,
            }
        },
@@ -151,6 +153,7 @@
        // padding: 20rpx;
        // margin: 0 20rpx;
        // border-radius: 4rpx;
        padding-top: 200rpx;
    }
    .container {
@@ -177,10 +180,18 @@
    }
    .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>
subPackage/workbench/views/cscj.vue
@@ -241,7 +241,7 @@
                <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>
@@ -653,8 +653,8 @@
                genderValue: "",
                showNationPicker: false,
                showGenderPicker: false,
                personNum: 1,
                personNumArr: [1],
                personNum: 0,
                personNumArr: [],
                isLegalSame: 1 //法人信息是否与负责人一致  1是  2否
            }
        },
subPackage/workbench/views/editCscj.vue
@@ -204,7 +204,7 @@
                <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>
@@ -616,8 +616,8 @@
                genderValue: "",
                showNationPicker: false,
                showGenderPicker: false,
                personNum: 1,
                personNumArr: [1],
                personNum: 0,
                personNumArr: [],
            }
        },
        options: {
subPackage/workbench/views/editExamine.vue
@@ -146,7 +146,7 @@
                <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>
@@ -277,7 +277,7 @@
                        }
                    ]
                },
                personNum: 1,
                personNum: 0,
                curSelectSite: {},
                jwd: "",
                placeList: [],
@@ -300,7 +300,7 @@
                genderValue: "",
                showNationPicker: false,
                showGenderPicker: false,
                personNumArr: [1],
                personNumArr: [],
            }
        },
        onShow() {