linwe
2024-08-08 3c738f4fe2762bba8087e5a22fc0dc06560eab0e
三色任务与自查任务
11 files modified
217 ■■■■ changed files
pages/home/index.scss 13 ●●●●● patch | view | raw | blame | history
pages/home/index.vue 89 ●●●●● patch | view | raw | blame | history
pages/user/center.vue 2 ●●● patch | view | raw | blame | history
subPackage/school/troubleAuditList.vue 2 ●●● patch | view | raw | blame | history
subPackage/school/troubleTaskList.vue 3 ●●●● patch | view | raw | blame | history
subPackage/task/gridWord.vue 2 ●●● patch | view | raw | blame | history
subPackage/task/index.vue 20 ●●●● patch | view | raw | blame | history
subPackage/workbench/views/audit.vue 2 ●●●●● patch | view | raw | blame | history
subPackage/workbench/views/auditSite.vue 3 ●●●●● patch | view | raw | blame | history
subPackage/workbench/views/workLog.vue 74 ●●●● patch | view | raw | blame | history
vue.config.js 7 ●●●●● patch | view | raw | blame | history
pages/home/index.scss
@@ -97,6 +97,12 @@
        .nav-item {
            padding: 10rpx 0;
            .badge{
                position:absolute;
                top:10rpx;
                right:10rpx
            }
        }
        .nav-item-text {
@@ -213,12 +219,19 @@
    }
    .grid-item {
        position: relative;
        // width: 153rpx;
        // height: 153rpx;
        // border-radius: 16rpx 16rpx 16rpx 16rpx;
        // justify-content: center;
        // background:linear-gradient(133deg, #F9FAFE 0%, rgba(249,250,254,0) 100%)
        
        .badge{
            position:absolute;
            top:10rpx;
            right:-20rpx
        }
    }
    .grid-icon{
        width:100rpx;
pages/home/index.vue
@@ -268,6 +268,9 @@
                                    <view class="nav-item flex f-d-c a-i-c">
                                        <u-icon name="/static/icon/nav-11.png" width="80rpx" height="80rpx"></u-icon>
                                        <text class="nav-item-text f-26  mt-10">场所任务</text>
                                        <view class="badge" v-if="selfTaskCount >0">
                                            <u-badge type="error" max="99" :value="selfTaskCount"></u-badge>
                                        </view>
                                    </view>
                                </u-grid-item>
@@ -278,8 +281,6 @@
                                        <text class="nav-item-text f-26  mt-10">校园安全检查</text>
                                    </view>
                                </u-grid-item>
                            </block>
                            <u-grid-item v-if="roleName == 'xyzt'"
@@ -326,6 +327,9 @@
                                    <u-icon :name="item.pictureImg" width="64rpx" height="64rpx"></u-icon>
                                </view>
                                <text class="grid-text f-24 fw mt-10">{{item.name}}</text>
                                <view class="badge" v-if="taskCount > 0 && item.name ==='待办事项'">
                                    <u-badge type="error" max="99" :value="taskCount"></u-badge>
                                </view>
                            </view>
                        </u-grid-item>
                    </u-grid>
@@ -408,6 +412,10 @@
    import {
        getCountTypeNumber
    } from "@/api/task/task.js"
    import {
        getAuditReportingList
    } from "@/api/reporting/reporting"
    import tabBar from "@/components/tabBar/tabBar.vue"
    import {
@@ -759,7 +767,8 @@
                validationCode: "",
                text: "获取验证码",
                isSendCode: false,
                isCheckCode: false
                isCheckCode: false,
                selfTaskCount: 0,
            }
        },
        onLoad() {
@@ -811,9 +820,13 @@
            'curSelectSite.id': {
                handler(newVal, oldVal) {
                    if (newVal) {
                        console.log("*******123456*********", newVal)
                        this.$store.commit("setSiteInfo", this.curSelectSite)
                        if (this.roleType == 3) {
                        if (this.roleType == 3 || this.roleType == 1) {
                            this.getTaskCount()
                        }
                        if (this.roleType == 2) {
                            this.getTaskList()
                        }
                    }
                },
@@ -856,6 +869,28 @@
        // },
        methods: {
            //初始化
            async init() {
                this.selectRole = uni.getStorageSync("activeRole")
                await this.getSiteList()
                await this.getMenuList()
                await this.getBanner()
                this.getNoticeList()
            },
            getTaskList() {
                let params = {
                    status: 4,
                    houseCode: this.curHouseCode
                }
                getAuditReportingList(params).then(res => {
                    if (res.code != 200) {
                        return
                    }
                    this.selfTaskCount = res.data.total;
                })
            },
            changeKeyword(val) {
                console.log(val);
                searchContent({
@@ -906,12 +941,10 @@
                })
            },
            //获取待办事项数量
            getTaskCount() {
                if (uni.getStorageSync('activeRole').roleAlias === 'wgy') {
                    roleType = 1
                    this.roleType = 1
                }
                getCountTypeNumber({
                    neiCode: this.curSelectSite.id,
@@ -921,9 +954,9 @@
                    let count = 0;
                    if (uni.getStorageSync('activeRole').roleAlias === 'wgy') {
                        count += Number(data.bqsj) + Number(data.xfzc) + Number(data.xfyhzg) +
                            Number(data.cssh) + Number(data.czsh);
                            Number(data.cssh) + Number(data.czsh) + Number(data.bsbx) + Number(data.zfrw);
                    } else {
                        count += Number(data.bsbx) + Number(data.bqsj) + Number(data.xfzc) + Number(data.xfyhzg) +
                        count += Number(data.bqsj) + Number(data.xfzc) + Number(data.xfyhzg) +
                            Number(data.qbhs) + Number(data.jzzsq) + Number(data.wztj) + Number(data.cyrysh) +
                            Number(data.xyyh) + Number(data.xyaqjc) + Number(data.xyjfmd);
                    }
@@ -939,16 +972,6 @@
            changeMenuTabs(e) {
                this.menuTabIndex = e;
            },
            //初始化
            async init() {
                this.selectRole = uni.getStorageSync("activeRole")
                await this.getSiteList()
                await this.getMenuList()
                await this.getBanner();
                this.getNoticeList()
                // this.getTaskCount();
            },
            getBanner() {
@@ -1159,20 +1182,20 @@
                }
            },
            buildSiteColumn(dataList, index) {
                if (dataList.length > 0) {
                    this.siteColumns[index] = dataList
                    if (dataList[0].children && dataList[0].children.length > 0) {
                        this.curSelectSite = dataList[0].children[0];
                        this.getHouseDataList(dataList[0].children[0].id)
                        this.buildSiteColumn(dataList[0].children, index + 1)
                    } else {
                        this.curSelectSite = dataList[0];
                    }
                    this.curHouseCode = this.curSelectSite.id
                    uni.setStorageSync("curHouseCode", this.curSelectSite.id)
                }
            },
            // buildSiteColumn(dataList, index) {
            //     if (dataList.length > 0) {
            //         this.siteColumns[index] = dataList
            //         if (dataList[0].children && dataList[0].children.length > 0) {
            //             this.curSelectSite = dataList[0].children[0];
            //             this.getHouseDataList(dataList[0].children[0].id)
            //             this.buildSiteColumn(dataList[0].children, index + 1)
            //         } else {
            //             this.curSelectSite = dataList[0];
            //         }
            //         this.curHouseCode = this.curSelectSite.id
            //         uni.setStorageSync("curHouseCode", this.curSelectSite.id)
            //     }
            // },
            // 获取楼盘
            async getHouseDataList(code) {
pages/user/center.vue
@@ -158,7 +158,7 @@
                this.roleType = 1
                this.color = "#017BFC";
                // this.tabbarIndex = 2;
                this.tabbarIndex = 3;
                this.tabbarIndex = 4;
            } else if (role.roleName == '校园主体' || role.roleName == '校园通用') {
                this.tabbarList = getTabbarList(5);
                this.tabbarIndex = 2;
subPackage/school/troubleAuditList.vue
@@ -13,7 +13,7 @@
                        <text class="f-28">时间筛选</text>
                        <u-icon name="arrow-down"></u-icon>
                    </view>
                    <u-search placeholder="请输入姓名" v-model="keyWord" :clearabled="true" :showAction="true"
                    <u-search placeholder="请输入学校名称" v-model="keyWord" :clearabled="true" :showAction="true"
                        :animation="true" @search="searchConfirm" @clear="clearConfirm"
                        @custom="searchConfirm"></u-search>
                </view>
subPackage/school/troubleTaskList.vue
@@ -13,11 +13,12 @@
                        <text class="f-28">时间筛选</text>
                        <u-icon name="arrow-down"></u-icon>
                    </view>
                    <u-search placeholder="请输入姓名" v-model="keyWord" :clearabled="true" :showAction="true"
                    <u-search placeholder="请输入学校名称" v-model="keyWord" :clearabled="true" :showAction="true"
                        :animation="true" @search="searchConfirm" @clear="clearConfirm"
                        @custom="searchConfirm"></u-search>
                </view>
            </view>
        </u-sticky>
        <view class="list">
subPackage/task/gridWord.vue
@@ -8,7 +8,7 @@
            <view class="list-item bgc-ff mb-20" v-for="(i,k) in list" :key="k" @click="navTo(i)">
                <view class="item-title flex a-i-c j-c-s-b mb-20">
                    <text class="f-32 fw">{{i.name}}</text>
                    <u-tag v-if="i.status == 1" text="待审批" type="warning" plain plainFill></u-tag>
                    <u-tag v-if="i.status == 1" text="待走访" type="warning" plain plainFill></u-tag>
                    <u-tag v-if="i.status == 2" text="审核通过" type="success" plain plainFill></u-tag>
                    <u-tag v-if="i.status == 3" text="审核拒绝" type="error" plain plainFill></u-tag>
                </view>
subPackage/task/index.vue
@@ -234,31 +234,31 @@
                        // this.bailCount = data.qbhs
                        for (let i of this.securityList) {
                            if (i.name.trim() == "二手交易") {
                            if (i.name.trim() == "二手交易审核") {
                                i.count = data.bqsj
                            } else if (i.name.trim() == "消防自查") {
                            } else if (i.name.trim() == "消防自查审核") {
                                i.count = data.xfzc;
                            } else if (i.name.trim() == "消防隐患整改") {
                            } else if (i.name.trim() == "消防隐患整改审核") {
                                i.count = data.xfyhzg;
                            } else if (i.name.trim() == "居住证申请") {
                            } else if (i.name.trim() == "居住证申请审核") {
                                i.count = data.jzzsq;
                            } else if (i.name.trim() == "从业人员审核") {
                                i.count = data.cyrysh;
                            } else if (i.name.trim() == "无诈上报") {
                            } else if (i.name.trim() == "无诈上报审核") {
                                i.count = data.wztj;
                            } else {
                            } else if (i.name.trim() == "取保监居审核") {
                                i.count = data.qbhs;
                            }
                        }
                        for (let i of this.schoolList) {
                            if (i.name.trim() == "安全隐患上报") {
                            if (i.name.trim() == "安全隐患上报处置") {
                                i.count = data.xyyh;
                            } else if (i.name.trim() == "纠纷矛盾上报") {
                            } else if (i.name.trim() == "纠纷矛盾上报处置") {
                                i.count = data.xyjfmd;
                            } else if (i.name.trim() == "校园安保管理") {
                            } else if (i.name.trim() == "校园安保审核") {
                                i.count = data.xyaqjc;
                            } else {
                                i.count = data.qbhs;
                                // i.count = data.qbhs;
                            }
                        }
                    }
subPackage/workbench/views/audit.vue
@@ -24,6 +24,8 @@
                <view class="item-title flex a-i-c j-c-s-b mb-20">
                    <text class="f-32 fw" v-if="i.reportType == 4">{{i.placeName}}</text>
                    <text class="f-32 fw" v-else>{{i.name}}</text>
                    <u-tag v-if="i.color" :bgColor='i.color' :borderColor='i.color' color="#191919"
                        :text="i.categoryName"></u-tag>
                    <u-tag v-if="i.status == 4" text="待完成" type="warning" plain plainFill></u-tag>
                    <u-tag v-if="i.status == 1" text="待审批" type="warning" plain plainFill></u-tag>
                    <u-tag v-if="i.status == 2" text="审核通过" type="success" plain plainFill></u-tag>
subPackage/workbench/views/auditSite.vue
@@ -23,11 +23,14 @@
                @click="navTo(i.id,i.reportType,i.status,i.type)">
                <view class="item-title flex a-i-c j-c-s-b mb-20">
                    <text class="f-32 fw">{{i.name}}</text>
                    <u-tag v-if="i.color" :bgColor='i.color' :borderColor='i.color' color="#191919"
                        :text="i.categoryName"></u-tag>
                    <u-tag v-if="i.status == 4" text="待完成" type="warning" plain plainFill></u-tag>
                    <u-tag v-if="i.status == 1" text="待审批" type="warning" plain plainFill></u-tag>
                    <u-tag v-if="i.status == 2" text="审核通过" type="success" plain plainFill></u-tag>
                    <u-tag v-if="i.status == 3" text="审核拒绝" type="error" plain plainFill></u-tag>
                </view>
                <view class="item-row flex a-i-c j-c-s-b">
                    <text class="f-28">时间</text>
                    <text class="f-28 c-66">{{i.createTime}}</text>
subPackage/workbench/views/workLog.vue
@@ -85,10 +85,13 @@
        <u-datetime-picker ref="datetimePicker" :show="showSelectDate" v-model="workTime" mode="datetime"
            :formatter="formatter" @confirm="confirmDate" @cancel="showSelectDate = false"></u-datetime-picker>
        <u-picker :show="isShowTypePicker" :columns="typeList" :defaultIndex="typeIndex"
            @cancel="isShowTypePicker = false" @confirm="confirmType()" keyName="dictValue"></u-picker>
        <u-picker :show="isShowLabelPicker" :columns="labelList" :defaultIndex="labelIndex"
            @cancel="isShowLabelPicker = false" @confirm="confirmLabelType()" keyName="name"></u-picker>
        <u-picker :show="isShowLabelPicker" ref="uPicker" @change="changeHandler" :columns="labelList"
            :defaultIndex="labelIndex" @cancel="isShowLabelPicker = false" @confirm="confirmLabelType()"
            keyName="name"></u-picker>
        <!-- <footer-btn @click="submitInfo" :text="isEdit?'保存':'提交'" /> -->
@@ -214,6 +217,7 @@
                isShowTypePicker: false,
                isShowLabelPicker: false,
                labelList: [],
                labelListTwo: [],
                labelIndex: [0],
                labelName: "",
                keyword: "",
@@ -275,7 +279,7 @@
            getHouseType(code) {
                this.houseCode = code
                // this.getHouseholdList();
                this.getHouseholdList();
            },
@@ -296,10 +300,10 @@
                        // this.info.context = data.context;
                        // this.info.householdId = data.householdId;
                        // this.info.personType = data.personType;
                        console.log(typeof data.personType)
                        // console.log(typeof data.personType)
                        // this.labelIndex = this.$getIndex(this.labelList[0], data.personType, "id", "name").index;
                        // this.labelName = this.$getIndex(this.labelList[0], data.personType, "id", "name").name;
                        this.getHouseholdList();
                        this.labelName = data.labelName
                        this.getHousehold(data.householdId);
                        this.form.images = this.$setImageUrl(data.url, 2);
                        this.info.id = data.id;
@@ -321,9 +325,12 @@
            getLabelList() {
                getLabelListByParentId({
                    parentId: 100
                    parentId: 1000
                }).then(res => {
                    this.labelList = [res.data];
                    // this.labelList = [res.data];
                    // this.labelListTwo = res.data
                    this.labelList.push(res.data)
                    this.labelList.push(res.data[0].children)
                })
            },
@@ -334,10 +341,15 @@
                    console.log(res);
                    this.address = res.data.currentAddress;
                    this.selectedHousehold = res.data;
                    this.houseCode = res.data.houseCode
                    this.getHouseholdList();
                })
            },
            getHouseholdList() {
                if (!this.houseCode) {
                    return
                }
                fetchHousehold({
                    labelId: this.info.personType,
                    searchKey: this.keyword,
@@ -392,14 +404,58 @@
            },
            //选择重点人群类型
            // confirmLabelType(e) {
            //     this.labelIndex = e.indexs;
            //     this.info.personType = e.value[0].id;
            //     this.labelName = e.value[0].name;
            //     this.isShowLabelPicker = false;
            //     this.getHouseholdList();
            // },
            // 回调参数为包含columnIndex、value、values
            confirmLabelType(e) {
                console.log('confirm', e)
                // this.show = false
                this.labelIndex = e.indexs;
                this.info.personType = e.value[0].id;
                this.labelName = e.value[0].name;
                if (e.value[2]) {
                    this.info.personType = e.value[2].id;
                    this.labelName = e.value[2].name;
                } else {
                    this.info.personType = e.value[1].id;
                    this.labelName = e.value[1].name;
                }
                this.isShowLabelPicker = false;
                this.getHouseholdList();
            },
            changeHandler(e) {
                const {
                    columnIndex,
                    value,
                    values, // values为当前变化列的数组内容
                    index,
                    // 微信小程序无法将picker实例传出来,只能通过ref操作
                    picker = this.$refs.uPicker
                } = e
                // 当第一列值发生变化时,变化第二列(后一列)对应的选项
                if (columnIndex === 0) {
                    console.log("****************", e)
                    // picker为选择器this实例,变化第二列对应的选项
                    picker.setColumnValues(1, value[0].children)
                    // picker为选择器this实例,变化第二列对应的选项
                    if (value[0].hasChildren) {
                        picker.setColumnValues(2, value[0].children[0].children)
                    }
                }
                if (columnIndex === 1) {
                    console.log("*******1*********", e)
                    // picker为选择器this实例,变化第二列对应的选项
                    if (value[1].hasChildren) {
                        picker.setColumnValues(2, value[1].children)
                    }
                }
            },
            //搜索住户
            searchHousehold() {
                this.getHouseholdList()
vue.config.js
@@ -13,8 +13,8 @@
        proxy: {
            "/api/blade-resource/oss": {
                //本地服务接口地址
                // target: "http://localhost:9528",
                target: "https://srgdjczzxtpt.com:2080/api",
                target: "http://localhost:9528",
                // target: "https://srgdjczzxtpt.com:2080/api",
                // target: "https://kt39592615.goho.co",
                // target: "http://z4042833u6.wicp.vip",
                // target: "http://localhost:9528",
@@ -29,7 +29,8 @@
            },
            // 业务平台接口
            "/api": {
                target: "http://172.16.13.129:9528",
                // target: "http://172.16.13.129:9528",
                target: "https://srgdjczzxtpt.com:2080/api",
                changeOrigin: true, //开启代理跨域
                pathRewrite: {
                    "^/api": "",