wjt
2024-06-22 f07b70558d5b84f1070470229037629bc1ace006
接口对接
6个文件已添加
24个文件已修改
1336 ■■■■■ 已修改文件
api/data.js 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/policy.js 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
common/upload.js 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manifest.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
policy/applyRecord/applyRecord.vue 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
policy/applyRecordDetails/applyRecordDetails.scss 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
policy/applyRecordDetails/applyRecordDetails.vue 144 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
policy/components/mine.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
policy/components/popup.vue 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
policy/components/tabs.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
policy/components/upload.vue 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
policy/dataLook/dataLook.scss 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
policy/dataLook/dataLook.vue 268 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
policy/policyApply/policyApply.vue 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
policy/reportDetails/reportDetails.vue 128 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
policy/reportPage/reportPage.vue 106 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
policy/reportRecord/reportRecord.scss 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
policy/reportRecord/reportRecord.vue 169 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
policy/scodePage/scodePage.scss 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
policy/scodePage/scodePage.vue 114 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
policy/translate/translate.vue 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
policy/translateRecord/translateRecord.vue 77 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
static/policy/loginHeader.png 补丁 | 查看 | 原始文档 | blame | 历史
static/policy/loginHeaer1.png 补丁 | 查看 | 原始文档 | blame | 历史
static/policy/rank1.png 补丁 | 查看 | 原始文档 | blame | 历史
static/policy/rank2.png 补丁 | 查看 | 原始文档 | blame | 历史
static/policy/rank3.png 补丁 | 查看 | 原始文档 | blame | 历史
uni_modules/qiun-data-charts/js_sdk/u-charts/config-ucharts.js 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uni_modules/qiun-data-charts/js_sdk/u-charts/u-charts.js 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
api/data.js
@@ -4,4 +4,23 @@
export function getDicts(dictType){
    return http.get('/system/dict/data/type/' + dictType, {}, { custom: { loading: true }});
}
// 数据分析接口
// 执法数据汇总 /report/team/getTotalInfo
export function getTotalInfo(data){
    return http.get('/report/team/getTotalInfo', {params: data}, { custom: { loading: true }});
}
// 执法次数部门分析 /report/team/getDeptCount
export function getDeptCount(data){
    return http.get('/report/team/getDeptCount', {params: data}, { custom: { loading: true }});
}
// 企业被执法次数 /report/team/getCompanyCount
export function getCompanyCount(data) {
    return http.get(`/report/team/getCompanyCount`, {params: data}, { custom: { loading: true }});
}
// 执法类型
export function getEnforceTypeCount(data) {
    return http.get(`/report/team/getEnforceTypeCount`, {params: data}, { custom: { loading: true }});
}
api/policy.js
@@ -26,9 +26,43 @@
// 执法审批列表 
export function checkLogList(data) {
    return http.get(`/enforce/order/checkList`, {params: data}, { custom: { loading: true }});
}
// 执法审批
export function checkUpd(data) {
    return http.post(`/tool/check/checkOrder`, data, { custom: { loading: true }});
}
// 执法单节点
export function orderNodeList(data) {
    return http.get(`/enforce/order/orderNodeList`, {params: data}, { custom: { loading: true }});
}
// 执法审批记录 /enforce/check/log/list
export function enforceLogList(data) {
    return http.get(`/enforce/check/log/list`, {params: data}, { custom: { loading: true }});
}
// 执法审批 /enforce/check/log/upd
export function checkUpd(data) {
    return http.get(`/enforce/check/log/upd`, {params: data}, { custom: { loading: true }});
// 审批人审批记录 /enforce/order/checkedList
export function checkedList(data) {
    return http.get(`/enforce/order/checkedList`, {params: data}, { custom: { loading: true }});
}
// 扫码接口
export function getScanList(data) {
    return http.get(`/enforce/order/getScanList`, {params: data}, { custom: { loading: true }});
}
// 确认执法 /enforce/order/doScanOrder/{orderId}
export function doScanOrder(data) {
    return http.post(`/enforce/order/doScanOrder/${data}`, {}, { custom: { loading: true }});
}
// 带上报执法列表 /enforce/order/execute/list
export function executeList(data) {
    return http.get(`/enforce/order/execute/list`, {params: data}, { custom: { loading: true }});
}
// 修改执法单 /enforce/order/upd
export function orderUpd(data) {
    return http.post(`/enforce/order/doResultOrder`, data, { custom: { loading: true }});
}
// 企业被执法次数 /report/team/getCompanyCount
export function getCompanyCount(data) {
    return http.get(`/report/team/getCompanyCount`, data, { custom: { loading: true }});
}
common/upload.js
New file
@@ -0,0 +1,27 @@
import { config } from './config.js'
export const upload  = (file) => {
    return new Promise((resolve,refject) => {
        uni.uploadFile({
            url: config.baseUrl + '/tool/file/upload',
            filePath: file,
            name: 'file',
            success: val => {
                const info = JSON.parse(val.data)
                if(info.code == 200) {
                    resolve(info)
                } else {
                    refject(info.msg)
                }
            },
            fail: err => {
                // uni.showToast({
                //     title: '文件上传失败,请稍后重试',
                //     icon: 'none'
                // })
                // console.log(err)
                refject(err)
            }
        })
    })
}
manifest.json
@@ -1,6 +1,6 @@
{
    "name" : "沈丘惠企执法",
    "appid" : "__UNI__B26A980",
    "appid" : "__UNI__0113FBA",
    "description" : "沈丘惠企执法",
    "versionName" : "1.0.0",
    "versionCode" : "100",
pages.json
@@ -150,7 +150,7 @@
                    "path" : "translateRecord/translateRecord",
                    "style" : 
                    {
                        "navigationBarTitleText" : ""
                        "navigationBarTitleText" : "审批记录"
                    }
                },
                {
policy/applyRecord/applyRecord.vue
@@ -8,27 +8,27 @@
            <u-tabs :list="list1" @click="click" :current="current" :scrollable="false" bgColor="white"></u-tabs>
        </u-sticky>
        <view class="list">
            <view class="list-item" @click="goReport" v-for="(item,index) in dataList" :key="index">
            <view class="list-item" @click="goReport(item.orderId)" v-for="(item,index) in dataList" :key="index">
                <view class="top-title">
                    <text>24年5月突击检查消防安全</text>
                    <text class="status">已结束</text>
                    <text>{{item.enforceReason}}</text>
                    <text class="status">{{mapStatus[item.orderStatus]}}</text>
                </view>
                <view class="user-info">
                    <text>王思雨</text>
                    <text>{{item.applyUser}}</text>
                    <view class="driver"></view>
                    <text>执法一大队</text>
                    <text>{{item.applyDeptName}}</text>
                </view>
                <view class="set-line">
                    <text>执法对象:</text>河南觉醒科技有限公司
                    <text>执法对象:</text>{{item.companyName}}
                </view>
                <view class="line"></view>
                <view class="set-flex set-start set-flex-content-between">
                    <view>
                        <view class="set-line1">
                            <text>执法时间:</text>2024-05-12 12:00
                            <text>执法时间:</text>{{item.planTime}}
                        </view>
                        <view class="set-line1">
                            <text>申请时间:</text>2024-05-12 12:00:12
                            <text>申请时间:</text>{{item.applyTime}}
                        </view>
                    </view>
@@ -69,37 +69,46 @@
                    pageSize: 10
                },
                total: 1,
                dataList: []
                dataList: [],
                mapStatus: {
                    1: '待审批',
                    2: "待执行",
                    3: "待上报",
                    '-1':"已拒绝",
                    4: "已结束"
                }
            }
        },
        onShow() {
        onLoad() {
            this.orderList()
        },
        onReachBottom() {
            if(this.list.length == this.total) {
            if(this.dataList.length == this.total) {
                return
            }
            this.queryParams.pageNum++
            this.orderList()
        },
        methods: {
            goReport() {
            goReport(id) {
                uni.navigateTo({
                    url: `/policy/applyRecordDetails/applyRecordDetails`
                    url: `/policy/applyRecordDetails/applyRecordDetails?id=${id}`
                })
            },
            click(e) {
                this.dataList = []
                this.queryParams.pageNum = 1
                this.current = e.index
                this.orderList()
            },
            orderList() {
                orderList({...this.queryParams, orderStatus: this.list1[this.current].value}).then(val => {
                    // console.log(val.data)
                    this.total = val.data.total
                    this.dataList = [...this.dataList,...val.data.rows]
                })
            },
            search(e){
                this.dataList = []
                this.queryParams.pageNum =1
                this.queryParams.companyName = e
                this.orderList()
policy/applyRecordDetails/applyRecordDetails.scss
@@ -56,6 +56,7 @@
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            grid-gap: 22rpx;
            padding: 0 32rpx;
            image{
                width: 100%;
                height: 220rpx;
@@ -96,6 +97,10 @@
                    align-items: center;
                    .time{
                        margin-left: 32rpx;
                        width: 58%;
                    }
                    .submit-per{
                        width: 42%;
                    }
                    text{
                        color: #4A4E60;
policy/applyRecordDetails/applyRecordDetails.vue
@@ -25,23 +25,40 @@
                    </view>
                    <view class="view-form-item">
                        <view class="label">执法时间</view>
                        <view>{{details.executeTime}}</view>
                        <view>{{details.planTime}}</view>
                    </view>
                    <view class="view-form-item">
                        <view class="label">执法类型</view>
                        <view>{{details.enforceTypeName}}</view>
                        <view>{{typeList}}</view>
                    </view>
                    <view class="view-form-item">
                        <view class="label">执法人员</view>
                        <view>{{details.executeUser}}</view>
                    <view v-if="!details.executeUser">
                        <view class="view-form-item">
                            <view class="label">执法人员</view>
                            <view>{{details.applyUser}}</view>
                        </view>
                        <view class="view-form-item">
                            <view class="label">执法部门</view>
                            <view>{{details.applyDeptName}}</view>
                        </view>
                    </view>
                    <view class="view-form-item">
                        <view class="label">执法部门</view>
                        <view>{{details.executeDeptName}}</view>
                    <view v-else>
                        <view class="view-form-item">
                            <view class="label">执法人员</view>
                            <view>{{details.executeUser}}</view>
                        </view>
                        <view class="view-form-item">
                            <view class="label">执法部门</view>
                            <view>{{details.executeDeptName}}</view>
                        </view>
                    </view>
                    <view class="view-form-item">
                    <view class="view-form-item" style="margin-top: 20rpx;">
                        <view class="label">随行人员</view>
                        <view>随行人员</view>
                        <view>
                            <view style="margin-bottom: 20rpx;"v-for="(item,index) in details.peers" :key="index">
                                {{item.peerUser}}({{item.peerDeptName}})
                            </view>
                        </view>
                    </view>
                    <view class="view-form-item">
                        <view class="label">是否通知企业</view>
@@ -65,40 +82,39 @@
                    {{ details.regionReason }}
                </view>
            </view>
            <view class="base-card">
            <view class="base-card" v-if="judgeDetails.length">
                <view class="title">
                    <text>审批情况</text>
                </view>
                <view class="view-form">
                    <view class="view-form-item">
                        <view class="label">审批结果</view>
                        <view>24年5月份消防突击检查</view>
                    </view>
                    <view class="view-form-item">
                        <view class="label">审批人</view>
                        <view>24年5月份消防突击检查</view>
                    </view>
                    <view class="view-form-item">
                        <view class="label">审批部门</view>
                        <view>24年5月份消防突击检查</view>
                    </view>
                    <view class="view-form-item">
                        <view class="label">审批时间</view>
                        <view>24年5月份消防突击检查</view>
                    <view v-for="(item,index) in judgeDetails" :key="index">
                        <view class="view-form-item">
                            <view class="label">审批结果</view>
                            <view v-if="item.checkStatus == 1" style="color: #3EB47A;">通过</view>
                            <view v-else style="color: red">拒绝</view>
                        </view>
                        <view class="view-form-item">
                            <view class="label">审批人</view>
                            <view>{{item.checkUser}}</view>
                        </view>
                        <view class="view-form-item">
                            <view class="label">审批部门</view>
                            <view>{{item.checkDeptName}}</view>
                        </view>
                        <view class="view-form-item">
                            <view class="label">审批时间</view>
                            <view>{{item.checkTime}}</view>
                        </view>
                    </view>
                </view>
            </view>
            <view class="base-card">
            <view class="base-card" v-if="details.orderStatus == 3 || details.orderStatus == 4">
                <view class="title">
                    <text>执法图片</text>
                </view>
                <view class="view-image">
                    <image src="https://picsum.photos/200/300" mode="widthFix"></image>
                    <image src="https://picsum.photos/200/300" mode="widthFix"></image>
                    <image src="https://picsum.photos/200/300" mode="widthFix"></image>
                    <image src="https://picsum.photos/200/300" mode="widthFix"></image>
                    <image src="https://picsum.photos/200/300" mode="widthFix"></image>
                    <!-- {{regionImgs}} -->
                    <image :src="baseUrl+item" mode="widthFix" v-for="(item,index) in details.regionImgs" :key="index"></image>
                </view>
            </view>
            <view class="base-card">
@@ -106,20 +122,22 @@
                    <text>执法进度</text>
                </view>
                <view class="view-step">
                    <view class="step-content">
                        <image class="icon" src="/static/policy/icon.png" mode="widthFix"></image>
                    <view class="step-content" :class="{none: index == nodeList.length - 1}" v-for="(item,index) in nodeList" :key="index">
                        <image class="icon" src="/static/policy/icon.png" mode="widthFix" v-if="!item.nodeReason"></image>
                        <image src="/static/policy/refject.png" mode="widthFix" class="icon" v-else></image>
                        <view class="top-title">
                            提交申请
                            {{item.nodeName}}
                        </view>
                        <view class="down-tips">
                            <view>提交人:<text>林小零</text></view>
                            <view class="time">2024-06-07 12:14</view>
                            <view class="u-line-1 submit-per">提交人:<text>{{item.nodeUser}}</text></view>
                            <view class="time">{{item.nodeTime}}</view>
                        </view>
                    </view>
                    <view class="step-content">
                    <!-- <view class="step-content">
                        <image class="icon" src="/static/policy/icon.png" mode="widthFix"></image>
                        <view class="top-title">
                            提交申请
                            审批通过
                        </view>
                        <view class="down-tips">
                            <view>提交人:<text>林小零</text></view>
@@ -127,7 +145,7 @@
                        </view>
                    </view>
                    <view class="step-content none">
                        <!-- <image class="icon" src="/static/policy/icon.png" mode="widthFix"></image> -->
                        <image class="icon" src="/static/policy/icon.png" mode="widthFix"></image>
                        <image src="/static/policy/refject.png" mode="widthFix" class="icon"></image>
                        <view class="top-title">
                            提交申请
@@ -136,7 +154,7 @@
                            <view>提交人:<text>林小零</text></view>
                            <view class="time">2024-06-07 12:14</view>
                        </view>
                    </view>
                    </view> -->
                </view>
            </view>
        </view>
@@ -145,30 +163,64 @@
<script>
    import {
        orderDetails
        orderDetails,
        orderNodeList,
        enforceLogList
    } from '@/api/policy.js'
    import { getDicts } from '@/api/data.js'
    import { config } from '@/common/config'
    export default {
        data() {
            return {
                details: {},
                nodeList: [],
                mapStatus: {
                    1: '待审批',
                    2: "待执行",
                    3: "待上报",
                    '-1':"已拒绝",
                    4: "已结束"
                }
                },
                typeList: '',
                judgeDetails: [],
                baseUrl: config.baseUrl
            }
        },
        onLoad(options) {
            this.orderDetails(options.id)
            this.getDetails(options.id)
            this.orderNodeList(options.id)
            this.enforceLogList(options.id)
        },
        methods: {
            getDetails(orderId) {
                orderDetails({
                    orderId
                }).then(val => {
                    this.details = val.data
                    this.details = val.data.data
                    if(this.details.regionImgs){
                         this.details.regionImgs = this.details.regionImgs.split(",")
                    }
                    this.getDicts()
                })
            },
            // 节点
            orderNodeList(orderId) {
                orderNodeList({orderId}).then(val => {
                    this.nodeList = val.data.data
                })
            },
            // 申请记录
            enforceLogList(orderId) {
                enforceLogList({orderId}).then(val => {
                    // console.log(val.data.rows)
                    this.judgeDetails = val.data.rows
                })
            },
            getDicts() {
                getDicts('enforce_type').then(val => {
                    const value = val.data.data.find(item => item.dictCode == this.details.enforceType)
                    this.typeList = value.dictLabel
                })
            }
        }
policy/components/mine.vue
@@ -11,7 +11,7 @@
                        <view class="dept-per">执法人员</view>
                    </view>
                    <view class="dept-name">
                        {{userInfo.data.dept.parentName}}
                        {{userInfo.data.dept.deptName}}
                    </view>
                </view>
            </view>
@@ -19,7 +19,7 @@
        <view class="main-box">
            <view class="show-phone-number">
                <text class="label">联系电话</text>
                <text v-if="userInfo.phonenumber">{{userInfo.data.phonenumber.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2")}}</text>
                <text v-if="userInfo.data.phonenumber">{{userInfo.data.phonenumber.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2")}}</text>
                <text v-else>暂无手机号</text>
            </view>
            <view class="show-phone-number" @click="goChangePhone">
policy/components/popup.vue
@@ -7,32 +7,36 @@
            <view class="border"></view>
            <view class="padding">
                <view>
                    <u-radio-group  placement="row">
                        <u-radio active-color="#3EB47A" label="通过" name="3"></u-radio>
                        <u-radio active-color="#3EB47A" label="拒绝" name="3"></u-radio>
                    <u-radio-group  placement="row" v-model="form.checkStatus">
                        <u-radio active-color="#3EB47A" label="通过" name="1"></u-radio>
                        <u-radio active-color="#3EB47A" label="拒绝" name="-1"></u-radio>
                    </u-radio-group>
                </view>
                <view class="margin-top">
                    <u-textarea  placeholder="请输入拒绝理由..."></u-textarea>
                    <u-textarea  placeholder="请输入拒绝理由..." v-model="form.checkReason"></u-textarea>
                </view>
            </view>
            <view class="down">
                <view class="cancel button" @click="close">取消</view>
                <view class="enter" @entery="entery">确认</view>
                <view class="enter" @click="entery">确认</view>
            </view>
        </view>
    </u-popup>
</template>
<script>
    export default {
        data() {
            return {
                show: false
                show: false,
                id: '',
                form: {}
            }
        },
        methods: {
            open() {
            open(id) {
                this.form = {}
                this.show = true
            },
            close(){
@@ -40,7 +44,14 @@
                this.$emit('cancel')
            },
            entery(){
                this.$emit('entery')
                if(this.form.checkStatus == -1 && !this.form.checkReason) {
                    uni.showToast({
                        title: '请输入拒绝理由',
                        icon: 'none'
                    })
                    return
                }
                this.$emit('entery', this.form)
            }
        }
    }
policy/components/tabs.vue
@@ -29,6 +29,9 @@
                    success: val => {
                        if(val.errMsg === 'scanCode:ok'){
                            console.log(val.result)
                            uni.navigateTo({
                                url: `/policy/scodePage/scodePage?code=${val.result}`
                            })
                        }
                    }
                })
policy/components/upload.vue
@@ -2,7 +2,7 @@
    <view>
        <view class="grid-box">
            <view class="image-box" v-for="(item,index) in imageList" :key="index">
                <image :src="item" mode="aspectFit"></image>
                <image :src="baseUrl+item" mode="aspectFit"></image>
                <image src="/static/policy/close.png" mode="widthFix" @click="delImage(index)" class="close"></image>
            </view>
            <view class="cam-box" @click="upload" v-if="imageList.length < max">
@@ -13,6 +13,8 @@
</template>
<script>
    import { upload } from '@/common/upload.js'
    import { config } from '@/common/config.js'
    export default {
        props: {
            max: {
@@ -21,12 +23,13 @@
            },
            maxSize: {
                type: Number,
                default: 2 * 1024 * 1024
                default: 10 * 1024 * 1024
            }
        },
        data() {
            return {
                imageList: []
                imageList: [],
                baseUrl: config.baseUrl
            }
        },
        methods: {
@@ -42,10 +45,26 @@
                            })
                            return
                        }
                        this.imageList.push(val.tempFilePaths[0])
                        // console.log(val.tempFilePaths)
                        // this.imageList.push(...val.tempFilePaths)
                        val.tempFilePaths.forEach(async item => {
                            await this.uploadImage(item)
                        })
                    }
                })
            },
            async uploadImage(file) {
                try{
                    const code = await upload(file)
                    this.imageList.push(code.fileName)
                } catch(err) {
                    uni.showToast({
                        title: '文件上传失败,请稍后重试',
                        icon: 'none'
                    })
                    console.log(err)
                }
            },
            delImage(index) {
                this.imageList.splice(index,1)
            }
policy/dataLook/dataLook.scss
@@ -3,10 +3,14 @@
    height: 380rpx;
    flex-shrink: 0;
    background: linear-gradient(180deg, #1171E0 42.5%, #F4F4F4 100%);
    position: fixed;
    top: 50px;
    z-index: -1;
}
.page-main{
    position: relative;
    top: -380rpx;
    // position: relative;
    // top: -380rpx;
    padding-bottom: 140rpx;
    .box{
        margin: 32rpx 32rpx 20rpx;
        background-color: white;
@@ -61,12 +65,24 @@
                }
                .value{
                    font-weight: 500;
                    font-size: 32rpx;
                }
                .width-set{
                    width: 80%;
                    display: flex;
                    justify-content: flex-start;align-items: center;
                    image{
                        width: 48rpx;
                        height: 48rpx;
                        margin-right: 36rpx;
                    }
                    .set-index{
                        width: 48rpx;
                        height: 48rpx;
                        line-height: 48rpx;
                        text-align: center;
                        display: inline-block;
                    }
                }
                
            }
@@ -82,4 +98,7 @@
            margin: 0 5rpx;
        }
    }
    .origin{
        color: #FE7B32;
    }
}
policy/dataLook/dataLook.vue
@@ -14,58 +14,63 @@
                <view class="grid-box">
                    <view class="grid-item">
                        <view class="label">企业总数</view>
                        <view>5,400</view>
                        <view>{{infoData.companyNum || 0}}</view>
                    </view>
                    <view class="grid-item">
                        <view class="label">执法单位</view>
                        <view>5,400</view>
                        <view>{{infoData.enforceCompanyNum || 0}}</view>
                    </view>
                    <view class="grid-item">
                        <view class="label">执法人员</view>
                        <view>5,400</view>
                        <view>{{infoData.enforceUserNum || 0}}</view>
                    </view>
                    <view class="grid-item">
                        <view class="label">执法申请</view>
                        <view>5,400</view>
                        <view>{{infoData.enforceOrderNum || 0}}</view>
                    </view>
                    <view class="grid-item">
                        <view class="label">已审批</view>
                        <view>5,400</view>
                        <view>{{infoData.enforceOrderCheckedNum || 0}}</view>
                    </view>
                    <view class="grid-item">
                        <view class="label">已结束</view>
                        <view>5,400</view>
                        <view>{{infoData.enforceOrderCompleteNum || 0}}</view>
                    </view>
                </view>
            </view>
            <view class="box">
                <view class="title set-flex-content-between set-flex">
                    <text>执法单位执法次数</text>
                    <u-icon name="calendar" size="24"></u-icon>
                    <u-icon name="calendar" size="24" @click="openDate(1)"></u-icon>
                </view>
                <view class="number">
                    <view class="date">2024-04-05 <text class="margin-text">至</text> 2024-06-14</view>
                    <view class="date">{{pageQuerm.beginTimeStr1}} <text class="margin-text">至</text> {{pageQuerm.endTimeStr1}}</view>
                    <view class="progress-box">
                        <qiun-data-charts key="11" type="bar" :opts="opts" :chartData="chartData" />
                        <qiun-data-charts  key="11" type="bar"
                            :opts="opts" :chartData="chartData" />
                    </view>
                </view>
            </view>
            <view class="box">
                <view class="title set-flex-content-between set-flex">
                    <text>企业被执法次数排行</text>
                    <u-icon name="calendar" size="24"></u-icon>
                    <u-icon name="calendar" size="24" @click="openDate(2)"></u-icon>
                </view>
                <view class="number">
                    <view class="date" style="margin-bottom: 36rpx;">2024-04-05 <text class="margin-text">至</text> 2024-06-14</view>
                    <view class="date" style="margin-bottom: 36rpx;">{{pageQuerm.beginTimeStr2}} <text class="margin-text">至</text>
                        {{pageQuerm.endTimeStr2}}</view>
                    <view class="list-box">
                        <view class="list-item" v-for="(item,index) in listData" :key="index">
                            <view class="width-set">
                                <text style="margin-right: 10rpx;">{{index+1}}</text>
                                <text class="company u-line-1">北京东方盈联科技有限公司</text>
                                <image src="/static/policy/rank1.png" mode="widthFix" v-if="index == 0"></image>
                                <image src="/static/policy/rank2.png" mode="widthFix" v-if="index == 1"></image>
                                <image src="/static/policy/rank3.png" mode="widthFix" v-if="index == 2"></image>
                                <text class="set-index" style="margin-right: 36rpx;color: #7E8596;" v-if="index > 2">{{index+1}}</text>
                                <text class="company u-line-1" style="color: #202D44;">{{item.k}}</text>
                            </view>
                            <text class="value">54</text>
                            <text class="value" :class="{origin: index <= 2}">{{item.v}}</text>
                        </view>
                        <view class="look-more">
                        <view class="look-more" @click="lookMore" v-if="showMore">
                            <text>查看更多</text>
                            <u-icon name="arrow-right" color="#7E8596"></u-icon>
                        </view>
@@ -75,46 +80,54 @@
            <view class="box">
                <view class="title set-flex-content-between set-flex">
                    <text>执法类型占比</text>
                    <u-icon name="calendar" size="24"></u-icon>
                    <u-icon name="calendar" size="24" @click="openDate(3)"></u-icon>
                </view>
                <view class="number">
                    <view class="date">2024-04-05 <text class="margin-text">至</text> 2024-06-14</view>
                    <view class="date" style="margin-bottom: 20rpx;">{{pageQuerm.beginTimeStr3}} <text class="margin-text">至</text> {{pageQuerm.endTimeStr3}}</view>
                    <view class="progress-box">
  <qiun-data-charts
      type="rose"
      key="22"
      :opts="opts1"
      :chartData="chartData1"
    />                    </view>
                        <qiun-data-charts type="rose"    tooltipFormat="tooltipDemo1"
 key="22" :opts="opts1" :chartData="chartData1" />
                    </view>
                </view>
            </view>
        </view>
            <u-datetime-picker
                        :show="show"
                        :maxDate="new Date().getTime()"
                        v-model="currentValue"
                        mode="year-month"
                        @confirm="confirmDate"
                ></u-datetime-picker>
    </view>
</template>
<script>
    import {
        getTotalInfo,
        getDeptCount,
        getCompanyCount,
        getEnforceTypeCount
    } from '@/api/data.js'
    export default {
        data() {
            return {
                typeItem: '',
                currentValue: '',
                show: false,
                infoData: [],
                listData: [
                    {
                        name: '北京东方盈联科技有限公司',
                        value: 54
                    },
                    {
                        name: '北京东方盈联科技有限公司',
                        value: 54
                    },
                    {
                        name: '北京东方盈联科技有限公司',
                        value: 54
                    },
                    {
                        name: '北京东方盈联科技有限公司',
                        value: 54
                    }
                ],
                chartData: {},
                pageQuerm: {
                    pageNum: 1,
                    pageSize: 10,
                    total: 1,
                    beginTimeStr: '',
                    endTimeStr: '',
                },
                originData: [],
                showMore: true,
                //您可以通过修改 config-ucharts.js 文件中下标为 ['bar'] 的节点来配置全局默认参数,如都是默认参数,此处可以不传 opts 。实际应用过程中 opts 只需传入与全局默认参数中不一致的【某一个属性】即可实现同类型的图表显示不同的样式,达到页面简洁的需求。
                opts: {
                    color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4",
@@ -149,65 +162,154 @@
                    }
                },
                chartData1: {},
                tooltipCustom: {},
                opts1: {
                        color: ["#1890FF","#91CB74","#FAC858","#EE6666","#73C0DE","#3CA272","#FC8452","#9A60B4","#ea7ccc"],
                        padding: [5,5,5,5],
                        enableScroll: false,
                        legend: {
                          show: true,
                          position: "left",
                          lineHeight: 25
                        },
                        extra: {
                          rose: {
                            type: "area",
                            minRadius: 50,
                            activeOpacity: 0.5,
                            activeRadius: 10,
                            offsetAngle: 0,
                            labelWidth: 15,
                            border: false,
                            borderWidth: 2,
                            borderColor: "#FFFFFF"
                          }
                        }
                      }
                    color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4",
                        "#ea7ccc"
                    ],
                    tooltipFormat: function (item) {
                        return "456"
                    },
                    padding: [5, 5, 5, 5],
                    enableScroll: false,
                    legend: {
                        show: false,
                    },
                    extra: {
                        rose: {
                            type: "area",
                            minRadius: 50,
                            activeOpacity: 0.5,
                            activeRadius: 10,
                            offsetAngle: 0,
                            labelWidth: 15,
                            border: false,
                            borderWidth: 2,
                            borderColor: "#FFFFFF"
                        },
                        tooltip: {
                            // bgColor: "#fff",
                            // showArrow: false,
                            // fontColor: "#202D44",
                            // bgOpacity: 1,
                        }
                    }
                }
            }
        },
        onReady() {
            // console.log(new Date().getMonth() + 1, new Date().getDate())
            let date = new Date()
             date.setMonth(date.getMonth() - 1); // 减去1个月
              date.setDate(1); // 设置日为月份的第一天
            this.pageQuerm.beginTime = this.$u.timeFormat(date, "yyyy-mm-dd") + " " + "00:00:00"
            this.pageQuerm.endTime = this.$u.timeFormat(new Date(), "yyyy-mm-dd") + " " +"23:59:59"
            this.pageQuerm.beginTimeStr1 = this.pageQuerm.beginTimeStr2 = this.pageQuerm.beginTimeStr3 = this.$u.timeFormat(date, "yyyy-mm-dd")
            this.pageQuerm.endTimeStr1 = this.pageQuerm.endTimeStr2 = this.pageQuerm.endTimeStr3 = this.$u.timeFormat(new Date(), "yyyy-mm-dd")
            this.getTotalInfo()
            this.getCompanyCount()
            this.getServerData();
            this.getServerData1()
        },
        methods: {
            confirmDate(e) {
                if(new Date().getMonth() == new Date(e.value).getMonth()){
                    this.pageQuerm[`beginTimeStr${this.typeItem}`] = this.$u.timeFormat(new Date(e.value).setDate(1), 'yyyy-mm-dd')
                    this.pageQuerm[`endTimeStr${this.typeItem}`] = this.$u.timeFormat(e.value, 'yyyy-mm-dd')
                    this.pageQuerm.beginTime = this.$u.timeFormat(new Date(e.value).setDate(1), 'yyyy-mm-dd') + " " + "00:00:00"
                    this.pageQuerm.endTime = this.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss')
                } else {
                    this.pageQuerm[`beginTimeStr${this.typeItem}`] = this.$u.timeFormat(new Date(e.value).setDate(1), 'yyyy-mm-dd')
                    this.pageQuerm.beginTime = this.$u.timeFormat(new Date(e.value).setDate(1), 'yyyy-mm-dd') + " " + "00:00:00"
                    const date = new Date(e.value);
                    const year = date.getFullYear();
                    const month = date.getMonth() + 1; // 月份从0开始计算,需要加1
                    const lastDay = new Date(year, month, 0)
                     this.pageQuerm.endTime = this.$u.timeFormat(new Date(lastDay), 'yyyy-mm-dd') + " " + "23:59:59"
                    this.pageQuerm[`endTimeStr${this.typeItem}`] = this.$u.timeFormat(new Date(lastDay), 'yyyy-mm-dd')
                }
                if(this.typeItem  == 1) {
                    this.getServerData()
                }
                if(this.typeItem  == 2) {
                    this.getCompanyCount()
                }
                if(this.typeItem  == 3) {
                    this.getServerData1()
                }
                this.show = false
            },
            openDate(item) {
                this.typeItem = item
                this.currentValue = new Date().getTime()
                this.show = true
            },
            lookMore() {
                this.pageQuerm.pageNum++
                const value = this.pageQuerm.pageNum * this.pageQuerm.pageSize
                const data = this.originData.slice((this.pageQuerm.pageNum - 1) * this.pageQuerm.pageSize, value)
                this.listData.push(...data)
                if(value >= this.pageQuerm.total) {
                    this.showMore = false
                }
            },
            // 获取执法信息
            getTotalInfo() {
                getTotalInfo(this.pageQuerm).then(val => {
                    // console.log(val)
                    this.infoData = val.data.data
                })
            },
            // 执法次数部门
            getServerData() {
                //模拟从服务器获取数据时的延时
                setTimeout(() => {
                    //模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
                getDeptCount(this.pageQuerm).then(val => {
                    const value = val.data.data
                    const label = value.map(item => item.k)
                    const data = value.map(item => item.v)
                    let res = {
                        categories: ["工商管理局", "城市管理局", "城市管理局", "城市管理局", "城市管理局", "城市管理局"],
                        categories: label,
                        series: [{
                                name: "目标值",
                                data: [35, 36, 31, 33, 13, 34]
                            }
                        ]
                            name: "执法次数",
                            data: data,
                        }]
                    };
                    this.chartData = JSON.parse(JSON.stringify(res));
                }, 500);
                })
            },
            // 企业被执法次数排行
            getCompanyCount() {
                getCompanyCount(this.pageQuerm).then(val => {
                    this.listData = val.data.data.slice(0, this.pageQuerm.pageSize)
                    this.originData  = val.data.data
                    this.pageQuerm.total = val.data.data.length
                    if(this.pageQuerm.total <= this.pageQuerm.pageSize) {
                        this.showMore = false
                    }
                })
            },
            getServerData1() {
                  //模拟从服务器获取数据时的延时
                  setTimeout(() => {
                    //模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
                    let res = {
                        series: [
                          {
                            data: [{"name":"一班","value":50},{"name":"二班","value":30},{"name":"三班","value":20},{"name":"四班","value":18},{"name":"五班","value":8}]
                          }
                        ]
                      };
                    this.chartData1 = JSON.parse(JSON.stringify(res));
                  }, 500);
                },
                getEnforceTypeCount(this.pageQuerm).then(val => {
                    const data = val.data.data.map(item => {
                        return {
                            name: item.k,
                            value: item.v,
                            "labelText": item.k
                        }
                    })
                    let res = {
                        series: [{
                            data:  data,
                            }]
                    };
                    this.chartData1 = JSON.parse(JSON.stringify(res));
                })
            },
        }
    }
