ll
liukangdong
2024-11-30 f956955c38a67f968977b7d784ff016ab5b17223
ll
已修改11个文件
933 ■■■■■ 文件已修改
h5/App.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/api/yw.js 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/manifest.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/operation/device.vue 74 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/operation/record.vue 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/polling/detail.vue 211 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/polling/point.vue 158 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/polling/task.vue 81 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/workOrder/detail.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/workOrder/edit.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/workOrder/list.vue 325 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/App.vue
@@ -18,6 +18,9 @@
body{
    font-size: 28rpx;
}
.primaryColor {
    color: $primaryColor !important;
}
.flex-cb {
  display: flex;
  justify-content: space-between;
h5/api/yw.js
@@ -70,4 +70,54 @@
    url: 'visitsAdmin/cloudService/business/ywDeviceRecord/' + id,
    method: 'get'
  })
}
// 设备列表
export const ywDeviceCreate = (data) => {
  return http({
    url: 'visitsAdmin/cloudService/business/ywDeviceRecord/create',
    data
  })
}
// 设备列表
export const ywDevicePost = (data) => {
  return http({
    url: 'visitsAdmin/cloudService/business/ywDevice/page',
    data
  })
}
// 巡检任务列表
export const ywPatrolTaskPost = (data) => {
  return http({
    url: 'visitsAdmin/cloudService/business/ywPatrolTask/page',
    data
  })
}
// 巡检点列表
export const ywPatrolTaskRecord = (data) => {
  return http({
    url: 'visitsAdmin/cloudService/business/ywPatrolTaskRecord/page',
    data
  })
}
// 巡检任务详情
export const ywPatrolDetail = (id) => {
  return http({
    url: 'visitsAdmin/cloudService/business/ywPatrolTask/' + id,
    method: 'get'
  })
}
// 巡检任务详情
export const ywPatrolPointDetail = (id) => {
  return http({
    url: 'visitsAdmin/cloudService/business/ywPatrolTaskRecord/' + id,
    method: 'get'
  })
}
// 巡检点巡检
export const patrolData = (data) => {
  return http({
    url: 'visitsAdmin/cloudService/business/ywPatrolTaskRecord/patrolData',
    data
  })
}
h5/manifest.json
@@ -129,7 +129,7 @@
                "/gateway_interface" : {
                    // 这个字段名需与你配置的basePrefixUrl一致,系统识别到带有/dev-api请求的地址时,会在前面拼接上代理服务器地址
                    // "target" : "http://172.20.10.7:10010", // 代理服务器域名或IP地址
                    "target" : "http://192.168.0.108:10030", // 代理服务器域名或IP地址
                    "target" : "http://192.168.0.162:10010", // 代理服务器域名或IP地址
                    // "target" : "http://10.50.250.253:8088/gateway_interface", // 代理服务器域名或IP地址
                    // "target" : "http://192.168.0.173/gateway_interface", // 代理服务器域名或IP地址
                    "changeOrigin" : true, // 允许跨域 
h5/pages/operation/device.vue
@@ -5,7 +5,7 @@
                <view class="la"><text class="red">*</text>选择设备</view>
                <view class="line">
                    <view class="sel_wrap" @click="showModal = true">
                        <view class="left" :class="param.name ? '' : 'placeholder9'">{{ param.name ? param.name : '请选择设备' }}</view>
                        <view class="left" :class="param.deviceName ? '' : 'placeholder9'">{{ param.deviceName ? param.deviceName : '请选择设备' }}</view>
                        <u-icon name="arrow-right" color="#999999" size="17"></u-icon>
                    </view>
                    <image class="icon" src="@/static/side/scan.png" mode=""></image>
@@ -28,9 +28,9 @@
                        <u-icon name="plus" color="rgb(153, 153, 153)" size="28"></u-icon>
                        <view class="mt6">图片/视频</view>
                    </view>
                    <view class="upload_file" v-for="(item, i) in dealFileList" :key="i">
                    <view class="upload_file" v-for="(item, i) in fileList" :key="i">
                        <u-icon class="close" size="20" name="close-circle-fill" color="red"
                            @click="fileDel('dealBeforeFileList', i)"></u-icon>
                            @click="fileDel('fileList', i)"></u-icon>
                        <image v-if="item.type == 0" :src="item.fileurlFull" mode="widthFix"></image>
                        <video v-if="item.type == 1" :src="item.fileurlFull" :controls="false"></video>
                    </view>
@@ -39,13 +39,11 @@
            <view class="item">
                <view class="la">运维备注</view>
                <view class="line">
                    <textarea v-model="param.checkInfo" placeholder="请输入" placeholder-class="placeholder9" />
                    <textarea v-model="param.content" placeholder="请输入" placeholder-class="placeholder9" />
                </view>
            </view>
        </view>
        <view class="sub_btn">
            提交
        </view>
        <view class="sub_btn" @click="onSubmit">提交</view>
        <!--  -->
        <u-popup :show="showUpload" @close="showUpload = false" closeOnClickOverlay>
            <view class="sel_upload_wrap">
@@ -62,14 +60,12 @@
                    <input v-model="searchValue" @confirm="getDevice()" type="text" placeholder="搜索设备名称/编号" placeholder-class="placeholder9" />
                </view>
                <view class="modal_list">
                    <view class="item">
                        <view class="name">设备name</view>
                        <image src="@/static/radioed.png" mode=""></image>
                    <view class="item" v-for="item,i in deviceList" @click="deviceClick(item)">
                        <view class="name">{{ item.name }}</view>
                        <image v-if="activeDevice.id == item.id" src="@/static/radioed.png" mode=""></image>
                    </view>
                </view>
                <view class="sub_btn">
                    确定选择
                </view>
                <view class="sub_btn" @click="handleDevice">确定选择</view>
            </view>
        </u-popup>
    </view>
@@ -77,7 +73,9 @@
<script>
    import {
        uploadUrl
        uploadUrl,
        ywDevicePost,
        ywDeviceCreate
    } from '@/api'
    import dayjs from 'dayjs';
    export default {
@@ -86,16 +84,52 @@
                param: {status: 0},
                showUpload: false,
                showModal: false,
                dealFileList: [],
                fileList: [],
                
                searchValue: '',
                deviceList: [],
                activeDevice: {}
            };
        },
        onLoad() {
            this.getDevice()
        },
        methods: {
            getDevice(){
            onSubmit() {
                const { param, fileList } = this
                
                if(!param.deviceId) return this.showToast('请先选择要维护的设备')
                ywDeviceCreate({
                    ...param,
                    userId: uni.getStorageSync('userInfo').id,
                    dealDate: dayjs().format('YYYY-MM-DD HH:mm:ss'),
                    multifileList: fileList
                }).then(res => {
                    this.showToast('提交成功')
                    // uni.navigateBack()
                })
            },
            getDevice(){
                ywDevicePost({
                    capacity: 9999,
                    page: 1,
                    model: {
                        name: this.searchValue
                    }
                }).then(res => {
                    this.deviceList = res.data.records || []
                })
            },
            handleDevice() {
                const { activeDevice } = this
                if(!activeDevice.id) return this.showToast('请先选择设备')
                this.$set(this.param, 'deviceId', activeDevice.id)
                this.$set(this.param, 'deviceName', activeDevice.name)
                this.showModal = false
            },
            deviceClick(item) {
                this.activeDevice = item
                this.$forceUpdate()
            },
            statusChange(val){
                this.param.status = val
@@ -125,7 +159,7 @@
                            files: imgs,
                            name: 'file',
                            formData: {
                                folder: 'HIDDEN_DANGER_FILE'
                                folder: 'YW_DEVICE'
                            },
                            header: {
                                Dm_user_token: token
@@ -137,7 +171,7 @@
                                        i.type = 0;
                                        i.fileurl = i.imgaddr;
                                        i.fileurlFull = i.url;
                                        this.submitFileList.push(i);
                                        this.fileList.push(i);
                                    });
                                }
                            },