</script>
policy/policyApply/policyApply.vue
@@ -41,7 +41,7 @@
                        执法内容
                    </view>
                    <view class="back">
                        <u--textarea :height="120" v-model="form.regionReason" placeholder="请输入" count maxlength="500"></u--textarea>
                        <u--textarea :height="120" v-model="form.enforceContent" placeholder="请输入" count maxlength="500"></u--textarea>
                    </view>
                </view>
            </view>
@@ -166,9 +166,10 @@
                    applyDeptName: '',
                    enforceType: 1,
                    isNoticeCompany: 0,
                    regionReason: '',
                    regionReason: 0,
                    planTimeStr: '',
                    peers: []
                    peers: [],
                    orderStatus: 1
                },
                show: false,
                columns: [],
@@ -227,7 +228,39 @@
                }
                return options;
            },
            authFile() {
                if(!this.form.enforceReason){
                    return '请填写主题'
                }
                if(!this.form.companyName){
                    return '请填写确认执法对象'
                }
                if(!this.form.companyId) {
                    return '请点击搜索确认执法对象'
                }
                if(!this.form.planTimeStr) {
                    return '请填写执法时间'
                }
                if(!this.form.enforceTypeName){
                    return '请选择执法类型'
                }
                if(!this.form.regionReason) {
                    return '请填写执法内容'
                }
                if(!this.form.peers.length){
                    return '请添加同行人'
                }
                return ''
            },
            submitApply(){
                const res =    this.authFile()
                if(res){
                    uni.showToast({
                        title: res,
                        icon: 'none'
                    })
                    return
                }
                orderAdd(this.form).then(val => {
                    if(val.data.code == 200) {
                        uni.showToast({
@@ -303,7 +336,7 @@
                            peerDeptName: item.dept.deptName,
                            peerId: item.userId,
                            peerPhone: item.phonenumber,
                            peerType: 3,
                            peerType: 2,
                            peerUser: item.nickName
                        })
                    }
policy/reportDetails/reportDetails.vue
@@ -4,35 +4,44 @@
            <view class="form">
                <view class="form-item">
                    <view class="label">执法主题</view>
                    <view class="input">24年5月份消防突击检查</view>
                    <view class="input">{{details.enforceReason}}</view>
                </view>
                <view class="form-item">
                    <view class="label">执法对象</view>
                    <view class="input">24年5月份消防突击检查</view>
                    <view class="input">{{details.companyName}}</view>
                </view>
                <view class="form-item">
                    <view class="label">执法时间</view>
                    <view class="input">24年5月份消防突击检查</view>
                    <view class="input">{{details.planTime}}</view>
                </view>
                <view class="form-item">
                    <view class="label">执法类型</view>
                    <view class="input">24年5月份消防突击检查</view>
                    <view class="input">{{enforceType}}</view>
                </view>
                <view class="form-item">
                    <view class="label">执法人员</view>
                    <view class="input">24年5月份消防突击检查</view>
                    <view class="input">{{details.executeUser}}</view>
                </view>
                <view class="form-item">
                    <view class="label">执法部门</view>
                    <view class="input">24年5月份消防突击检查</view>
                    <view class="input">{{details.executeDeptName}}</view>
                </view>
            </view>
        </view>
        <view class="box">
            <view class="form-input">
                <view class="form-input-item" style="margin-bottom: 40rpx;">
                    <view class="form-label require" style="margin-bottom: 40rpx;">执法结果</view>
                    <view>
                        <u-radio-group v-model="form.regionStatus">
                            <u-radio shape="circle" label="正常" name="0"></u-radio>
                            <u-radio shape="circle" label="待整改" name="1"></u-radio>
                        </u-radio-group>
                    </view>
                </view>
                <view class="form-input-item">
                    <view class="form-label require">执法结果</view>
                    <u-textarea placeholder="请输入..." count v-model="form.reasoon" maxlength="500"></u-textarea>
                    <view class="form-label require">执法结果说明</view>
                    <u-textarea placeholder="请输入..." count v-model="form.regionReason" maxlength="500"></u-textarea>
                </view>
                
                <view class="form-input-item">
@@ -41,13 +50,13 @@
                        <view class="show-hint">可上传9张图,单张不得超过10m</view>
                    </view>
                    <view>
                        <uploadImage></uploadImage>
                        <uploadImage ref="uploadImage"></uploadImage>
                    </view>
                </view>
            </view>
        </view>
        <view class="down">
            <view class="button">
            <view class="button" @click="startReport">
                上报结果
            </view>
        </view>
@@ -56,6 +65,8 @@
<script>
    import uploadImage from '@/policy/components/upload.vue'
    import { orderDetails,orderUpd } from '@/api/policy.js'
    import { getDicts } from '@/api/data.js'
    export default {
        components: {
            uploadImage
@@ -63,57 +74,65 @@
        data() {
            return {
                form: {
                    reasoon: ''
                    regionReason: '',
                    regionStatus: '0'
                },
                fileList1: []
                fileList1: [],
                details: {},
                enforceType: ""
            }
        },
        onLoad(options) {
            this.orderDetails(options.id)
        },
        methods: {
            // 删除图片
            deletePic(event) {
                this[`fileList${event.name}`].splice(event.index, 1)
            // 获取执法类型枚举
            getDicts() {
                getDicts('enforce_type').then(val => {
                    if(val.data.data) {
                        this.enforceType = val.data.data.find(item => item.dictCode == this.details.enforceType).dictLabel
                    }
                })
            },
            // 新增图片
            async afterRead(event) {
                // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
                let lists = [].concat(event.file)
                let fileListLen = this[`fileList${event.name}`].length
                lists.map((item) => {
                    this[`fileList${event.name}`].push({
                        ...item,
                        status: 'uploading',
                        message: '上传中'
            // 获取执法单详情
            orderDetails(id) {
                orderDetails({orderId: id}).then(val => {
                    this.details = val.data.data
                    this.getDicts()
                })
            },
            // 上报执行结果
            startReport() {
                if(!this.form.regionReason){
                    uni.showToast({
                        title: '请填写执法结果',
                        icon: 'none'
                    })
                })
                for (let i = 0; i < lists.length; i++) {
                    const result = await this.uploadFilePromise(lists[i].url)
                    let item = this[`fileList${event.name}`][fileListLen]
                    this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
                        status: 'success',
                        message: '',
                        url: result
                    }))
                    fileListLen++
                    return
                }
            },
            uploadFilePromise(url) {
                return new Promise((resolve, reject) => {
                    let a = uni.uploadFile({
                        url: 'http://192.168.2.21:7001/upload', // 仅为示例,非真实的接口地址
                        filePath: url,
                        name: 'file',
                        formData: {
                            user: 'test'
                        },
                        success: (res) => {
                            setTimeout(() => {
                                resolve(res.data.data)
                            }, 1000)
                        }
                    });
                const image = this.$refs.uploadImage.imageList
                if(!image.length){
                    uni.showToast({
                        title: '请上传执法图片',
                        icon: 'none'
                    })
                    return
                }
                this.details.regionReason = this.form.regionReason
                this.form.regionImgs = image.join()
                this.form.orderId = this.details.orderId
                orderUpd(this.form).then(val  =>{
                    if(val.data.code == 200) {
                        uni.showToast({
                            title: '上报成功',
                            icon: 'none'
                        })
                        setTimeout(() => {
                            uni.navigateBack()
                        }, 500)
                    }
                })
            },
            }
        }
    }
</script>
@@ -124,4 +143,7 @@
</style>
<style lang="scss" scoped>
    @import "./reportDetails.scss";
    /deep/ .u-radio{
        margin-right: 80rpx;
    }
</style>
policy/reportPage/reportPage.vue
@@ -1,90 +1,36 @@
<template>
    <view class="page-box">
        <view class="list">
            <view class="list-item" @click="goReport">
            <view class="list-item" v-for="(item,index) in list" :key="index">
                <view class="top-title">
                    <text>24年5月突击检查消防安全</text>
                    <text>{{item.enforceReason}}</text>
                    <text class="status">待上报</text>
                </view>
                <view class="user-info">
                    <text>王思雨</text>
                    <text>{{item.executeUser}}</text>
                    <view class="driver"></view>
                    <text>执法一大队</text>
                    <text>{{item.executeDeptName}}</text>
                </view>
                <view class="set-line">
                    <text>执法对象:</text>河南觉醒科技有限公司
                    <text>执法对象:</text>{{item.companyName}}
                </view>
                <view class="line"></view>
                <view class="set-flex set-start set-flex-content-between">
                    <view>
                        <view class="set-line1">
                            <text>执法时间:</text>2024-05-12 12:00
                            <text>执法时间:</text>{{item.planTime}}
                        </view>
                        <view class="set-line1">
                            <text>申请时间:</text>2024-05-12 12:00:12
                            <text>申请时间:</text>{{item.applyTime}}
                        </view>
                    </view>
                    <view class="button">
                    <view class="button" @click="goReport(item.orderId)" >
                        上报
                    </view>
                </view>
            </view>
            <view class="list-item">
                <view class="top-title">
                    <text>24年5月突击检查消防安全</text>
                    <text class="status">待上报</text>
                </view>
                <view class="user-info">
                    <text>王思雨</text>
                    <view class="driver"></view>
                    <text>执法一大队</text>
                </view>
                <view class="set-line">
                    <text>执法对象:</text>河南觉醒科技有限公司
                </view>
                <view class="line"></view>
                <view class="set-flex set-start set-flex-content-between">
                    <view>
                        <view class="set-line1">
                            <text>执法时间:</text>2024-05-12 12:00
                        </view>
                        <view class="set-line1">
                            <text>申请时间:</text>2024-05-12 12:00:12
                        </view>
                    </view>
                    <view class="button">
                        上报
                    </view>
                </view>
            </view>
            <view class="list-item">
                <view class="top-title">
                    <text>24年5月突击检查消防安全</text>
                    <text class="status">待上报</text>
                </view>
                <view class="user-info">
                    <text>王思雨</text>
                    <view class="driver"></view>
                    <text>执法一大队</text>
                </view>
                <view class="set-line">
                    <text>执法对象:</text>河南觉醒科技有限公司
                </view>
                <view class="line"></view>
                <view class="set-flex set-start set-flex-content-between">
                    <view>
                        <view class="set-line1">
                            <text>执法时间:</text>2024-05-12 12:00
                        </view>
                        <view class="set-line1">
                            <text>申请时间:</text>2024-05-12 12:00:12
                        </view>
                    </view>
                    <view class="button">
                        上报
                    </view>
                </view>
            </view>
             <u-empty v-if="!list.length" mode="data"></u-empty>
        </view>
        <view class="down">
            <view class="button" @click="goRecord">
@@ -95,22 +41,48 @@
</template>
<script>
    import { executeList } from '@/api/policy.js'
    export default {
        data() {
            return {
                list: [],
                total: 1,
                queryParams: {
                    pageNum: 1,
                    pageSize: 10,
                    orderStatus: 3
                }
            }
        },
        onShow() {
            this.queryParams.pageNum = 1
            this.list = []
            this.executeList()
        },
        onReachBottom() {
            if(this.list.length == this.list.length) {
                return
            }
            this.queryParams.pageNum++
            this.executeList()
        },
        methods: {
            goReport() {
            goReport(id) {
                uni.navigateTo({
                    url: `/policy/reportDetails/reportDetails`
                    url: `/policy/reportDetails/reportDetails?id=${id}`
                })
            },
            goRecord() {
                uni.navigateTo({
                    url: `/policy/reportRecord/reportRecord`
                })
            },
            // 获取待执法列表
            executeList() {
                executeList(this.queryParams).then(val => {
                    this.list = [...this.list, ...val.data.rows]
                    this.total = val.data.total
                })
            }
        }
    }
policy/reportRecord/reportRecord.scss
@@ -1,4 +1,7 @@
.page-box{
    .padding{
        padding: 20rpx 32rpx;
    }
    .list{
        margin: 20rpx 32rpx;
        .list-item{
policy/reportRecord/reportRecord.vue
@@ -1,119 +1,108 @@
<template>
    <view class="page-box">
        <u-sticky bgColor="white">
            <u-tabs :list="list1" @click="click" :scrollable="false" bgColor="white"></u-tabs>
            <view class="padding">
                <u-search placeholder="请输入申请记录关键词" v-model="queryParams.enforceReason" @clear="clean" shape="square" @confirm="search" :showAction="false"></u-search>
            </view>
        </u-sticky>
        <view class="list">
            <view class="list-item" @click="goReport">
                <view class="top-title">
                    <text>24年5月突击检查消防安全</text>
                    <text class="status">已结束</text>
                </view>
                <view class="user-info">
                    <text>王思雨</text>
                    <view class="driver"></view>
                    <text>执法一大队</text>
                </view>
                <view class="set-line">
                    <text>执法对象:</text>河南觉醒科技有限公司
                </view>
                <view class="line"></view>
                <view class="set-flex set-start set-flex-content-between">
                    <view>
                        <view class="set-line1">
                            <text>执法时间:</text>2024-05-12 12:00
                        </view>
                        <view class="set-line1">
                            <text>申请时间:</text>2024-05-12 12:00:12
                        </view>
                    </view>
                </view>
            </view>
            <view class="list-item">
                <view class="top-title">
                    <text>24年5月突击检查消防安全</text>
                    <text class="status">已结束</text>
                </view>
                <view class="user-info">
                    <text>王思雨</text>
                    <view class="driver"></view>
                    <text>执法一大队</text>
                </view>
                <view class="set-line">
                    <text>执法对象:</text>河南觉醒科技有限公司
                </view>
                <view class="line"></view>
                <view class="set-flex set-start set-flex-content-between">
                    <view>
                        <view class="set-line1">
                            <text>执法时间:</text>2024-05-12 12:00
                        </view>
                        <view class="set-line1">
                            <text>申请时间:</text>2024-05-12 12:00:12
                        </view>
                    </view>
                </view>
            </view>
            <view class="list-item">
                <view class="top-title">
                    <text>24年5月突击检查消防安全</text>
                    <text class="status">已结束</text>
                </view>
                <view class="user-info">
                    <text>王思雨</text>
                    <view class="driver"></view>
                    <text>执法一大队</text>
                </view>
                <view class="set-line">
                    <text>执法对象:</text>河南觉醒科技有限公司
                </view>
                <view class="line"></view>
                <view class="set-flex set-start set-flex-content-between">
                    <view>
                        <view class="set-line1">
                            <text>执法时间:</text>2024-05-12 12:00
                        </view>
                        <view class="set-line1">
                            <text>申请时间:</text>2024-05-12 12:00:12
                        </view>
                    </view>
                </view>
            </view>
             <view class="list-item" @click="goReport(item.orderId)" v-for="(item,index) in list" :key="index">
                 <view class="top-title">
                     <text>{{item.enforceReason}}</text>
                     <text class="status">已结束</text>
                 </view>
                 <view class="user-info">
                     <text>{{item.executeUser}}</text>
                     <view class="driver"></view>
                     <text>{{item.executeDeptName}}</text>
                 </view>
                 <view class="set-line">
                     <text>执法对象:</text>{{item.companyName}}
                 </view>
                 <view class="line"></view>
                 <view class="set-flex set-start set-flex-content-between">
                     <view>
                         <view class="set-line1">
                             <text>执法时间:</text>{{item.planTime}}
                         </view>
                         <view class="set-line1">
                             <text>申请时间:</text>{{item.applyTime}}
                         </view>
                     </view>
                     <!-- <view class="button" @click="goReport(item.orderId)" >
                         上报
                     </view> -->
                 </view>
             </view>
              <u-empty v-if="!list.length" mode="data"></u-empty>
        </view>
    </view>
</template>
<script>
    import {
        executeList
    } from '@/api/policy.js'
    export default {
        data() {
            return {
                      list1: [{
                                    name: '待上报',
                                }, {
                                    name: '已上报',
                                }]
                list: [],
                total: 1,
                queryParams: {
                    pageNum: 1,
                    pageSize: 10,
                    orderStatus: 4
                },
                searchContent: ''
            }
        },
        onShow() {
            this.queryParams.pageNum = 1
            this.list = []
            this.executeList()
        },
        onReachBottom() {
            if(this.list.length == this.total) {
                return
            }
            this.queryParams.pageNum++
            this.orderList()
        },
        methods: {
            goReport() {
            clean() {
                this.queryParams.enforceReason = ""
                this.list = []
                this.executeList()
            },
            search() {
                this.queryParams.pageNum = 1
                this.list = []
                this.executeList()
            },
            goReport(order) {
                uni.navigateTo({
                    url: `/policy/reportDetails/reportDetails`
                    url: `/policy/applyRecordDetails/applyRecordDetails?id=${order}`
                })
            },
            click() {
            },
            executeList() {
                executeList(this.queryParams).then(val => {
                    this.list = [...this.list, ...val.data.rows]
                    this.total = val.data.total
                })
            }
        }
    }
</script>
<style>
    page{
    page {
        background-color: #F4F4F4;
    }
</style>
<style lang="scss" scoped>
@import "./reportRecord.scss";
</style>
    @import "./reportRecord.scss";
</style>
policy/scodePage/scodePage.scss
@@ -158,4 +158,14 @@
}
.hide-canvas{
    display: none;
}
.button-entery{
    text-align: right;
    .button{
        background-color: #4F86F3;
        color: white;
        padding: 20rpx 32rpx;
        border-radius: 10rpx;
        display: inline-block;
    }
}
policy/scodePage/scodePage.vue
@@ -29,66 +29,118 @@
                <image src="/static/policy/qrcode-border.png" class="border" mode="widthFix"></image>
                <image :src="uqrcodeImage" mode="widthFix" class="qrcode-1"></image>
                <view class="code-time">
                    <text>扫码时间:</text>2024-05-12 12:00
                    <text>扫码时间:</text>{{$u.timeFormat(new Date(), 'yyyy-mm-dd hh:MM:ss')}}
                </view>
            </view>
            <view class="code">
                <view class="item">
                    <text class="label">执法人员</text>
                    <text class="value">王小丫</text>
                    <text class="value">{{userInfo.nickName}}</text>
                </view>
                <view class="write-border"></view>
                <view class="item">
                    <text class="label">执法部门</text>
                    <text class="value">工商管理局</text>
                    <text class="value">{{userInfo.dept.deptName}}</text>
                </view>
            </view>
            <view class="hint-text">
                当前企业存在<text>1</text>条未完成的执法任务
                当前企业存在<text>{{list.length}}</text>条未完成的执法任务
            </view>
            <!-- <view class="hint-text">
                当前企业未完成的执法任务
            </view> -->
            <view class="down-block">
                <view class="box">
                    <view class="title">24年5月突击检查消防安全</view>
                    <view class="user-news">
                        <text>王思雨</text>
                        <view class="driver"></view>
                        <text>工商管理局</text>
                    </view>
                    <view class="font-13">
                        <text>执法对象:</text>河南觉醒科技有限公司
                    </view>
                    <view class="border"></view>
                    <view class="font-12 margin-bottom">
                        <text>执法时间:</text>2024-05-12 12:00
                    </view>
                    <view class="font-12">
                        <text>申请时间:</text>2024-05-12 12:00:12
                    </view>
                </view>
                <swiper style="height: 500rpx;" :indicator-dots="false"  :interval="3000" :duration="1000">
                    <swiper-item v-for="(item,index) in list" :key="index">
                        <view class="box">
                            <view class="title">{{item.enforceReason}}</view>
                            <view class="user-news">
                                <text>{{item.applyUser}}</text>
                                <view class="driver"></view>
                                <text>{{item.applyDeptName}}</text>
                            </view>
                            <view class="font-13">
                                <text>执法对象:</text>{{item.companyName}}
                            </view>
                            <view class="border"></view>
                            <view class="font-12 margin-bottom">
                                <text>执法时间:</text>{{item.planTime}}
                            </view>
                            <view class="font-12">
                                <text>申请时间:</text>{{item.applyTime}}
                            </view>
                            <view class="button-entery">
                                <view class="button" @click="doScanOrder(item.orderId)">确认执法</view>
                            </view>
                        </view>
                    </swiper-item>
                </swiper>
            </view>
        </view>
        <uqrcode class="hide-canvas" :size="470" sizeUnit="rpx" v-if="companyCode" ref="uqrcode" canvas-id="qrcode" :value="companyCode" :options="{ backgroundColor: 'green',useDynamicSize: true,  areaColor: '#ffffff', foregroundColor: '#ffffff' }"></uqrcode>
        <uqrcode class="hide-canvas" :size="470" sizeUnit="rpx" v-if="companyCode" ref="uqrcode" canvas-id="qrcode" :value="companyCode" :options="{ backgroundColor: color,useDynamicSize: true,  areaColor: '#ffffff', foregroundColor: '#ffffff' }"></uqrcode>
        
    </view>
</template>
<script>
    import { getScanList, doScanOrder } from '@/api/policy.js'
    import { getInfo } from '@/api/auth.js'
    export default {
        data() {
            return {
                companyCode: 'code===',
                uqrcodeImage: ''
                companyCode: '',
                uqrcodeImage: '',
                list: [],
                userInfo: {},
                color: ''
            }
        },
        onReady() {
            this.$refs.uqrcode.toTempFilePath({
              success: res => {
                this.uqrcodeImage = res.tempFilePath
              }
            });
        },
        onLoad(options) {
            this.getScanList(options.code)
            this.getInfo()
        },
        onShow() {
        },
        methods: {
            getScanList(companyCode){
                getScanList({companyCode}).then(val => {
                    this.list = val.data.data
                    if(this.list.length) {
                        this.color = 'green'
                    } else {
                        this.color = 'red'
                    }
                    this.companyCode = companyCode
                    setTimeout(() => {
                        this.$refs.uqrcode.toTempFilePath({
                          success: res => {
                            this.uqrcodeImage = res.tempFilePath
                          }
                        });
                    }, 500)
                })
            },
            getInfo() {
                getInfo().then(val => {
                    console.log(val.data.data)
                    this.userInfo = val.data.data
                })
            },
            doScanOrder(item) {
                doScanOrder(item).then(val => {
                    if(val.data.code == 200) {
                        uni.showToast({
                            title: '确认执法成功',
                            icon: 'none'
                        })
                    }
                })
            }
        }
    }
</script>
policy/translate/translate.vue
@@ -8,28 +8,28 @@
                </view>
                <view class="list-item">
                    <view class="top-title">
                        <text>{{item.checkReason}}</text>
                        <text>{{item.enforceReason}}</text>
                        <text class="status">待审批</text>
                    </view>
                    <view class="user-info">
                        <text>王思雨</text>
                        <text>{{item.applyUser}}</text>
                        <view class="driver"></view>
                        <text>{{item.checkDeptName}}</text>
                    </view>
                    <view class="set-line">
                        <text>执法对象:</text>河南觉醒科技有限公司
                        <text>执法对象:</text>{{item.companyName}}
                    </view>
                    <view class="line"></view>
                    <view class="set-flex set-start set-flex-content-between">
                        <view>
                            <view class="set-line1">
                                <text>执法时间:</text>2024-05-12 12:00
                                <text>执法时间:</text>{{item.planTime}}
                            </view>
                            <view class="set-line1">
                                <text>申请时间:</text>2024-05-12 12:00:12
                                <text>申请时间:</text>{{item.applyTime}}
                            </view>
                        </view>
                        <view class="button" v-if="!isJudege" @click="goStartJudeg">
                        <view class="button" v-if="!isJudege" @click="goStartJudeg(item.orderId)">
                            审批
                        </view>
                    </view>
@@ -55,7 +55,7 @@
<script>
    import popupCom from '@/policy/components/popup.vue'
    import { checkLogList,checkUpd } from '@/api/policy.js'
    import { checkLogList, checkUpd } from '@/api/policy.js'
    export default {
        components: {
            popupCom
@@ -71,7 +71,8 @@
                    pageNum: 1,
                    pageSize: 10,
                    checkStatus: 0
                }
                },
                recordList: []
            }
        },
        computed: {
@@ -103,7 +104,8 @@
            click() {
            },
            goStartJudeg() {
            goStartJudeg(id) {
                this.recordList = id
                this.$refs.popup.open()
            },
            // 批量审批
@@ -130,8 +132,22 @@
                    })
                }
            },
            entery() {
                this.isJudege = false
            entery(form) {
                // 1企业审批,2执法单审批
                checkUpd({...form, id: this.recordList, checkType: 2}).then(val => {
                    if(val.data.code == 200) {
                        uni.showToast({
                            title: '审批成功',
                            icon: 'none'
                        })
                    }
                    this.list = []
                    this.queryms.pageNum = 1
                    this.checkLogList()
                    this.$refs.popup.close()
                    this.isJudege = false
                })
            },
            cancelSelect() {
                this.isJudege = false
policy/translateRecord/translateRecord.vue
@@ -2,58 +2,101 @@
    <view class="page-box">
        <u-sticky bgColor="white">
            <view class="set-search">
                <u-search placeholder="请输入执法主题 "  shape="square" :showAction="false"></u-search>
                <u-search placeholder="请输入执法主题 " v-model="value" @clear="value = '';search()" @search="search" @blur="search"  shape="square" :showAction="false"></u-search>
            </view>
            <view class="border"></view>
            <u-tabs :list="list1" @click="click" :scrollable="false" bgColor="white"></u-tabs>
            <u-tabs :list="list1" @click="click" :current="current" :scrollable="false" bgColor="white"></u-tabs>
        </u-sticky>
        <view class="list">
            <view class="list-item" @click="goReport">
            <view class="list-item" @click="goReport" v-for="(item,index) in list" :key="index">
                <view class="top-title">
                    <text>24年5月突击检查消防安全</text>
                    <text class="status status2">通过</text>
                    <text class="status status4">拒绝</text>
                    <text>{{item.enforceReason}}</text>
                    <text class="status status2" v-if="item.checkStatus == 2">通过</text>
                    <text class="status status4" v-else>拒绝</text>
                </view>
                <view class="user-info">
                    <text>王思雨</text>
                    <text>{{item.applyUser}}</text>
                    <view class="driver"></view>
                    <text>执法一大队</text>
                    <text>{{item.applyDeptName}}</text>
                </view>
                <view class="set-line">
                    <text>执法对象:</text>河南觉醒科技有限公司
                    <text>执法对象:</text>{{item.companyName}}
                </view>
                <view class="line"></view>
                <view class="set-flex set-start set-flex-content-between">
                    <view>
                        <view class="set-line1">
                            <text>执法时间:</text>2024-05-12 12:00
                            <text>执法时间:</text>{{item.planTime}}
                        </view>
                        <view class="set-line1">
                            <text>申请时间:</text>2024-05-12 12:00:12
                            <text>申请时间:</text>{{item.applyTime}}
                        </view>
                    </view>
                </view>
            </view>
            <u-empty v-if="!list.length"></u-empty>
        </view>
    </view>
</template>
<script>
    import { checkedList } from '@/api/policy.js'
    export default {
        data() {
            return {
                current: 0,
                queryParams: {
                    pageNum: 1,
                    pageSize: 10
                },
                    list1: [{
                                    name: '全部',
                                    value: ''
                                }, {
                                    name: '通过',
                                    value: 2
                                }, {
                                    name: '拒绝',
                                    value: -1
                                }],
                list: [
                ],
                total: 1,
                value: ''
            }
        },
        onLoad() {
            this.enforceLogList()
        },
        onReachBottom() {
            if(this.total == this.list.length) {
                return
            }
            this.queryParams.pageNum++
            this.enforceLogList()
        },
        methods: {
            search(e) {
                this.list = []
                this.queryParams.enforceReason = e
                this.queryParams.pageNum = 1
                this.enforceLogList()
            },
            goReport() {
                
            },
            click() {
            click(e) {
                this.list = []
                this.queryParams.pageNum = 1
                this.current = e.index
                this.enforceLogList()
            },
            enforceLogList() {
                checkedList({...this.queryParams, checkStatus: this.list1[this.current].value}).then(val => {
                    this.list = [...this.list,...val.data.rows]
                    this.total = val.data.total
                })
            }
        }
    }
static/policy/loginHeader.png
static/policy/loginHeaer1.png
static/policy/rank1.png
static/policy/rank2.png
static/policy/rank3.png
uni_modules/qiun-data-charts/js_sdk/u-charts/config-ucharts.js
@@ -71,6 +71,9 @@
        return series[index].name+':'+series[index].data+'元'
      }
    },
    tooltipDemo1:function(val, index, series, opts) {
        return "换行/" + val.name  + "/" + "数量:" + val.data + "/" +"占比:" + (val._proportion_ * 100).toFixed(2) + "%"
    }
  },
  //这里演示了自定义您的图表类型的option,可以随意命名,之后在组件上 type="demotype" 后,组件会调用这个花括号里的option,如果组件上还存在opts参数,会将demotype与opts中option合并后渲染图表。
  "demotype":{
uni_modules/qiun-data-charts/js_sdk/u-charts/u-charts.js
@@ -2806,6 +2806,23 @@
  if(toolTipOption.showCategory==true && opts.categories){
    textList.unshift({text:opts.categories[opts.tooltip.index],color:null})
  }
     if (textList[0].text.split("/")[0] == "换行") {
         let newTextList = [{
                 "color": "#FCDB66",
                 "legendShape": "circle",
                 "text": textList[0].text.split("/")[1]
             },
             {
                 "color": "transparent",
                 "text": textList[0].text.split("/")[2]
             },
             {
                 "color": "transparent",
                 "text": textList[0].text.split("/")[3]
             },
         ]
         textList = newTextList
     }
  var fontSize = toolTipOption.fontSize * opts.pix;
  var lineHeight = toolTipOption.lineHeight * opts.pix;
  var boxPadding = toolTipOption.boxPadding * opts.pix;