@@ -171,7 +205,7 @@
                            },
                            name: 'file',
                            formData: {
                                folder: 'HIDDEN_DANGER_FILE'
                                folder: 'YW_DEVICE'
                            },
                            success: uploadFileRes => {
                                let res = JSON.parse(uploadFileRes.data);
@@ -180,7 +214,7 @@
                                        i.type = 1;
                                        i.fileurl = i.imgaddr;
                                        i.fileurlFull = i.url;
                                        this.submitFileList.push(i);
                                        this.fileList.push(i);
                                    });
                                }
                            },
h5/pages/operation/record.vue
@@ -3,11 +3,11 @@
        <view class="head_wrap">
            <view class="search_wrap">
                <image class="mr12 search" src="@/static/home/ic_search@2x.png" mode="widthFix"></image>
                <input v-model="param.keyword" @confirm="getList()" type="text" placeholder="搜索设备名称/编号"
                <input v-model="param.deviceName" @confirm="getList()" type="text" placeholder="搜索设备名称/编号"
                    placeholder-class="placeholder9" />
            </view>
            <view class="name_wrap" @click="handleMem">
                <view class="name">{{ param.realname ? param.realname : '运维人' }}</view>
                <view class="name">{{ param.userName ? param.userName : '运维人' }}</view>
                <u-icon :name="showModal  ? 'arrow-right' : 'arrow-down'" color="#999999" size="12"></u-icon>
            </view>
        </view>
@@ -57,11 +57,20 @@
            this.getpeo()
            this.getList()
        },
        onReachBottom() {
            const {total,list} = this
            if (list.length < total) {
                this.page = this.page + 1
                this.getList()
            } else {
                this.showToast('暂无更多数据')
            }
        },
        mounted() {
            this.$eventBus.$on('memberSel', (option) => {
                this.$set(this.param, 'realname', option.realname)
                this.$set(this.param, 'memberId', option.id)
                this.$set(this.param, 'userName', option.realname)
                this.$set(this.param, 'userId', option.id)
                this.getList()
            })
            
@@ -79,7 +88,7 @@
                    capacity: 10,
                    model: param
                }).then(res => {
                    this.list = res.data.records || []
                    this.list = [...this.list, ...res.data.records]
                    this.total = res.data.total
                })
            },
@@ -93,8 +102,10 @@
                    this.columns = [res.data]
                })
            },
            confirm() {
                this.showModal = false
            confirm(e) {
                console.log(e);
                // this.showModal = false
                // this.$set(this.param, 'userName', )
            },
            itemClick(item) {
                uni.navigateTo({
h5/pages/polling/detail.vue
@@ -1,59 +1,124 @@
<template>
    <view class="main_app">
        <view class="head_bg"></view>
        <view class="info">
            <image v-if="true" class="icon" src="@/static/side/ic_dabiaoed.png" mode=""></image>
            <image v-else class="icon" src="@/static/side/ic_dabiao.png" mode=""></image>
        <view v-if="info.status || info.status == 0" class="head_bg" :style="{
            background: `linear-gradient(180deg, ${statusM[info.status].color} 0%, rgba(247, 247, 247, 0) 100%)`
        }"></view>
        <view class="info">
            <image v-if="info.status == 2" class="icon" src="@/static/side/ic_dabiaoed.png" mode=""></image>
            <image v-if="info.status == 3" class="icon" src="@/static/side/ic_dabiao.png" mode=""></image>
            <view class="head">
                <view class="name">巡检计划</view>
                <view class="status">待开始</view>
                <view class="name">{{ info.title }}</view>
                <view class="status" v-if="info.status || info.status == 0" :style="{color: statusM[info.status].color}">{{statusM[info.status].name}}</view>
            </view>
            <view class="line">
                <view class="la">任务日期:</view>
                <view class="val">2023-23-23</view>
                <view class="val" v-if="info.startDate && info.endDate">{{ info.startDate.slice(0, 11) }} 至
                    {{ info.endDate.slice(0, 11) }}</view>
            </view>
            <view class="line">
                <view class="la">执行时间:</view>
                <view class="val">2023-23-23</view>
                <view class="val" v-if="info.startDate && info.endDate">{{ info.startDate.slice(11,16) }} 至
                    {{ info.endDate.slice(11, 16) }}</view>
            </view>
            <view class="line">
                <view class="la">完成情况:</view>
                <view class="val">2023-23-23</view>
                <view class="val">{{info.finishNum}}/{{info.patrolNum}}</view>
            </view>
        </view>
        <view class="title">巡检点列表(1)</view>
        <view class="title">巡检点列表({{list.length}})</view>
        <view class="list">
            <view class="item" v-for="i in 10" @click="itemClick()">
            <view class="item" v-for="item in list" @click="itemClick(item)">
                <view class="icon"></view>
                <view class="content">
                    <view class="head">
                        <view>巡检点10</view>
                        <view class="status">待巡检</view>
                        <view>{{item.pointName}}</view>
                        <view class="status" :class="{ gray: item.status == 1 }">{{ item.status == 1 ? '已巡检' : '待巡检' }}</view>
                    </view>
                    <view class="desc">巡检内容最多展示两行,多的省略巡检内容最多展示两行,多的省略巡检内容最多展示两行,多的省略巡检内容最多展示两行,多的省略巡检内容最多展示两行,多的省略巡检内容最多展示两行,多的省略
                    </view>
                    <template v-if="item.status == 1">
                        <view class="line">
                            <view class="la">巡检结果:</view>
                            <view class="val" :class="{ red: item.dealStatus == 1 }">{{ item.dealStatus == 0 ? '正常' : '异常' }}</view>
                        </view>
                        <view class="line">
                            <view class="la">巡检时间:</view>
                            <view class="val">{{item.dealDate}}</view>
                        </view>
                    </template>
                    <view class="desc" v-else>{{item.content}}</view>
                </view>
            </view>
        </view>
        <view class="footer">
            <view class="sub_btn">扫码巡检</view>
        <view class="footer">
            <view class="sub_btn">扫码巡检</view>
        </view>
    </view>
</template>
<script>
    import {
        ywPatrolDetail,
        ywPatrolTaskRecord
    } from '@/api'
    export default {
        data() {
            return {
                id: '',
                info: {},
                list: [],
                statusM: [
                    { color: '#4593f7', name: '待开始' },
                    { color: '#73e09a', name: '进行中' },
                    { color: '#f1a93f', name: '已超期' },
                    { color: '#b9b9b9', name: '已处理' },
                ]
            };
        },
        onLoad(option) {
            this.id = option.id
            this.getDetail()
        },
        methods: {
            itemClick() {
                uni.navigateTo({
                    url: '/pages/polling/point'
                })
            }
        onShow() {
            this.getDetail()
        },
        methods: {
            itemClick(item) {
                uni.navigateTo({
                    url: '/pages/polling/point?id=' + item.id
                })
            },
            getDetail() {
                const {
                    id
                } = this
                ywPatrolDetail(id).then(res => {
                    this.info = res.data
                })
                ywPatrolTaskRecord({
                    capacity: 999,
                    page: 1,
                    model: {
                        taskId: id
                    }
                }).then(res => {
                    this.list = res.data.records
                })
            },
            async startScan() {
                  try {
                    const video = document.getElementById('video');
                    const stream = await navigator.mediaDevices.getUserMedia({ video: { facingMode: "environment" } });
                    video.srcObject = stream;
                    // 使用 QrScanner 解析
                    const qrScanner = new QrScanner(video, result => {
                      alert(`扫描结果: ${result}`);
                      qrScanner.stop(); // 停止扫码
                    });
                    qrScanner.start();
                  } catch (err) {
                    console.error('打开摄像头失败:', err);
                  }
                }
        }
    }
</script>
@@ -67,7 +132,7 @@
        padding: 30rpx;
        .head_bg {
            background: linear-gradient(180deg, #008BFF 0%, rgba(247, 247, 247, 0) 100%);
            // background: linear-gradient(180deg, #008BFF 0%, rgba(247, 247, 247, 0) 100%);
            height: 240rpx;
            width: 750rpx;
            position: absolute;
@@ -83,14 +148,16 @@
            padding: 30rpx 30rpx 10rpx;
            margin-bottom: 40rpx;
            background: linear-gradient(#FFFFFF 0%, #FFFFFF 48%, #F0F5FF 100%);
            position: relative;
            .icon{
                position: absolute;
                right: 30rpx;
                bottom: 30rpx;
                width: 160rpx;
                height: 122rpx;
            position: relative;
            .icon {
                position: absolute;
                right: 30rpx;
                bottom: 30rpx;
                width: 160rpx;
                height: 122rpx;
            }
            .head {
                display: flex;
                justify-content: space-between;
@@ -103,17 +170,12 @@
                .status {
                    color: $primaryColor;
                }
                .gray{
                    color: gray;
                }
            }
            .line {
                display: flex;
                margin-bottom: 20rpx;
                .la {
                    color: #666666;
                }
            }
        }
        .title {
@@ -123,9 +185,19 @@
            margin-bottom: 30rpx;
        }
        .list {
            height: calc( 100vh - 720rpx ) ;
        .line {
            display: flex;
            margin-bottom: 20rpx;
            .la {
                color: #666666;
            }
        }
        .list {
            height: calc(100vh - 720rpx);
            overflow: auto;
            .item {
                width: 690rpx;
                height: 188rpx;
@@ -136,7 +208,9 @@
                display: flex;
                padding: 20rpx 30rpx 0 16rpx;
                margin-bottom: 20rpx;
                .line{
                    margin-bottom: 10rpx;
                }
                .icon {
                    width: 10rpx;
                    height: 148rpx;
@@ -160,6 +234,9 @@
                            offset-anchor: 28rpx;
                            color: $primaryColor;
                            font-weight: 400;
                        }
                        .gray{
                            color: #999999;
                        }
                    }
@@ -176,29 +253,31 @@
                }
            }
        }
        .footer{
            position: fixed;
            bottom: 0rpx;
            left: 0rpx;
            width: 750rpx;
            height: 172rpx;
            background-color: #fff;
            padding: 20rpx 40rpx;
            .sub_btn {
                width: 670rpx;
                height: 88rpx;
                background: $primaryColor;
                box-shadow: 0rpx 8rpx 20rpx 0rpx rgba(0, 104, 255, 0.3);
                border-radius: 44rpx;
                display: flex;
                align-items: center;
                justify-content: center;
                font-weight: 500;
                font-size: 32rpx;
                color: #FFFFFF;
            }
        .footer {
            position: fixed;
            bottom: 0rpx;
            left: 0rpx;
            width: 750rpx;
            height: 172rpx;
            background-color: #fff;
            padding: 20rpx 40rpx;
            .sub_btn {
                width: 670rpx;
                height: 88rpx;
                background: $primaryColor;
                box-shadow: 0rpx 8rpx 20rpx 0rpx rgba(0, 104, 255, 0.3);
                border-radius: 44rpx;
                display: flex;
                align-items: center;
                justify-content: center;
                font-weight: 500;
                font-size: 32rpx;
                color: #FFFFFF;
            }
        }
    }
</style>
h5/pages/polling/point.vue
@@ -2,45 +2,51 @@
    <view class="main_app">
        <view class="info">
            <view class="head">
                <view class="">巡检点</view>
                <view class="status">已巡检</view>
                <view class="">{{ info.pointName }}</view>
                <view class="status" :class="{primaryColor: info.status == 0}">{{ info.status == 1 ? '已巡检' : '待巡检' }}</view>
            </view>
            <template v-if="false">
            <template v-if="info.status == 1">
                <view class="line">
                    <div class="la">巡检结果:</div>
                    <div class="val">正常</div>
                    <div class="val primaryColor" :class="{red: info.dealStatus == 1}">{{ info.dealStatus == 0 ? '正常' : '异常' }}</div>
                </view>
                <view class="line">
                    <div class="la">巡检时间:</div>
                    <div class="val">2022</div>
                    <div class="val">{{ info.dealDate }}</div>
                </view>
            </template>
            <template v-else>
                <view class="desc">
                    巡检内容
                    {{ info.content }}
                </view>
            </template>
        </view>
        <!--  -->
        <view v-if="false" class="content">
            <view class="title">巡检记录</view>
            <view class="desc">已经更换灯泡</view>
        <view v-if="info.status == 1" class="content">
            <view class="title">巡检记录</view>
            <view class="files">
                <view class="adduser_list_item_ipt1_upload" v-for="(item, i) in info.multifileList" :key="i">
                    <image v-if="item.type == 0" :src="item.fileurlFull" mode="widthFix"></image>
                    <video v-if="item.type == 1" :src="item.fileurlFull" :controls="false"></video>
                </view>
            </view>
            <view class="desc">{{ info.dealInfo }}</view>
            <view class="line line_s">
                <view class="la">巡检人:</view>
                <view class="val">xxx</view>
                <view class="val">{{ info.realname }}</view>
            </view>
            <view class="line line_s">
                <view class="la">巡检时间:</view>
                <view class="val">xxx</view>
                <view class="val">{{ info.dealDate }}</view>
            </view>
        </view>
        <view v-else class="content">
            <view class="title">巡检处理</view>
            <view class="appr_modal">
                <view class="df_sb">
                    <view>处理时间</view>
                    <view class="df_ac" @click="isShowHandleDate = true" v-if="handleParam.dealTime">
                        {{ handleParam.dealTime }}
                    <view><text class="red">*</text>处理时间</view>
                    <view class="df_ac" @click="isShowHandleDate = true" v-if="handleParam.dealDate">
                        {{ handleParam.dealDate }}
                        <u-icon name="arrow-right"></u-icon>
                    </view>
                    <view @click="isShowHandleDate = true" v-else class="placeholder9 df_ac">
@@ -50,7 +56,6 @@
                </view>
                <view class="label">
                    <text>*</text>
                    上传图片/视频
                </view>
                <view class="upload_wrap">
@@ -58,19 +63,19 @@
                        <u-icon name="plus" color="rgb(153, 153, 153)" size="28"></u-icon>
                        <view class="mt6">图片/视频</view>
                    </view>
                    <view class="adduser_list_item_ipt1_upload" v-for="(item, i) in dealFileList" :key="i">
                    <view class="adduser_list_item_ipt1_upload" v-for="(item, i) in fileList" :key="i">
                        <u-icon class="close" size="20" name="close-circle-fill" color="red"
                            @click="fileDel('dealBeforeFileList', i)"></u-icon>
                            @click="fileDel('fileList', i)"></u-icon>
                        <image v-if="item.type == 0" :src="item.fileurlFull" mode="widthFix"></image>
                        <video v-if="item.type == 1" :src="item.fileurlFull" :controls="false"></video>
                    </view>
                </view>
                <view class="label">处理说明</view>
                <textarea v-model="handleParam.checkInfo" placeholder="请填写处理说明" placeholder-class="placeholder9" />
                <textarea v-model="handleParam.dealInfo" placeholder="请填写处理说明" placeholder-class="placeholder9" />
            </view>
        </view>
        <view class="sub_btn">确认巡检</view>
        <view class="sub_btn" @click="onSubmit">确认巡检</view>
        <!--  -->
        <u-popup :show="showUpload" @close="showUpload = false" closeOnClickOverlay>
            <view class="sel_upload_wrap">
@@ -86,22 +91,47 @@
<script>
    import {
        uploadUrl
        uploadUrl,
        ywPatrolPointDetail,
        patrolData
    } from '@/api'
    import dayjs from 'dayjs';
    export default {
        data() {
            return {
            return {
                id: '',
                info: {},
                showUpload: false,
                isShowHandle: false,
                isShowHandleDate: false,
                handleParam: {},
                dealFileList: []
                handleParam: {
                    dealStatus: 1
                },
                fileList: []
            };
        },
        onLoad(option) {
            this.id = option.id
            this.getDetail()
            this.$set(this.handleParam, 'dealDate', dayjs().format('YYYY-MM-DD HH:mm:ss'))
        },
        methods: {
            onSubmit() {
            onSubmit() {
                const { handleParam, fileList, id } = this
                patrolData({
                    ...handleParam,
                    multifileList: fileList,
                    id,
                }).then(res => {
                    this.showToast('操作成功')
                    uni.navigateBack()
                })
            },
            getDetail(){
                const { id } = this
                ywPatrolPointDetail(id).then(res => {
                    this.info  = res.data
                })
            },
            callPhone() {
                uni.makePhoneCall({
@@ -109,7 +139,7 @@
                });
            },
            confirmHandleDate(e) {
                this.$set(this.handleParam, 'dealTime', dayjs(e.value).format('YYYY-MM-DD HH:mm:ss'));
                this.$set(this.handleParam, 'dealDate', dayjs(e.value).format('YYYY-MM-DD HH:mm:ss'));
                this.isShowHandleDate = false;
            },
            fileDel(str, i) {
@@ -137,7 +167,7 @@
                            files: imgs,
                            name: 'file',
                            formData: {
                                folder: 'HIDDEN_DANGER_FILE'
                                folder: 'YW_PATROL'
                            },
                            header: {
                                Dm_user_token: token
@@ -149,7 +179,7 @@
                                        i.type = 0;
                                        i.fileurl = i.imgaddr;
                                        i.fileurlFull = i.url;
                                        this.submitFileList.push(i);
                                        this.fileList.push(i);
                                    });
                                }
                            },
@@ -183,7 +213,7 @@
                            },
                            name: 'file',
                            formData: {
                                folder: 'HIDDEN_DANGER_FILE'
                                folder: 'YW_PATROL'
                            },
                            success: uploadFileRes => {
                                let res = JSON.parse(uploadFileRes.data);
@@ -192,7 +222,7 @@
                                        i.type = 1;
                                        i.fileurl = i.imgaddr;
                                        i.fileurlFull = i.url;
                                        this.submitFileList.push(i);
                                        this.fileList.push(i);
                                    });
                                }
                            },
@@ -342,37 +372,41 @@
            margin-bottom: 30rpx;
        }
        .adduser_list_item_ipt1_upload {
            margin-top: 24rpx;
            width: 156rpx;
            height: 156rpx;
            margin-right: 24rpx;
            border: 2rpx solid #e5e5e5;
            background: #f7f7f7;
            color: #666666;
            font-size: 22rpx;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            position: relative;
            .close {
                position: absolute;
                right: -20rpx;
                top: -20rpx;
                z-index: 9999;
            }
            image {
                width: 100%;
                height: 100%;
            }
            video {
                width: 100%;
                height: 100%;
            }
        }
    }
    .files{
        display: flex;
        margin-bottom: 20rpx;
    }
    .adduser_list_item_ipt1_upload {
        margin-top: 24rpx;
        width: 156rpx;
        height: 156rpx;
        margin-right: 24rpx;
        border: 2rpx solid #e5e5e5;
        background: #f7f7f7;
        color: #666666;
        font-size: 22rpx;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        position: relative;
        .close {
            position: absolute;
            right: -20rpx;
            top: -20rpx;
            z-index: 9999;
        }
        image {
            width: 100%;
            height: 100%;
        }
        video {
            width: 100%;
            height: 100%;
        }
    }
</style>
h5/pages/polling/task.vue
@@ -8,11 +8,11 @@
        </view> -->
        <!--  -->
        <view class="tabs">
            <view class="tab" :class="{active: activeTab == 0}" @click="tabsClick(0)">
            <view class="tab" :class="{active: param.status == 0}" @click="tabsClick(0)">
                <text>待处理</text>
                <text class="border"></text>
            </view>
            <view class="tab" :class="{active: activeTab == 1}" @click="tabsClick(1)">
            <view class="tab" :class="{active: param.status == 3}" @click="tabsClick(3)">
                <text>已处理</text>
                <text class="border"></text>
            </view>
@@ -27,18 +27,22 @@
        </view>
        <!--  -->
        <view class="list">
            <view class="item" v-for="item in 10" @click="itemClick(item)">
                <image v-if="item.stats == 1" src="@/static/side/xunjianed.png" class="icon"></image>
            <view class="item" v-for="item in list" @click="itemClick(item)">
                <image v-if="item.status == 0 || item.status == 1" src="@/static/side/xunjianed.png" class="icon"></image>
                <image v-else src="@/static/side/xunjian.png" class="icon"></image>
                <view class="content">
                    <view class="name_wrap line">
                        <view class="name">巡检酒啊</view>
                        <view class="status">待开始</view>
                        <view class="name">{{item.planTitle}}</view>
                        <view class="status" :class="{
                            green: item.status == 1,
                            red: item.status == 2,
                            gray: item.status == 3 || item.status == 4
                        }">{{statusM[item.status]}}</view>
                    </view>
                    <view class="line">任务日期:xxx</view>
                    <view class="line">执行时间:121212</view>
                    <view class="line" v-if="item.startDate && item.endDate">任务日期:{{ item.startDate.slice(0, 11) }} 至 {{ item.endDate.slice(0, 11) }}</view>
                    <view class="line">执行时间:{{ item.startDate.slice(11, 16) }} - {{ item.endDate.slice(11, 16) }}</view>
                    <view class="line">
                        <view>完成情况:121212</view>
                        <view>完成情况:{{item.finishNum}}/{{item.patrolNum}}</view>
                        <view class="btn">
                            <image src="@/static/side/ic_saoma@2x.png" class="saoma" mode=""></image>
                            <view>扫码巡检</view>
@@ -51,29 +55,68 @@
    </view>
</template>
<script>
<script>
    import { ywPatrolTaskPost } from '@/api'
    export default {
        data() {
            return {
                param: {},
                param: {
                    status: 0
                },
                list: [],
                activeTab: 0,
                selectAll: false
                selectAll: false,
                page: 1,
                statusM: {
                    0: '待开始',
                    1: '进行中',
                    2: '已超期',
                    3: '已完成',
                    4: '已取消',
                }
            };
        },
        onLoad() {
            this.getList()
        },
        onReachBottom() {
            const {total,list} = this
            if (list.length < total) {
                this.page = this.page + 1
                this.getList()
            } else {
                this.showToast('暂无更多数据')
            }
        },
        methods: {
            tabsClick(val) {
                this.activeTab = val
                this.param.status = val
                this.page = 1
                this.list = []
                this.getList()
            },
            allClick() {
                this.selectAll = !this.selectAll
                this.list = []
                this.page = 1
                this.getList()
            },
            itemClick() {
            itemClick(item) {
                uni.navigateTo({
                    url: '/pages/polling/detail'
                    url: '/pages/polling/detail?id=' + item.id
                })
            },
            getList() {
                console.log('---');
                const { page, param, selectAll } = this
                ywPatrolTaskPost({
                    model: {...param, dispatchUserId: selectAll ? '' : uni.getStorageSync('userInfo').id, },
                    page,
                    capacity: 10
                }).then(res => {
                    this.list = [...this.list, ...res.data.records]
                    this.total = res.data.total
                })
            }
        }
    }
@@ -206,6 +249,12 @@
                    .status{
                        color: $primaryColor;
                    }
                    .green{
                        color: #0ADE79;
                    }
                    .gray{
                        color: #999999;
                    }
                }
            }
        }
h5/pages/workOrder/detail.vue
@@ -100,7 +100,7 @@
                    </view>
                    <view class="adduser_list_item_ipt1_upload" v-for="(item, i) in dealFileList" :key="i">
                        <u-icon class="close" size="20" name="close-circle-fill" color="red"
                            @click="fileDel('dealBeforeFileList', i)"></u-icon>
                            @click="fileDel('dealFileList', i)"></u-icon>
                        <image v-if="item.type == 0" :src="item.fileurlFull" mode="widthFix"></image>
                        <video v-if="item.type == 1" :src="item.fileurlFull" :controls="false"></video>
                    </view>
h5/pages/workOrder/edit.vue
@@ -38,7 +38,7 @@
                    </view>
                    <view class="upload_file" v-for="(item, i) in fileList" :key="i">
                        <u-icon class="close" size="20" name="close-circle-fill" color="red"
                            @click="fileDel('dealBeforeFileList', i)"></u-icon>
                            @click="fileDel('fileList', i)"></u-icon>
                        <image v-if="item.type == 0" :src="item.fileurlFull" mode="widthFix"></image>
                        <video v-if="item.type == 1" :src="item.fileurlFull" :controls="false"></video>
                    </view>
h5/pages/workOrder/list.vue
@@ -3,43 +3,44 @@
        <view class="head_wrap">
            <view class="search_wrap">
                <image class="mr12 search" src="@/static/home/ic_search@2x.png" mode="widthFix"></image>
                <input v-model="param.keyword" @confirm="getList()" type="text" placeholder="搜索楼宇/房间名称" placeholder-class="placeholder9" />
                <input v-model="param.roomName" @confirm="handleQuery" type="text" placeholder="搜索楼宇/房间名称"
                    placeholder-class="placeholder9" />
            </view>
        </view>
        <!--  -->
        <view class="tabs">
            <view class="tab" :class="{active: activeTab == -1}" @click="tabsClick(-1)">
                <text>待处理</text>
                <text class="border"></text>
            </view>
            <view class="tab" :class="{active: activeTab == 2}" @click="tabsClick(2)">
                <text>已处理</text>
                <text class="border"></text>
            </view>
            <view class="tab" @click="allClick">
                <view class="name">
                    <image v-if="selectAll" class="icon" src="@/static/checked.png" mode=""></image>
                    <image v-else class="icon" src="@/static/check.png" mode=""></image>
                    <text>查看全部</text>
                </view>
                <text class="border"></text>
            </view>
        </view>
        <!--  -->
        <view class="tabs">
            <view class="tab" :class="{active: activeTab == -1}" @click="tabsClick(-1)">
                <text>待处理</text>
                <text class="border"></text>
            </view>
            <view class="tab" :class="{active: activeTab == 2}" @click="tabsClick(2)">
                <text>已处理</text>
                <text class="border"></text>
            </view>
            <view class="tab" @click="allClick">
                <view class="name">
                    <image v-if="selectAll" class="icon" src="@/static/checked.png" mode=""></image>
                    <image v-else class="icon" src="@/static/check.png" mode=""></image>
                    <text>查看全部</text>
                </view>
                <text class="border"></text>
            </view>
        </view>
        <!--  -->
        <view class="list">
            <view class="item" v-for="item in list" @click="itemClick(item)">
                <image v-if="item.stats == 1" src="@/static/side/workordered.png" class="icon"></image>
                <image v-if="item.dealStatus == 0" src="@/static/side/workordered.png" class="icon"></image>
                <image v-else src="@/static/side/workorder.png" class="icon"></image>
                <view class="content">
                    <view class="name_wrap line">
                        <view class="name">{{item.buildingName}}/{{item.roomNum}}</view>
                        <view class="status gray" v-if="item.dealStatus == 2">已处理</view>
                        <view class="status" v-if="item.dealStatus == 0">待处理</view>
                        <view class="name">{{item.buildingName}}/{{item.roomNum || item.floorName}}</view>
                        <view class="status gray" v-if="item.dealStatus == 2">已处理</view>
                        <view class="status" v-if="item.dealStatus == 0">待处理</view>
                        <view class="status" v-if="item.dealStatus == 1">待处理</view>
                    </view>
                    <view class="line">位置类型:{{item.areaType == '0' ? '室内装修' : '公共区域'}}</view>
                    <view class="line">工单分类:{{item.categoryName}}</view>
                    <view class="line">上报时间:{{item.createDate}}</view>
                    <view class="line">位置类型:{{item.areaType == '0' ? '室内装修' : '公共区域'}}</view>
                    <view class="line">工单分类:{{item.categoryName}}</view>
                    <view class="line">上报时间:{{item.createDate}}</view>
                    <view class="line">上门时间:{{item.getDate}}</view>
                </view>
            </view>
@@ -48,101 +49,136 @@
    </view>
</template>
<script>
    import { ywWorkorder } from '@/api'
<script>
    import {
        ywWorkorder
    } from '@/api'
    export default {
        data() {
            return {
                param: {},
                activeTab: -1,
                selectAll: false,
                list: [],
                total: 0,
                param: {},
                activeTab: -1,
                selectAll: false,
                list: [],
                total: 0,
                page: 1,
            };
        },
        onShow() {
            this.getList()
        },
        onReachBottom() {
        },
        onShow() {
            this.getList()
        },
        onReachBottom() {
            const {total,list} = this
            if (list.length < total) {
                this.page = this.page + 1
                this.getList()
            } else {
                this.showToast('暂无更多数据')
            }
        },
        methods: {
            tabsClick(val) {
                this.activeTab = val
            tabsClick(val) {
                this.activeTab = val
                this.list = []
                this.page = 1
                this, getList()
            },
            allClick() {
                this.selectAll = !this.selectAll
                this.list = []
                this.page = 1
                this.getList()
            },
            itemClick(item) {
                uni.navigateTo({
                    url: `/pages/workOrder/detail?id=${item.id}`
                })
            },
            handleQuery() {
                this.list = []
                this.page = 1
                this,getList()
            },
            allClick() {
                this.selectAll = !this.selectAll
            },
            itemClick(item) {
                uni.navigateTo({
                    url: `/pages/workOrder/detail?id=${item.id}`
                })
            },
            getList() {
                const { page, total, list, activeTab } = this
                ywWorkorder({
                    page,
                    capacity: 10,
                    model: {  }
                }).then(res => {
                    this.list = res.data.records || []
                })
                this.getList()
            },
            getList() {
                const {
                    page,
                    total,
                    list,
                    activeTab,
                    param,
                    selectAll
                } = this
                ywWorkorder({
                    page,
                    capacity: 10,
                    model: {
                        ...param,
                        dispatchUserId: selectAll ? '' : uni.getStorageSync('userInfo').id,
                    }
                }).then(res => {
                    this.list = [...this.list, ...res.data.records]
                    this.total = res.data.total
                })
            }
        }
    }
</script>
<style lang="scss" scoped>
    .main_app{
        padding: 0 30rpx;
    }
    .tabs{
        display: flex;
        width: 750rpx;
        margin: 12rpx -30rpx 0;
        border-bottom: 1rpx solid #E5E5E5;
        .tab{
            font-size: 30rpx;
            color: #666666;
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: flex-end;
            height: 88rpx;
            .name{
                display: flex;
                align-items: center;
            }
            .icon{
                width: 28rpx;
                height: 28rpx;
                margin-right: 10rpx;
            }
            .border{
                width: 54rpx;
                height: 6rpx;
                background-color: #fff;
                border-radius: 3rpx;
                margin-top: 24rpx;
            }
        }
        .active{
            font-weight: 600;
            font-size: 32rpx;
            color: #222222;
            .border{
                background-color: $primaryColor;
            }
        }
<style lang="scss" scoped>
    .main_app {
        padding: 0 30rpx;
    }
    .tabs {
        display: flex;
        width: 750rpx;
        margin: 12rpx -30rpx 0;
        border-bottom: 1rpx solid #E5E5E5;
        .tab {
            font-size: 30rpx;
            color: #666666;
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: flex-end;
            height: 88rpx;
            .name {
                display: flex;
                align-items: center;
            }
            .icon {
                width: 28rpx;
                height: 28rpx;
                margin-right: 10rpx;
            }
            .border {
                width: 54rpx;
                height: 6rpx;
                background-color: #fff;
                border-radius: 3rpx;
                margin-top: 24rpx;
            }
        }
        .active {
            font-weight: 600;
            font-size: 32rpx;
            color: #222222;
            .border {
                background-color: $primaryColor;
            }
        }
    }
    .head_wrap {
        display: flex;
        align-items: center;
@@ -155,9 +191,11 @@
            background: #F7F7F7;
            border-radius: 38rpx;
            padding-left: 30rpx;
            input{
                flex: 1;
            input {
                flex: 1;
            }
            .search {
                width: 28rpx;
                height: 28rpx;
@@ -169,44 +207,51 @@
    .list {
        .item {
            display: flex;
            // height: 290rpx;
            padding: 30rpx 0;
            // height: 290rpx;
            padding: 30rpx 0;
            border-bottom: 2rpx solid #E5E5E5;
            .icon {
                width: 80rpx;
                height: 80rpx;
                height: 80rpx;
                margin-right: 24rpx;
            }
            .content {
                flex: 1;
                color: #666666;
                display: flex;
                flex-direction: column;
                justify-content: space-between;
                .line{
                    margin-bottom: 20rpx;
                    &:nth-last-child(1){
                        margin-bottom: 0;
                    }
                }
                .name_wrap{
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    .name{
                        display: flex;
                        align-items: flex-end;
                        font-weight: 600;
                        font-size: 34rpx;
                        color: #222222;
                    }
                    .status{
                        color: $primaryColor;
                    }
                    .gray{
                        color: #999999;
                    }
                flex: 1;
                color: #666666;
                display: flex;
                flex-direction: column;
                justify-content: space-between;
                .line {
                    margin-bottom: 20rpx;
                    &:nth-last-child(1) {
                        margin-bottom: 0;
                    }
                }
                .name_wrap {
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    .name {
                        display: flex;
                        align-items: flex-end;
                        font-weight: 600;
                        font-size: 34rpx;
                        color: #222222;
                    }
                    .status {
                        color: $primaryColor;
                    }
                    .gray {
                        color: #999999;
                    }
                }
            }
        }