renkang
2024-12-09 99312c0d79044c16bb783cb967dbd4ff60a383bd
Merge remote-tracking branch 'origin/master'
已修改12个文件
170 ■■■■ 文件已修改
admin/.env 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/api/yw.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/manifest.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/login.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/operation/detail.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/operation/device.vue 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/operation/record.vue 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/polling/detail.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/polling/task.vue 75 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/workOrder/detail.vue 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/pages/workOrder/list.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5/utils/config.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/.env
@@ -3,8 +3,8 @@
# 路由方式
VUE_APP_ROUTER_MODE = 'hash'
# 项目上下文路径 fn_admin/#/
VUE_APP_CONTEXT_PATH = '/'
# 项目上下文路径
VUE_APP_CONTEXT_PATH = '/fn_admin'
# 接口前缀
VUE_APP_API_PREFIX = '/gateway_interface'
h5/api/yw.js
@@ -127,4 +127,11 @@
    url: 'visitsAdmin/cloudService/business/category/page',
    data
  })
}
//
export const getPointRecordByCode = (data) => {
  return http({
    url: 'visitsAdmin/cloudService/business/ywPatrolTaskRecord/getPointRecordByCode',
    data
  })
}
h5/manifest.json
@@ -129,9 +129,9 @@
                "/gateway_interface" : {
                    // 这个字段名需与你配置的basePrefixUrl一致,系统识别到带有/dev-api请求的地址时,会在前面拼接上代理服务器地址
                    // "target" : "http://172.20.10.7:10010", // 代理服务器域名或IP地址
                    "target" : "http://192.168.0.163:10010", // 代理服务器域名或IP地址
                    // "target" : "http://192.168.0.163:10010", // 代理服务器域名或IP地址
                    // "target" : "http://10.50.250.253:8088/gateway_interface", // 代理服务器域名或IP地址
                    // "target" : "http://192.168.0.173/gateway_interface", // 代理服务器域名或IP地址
                    "target" : "https://zhcg.fnwtzx.com/gateway_interface", // 代理服务器域名或IP地址
                    "changeOrigin" : true, // 允许跨域 
                    "pathRewrite" : {
                        "^/gateway_interface" : ""
h5/pages/login.vue
@@ -45,8 +45,8 @@
                    code: ''
                },
                downTime: 0,
                // code: '011dfEkl2PzcFe4ZxSnl22NKXz4dfEkQ'
                code: ''
                code: '111'
                // code: ''
            }
        },
@@ -66,7 +66,8 @@
                ywWxAuthorize({
                    code: code || this.code
                }).then(res => {
                    if (res.code === 200) {
                    if (res.code === 200) {
                        console.log('res', res);
                        that.$store.commit('setOpenId', res.data.openid)
                        if (res.data.token && res.data.token != '') {
                            that.$store.commit('setToken', res.data.token)
h5/pages/operation/detail.vue
@@ -2,7 +2,7 @@
    <view>
        <view class="content">
            <view class="name_wrap">
                <view class="name">{{info.deviceName}}</view>
                <view class="name">{{info.deviceName}} {{info.deviceCode || ''}}</view>
                <view class="status" v-if="info.status == 0">正常</view>
                <view class="status red" v-if="info.status == 1">损坏</view>
                <view class="status red" v-if="info.status == 2">报废</view>
@@ -15,7 +15,7 @@
            <view class="title">运维备注</view>
            <view class="file_list">
                <view class="file" v-for="item in info.multifileList">
                    <image v-if="item.type == 0" :src="item.fileurlFull" mode="widthFix"></image>
                    <image v-if="item.type == 0" :src="item.fileurlFull" mode="aspectFill"></image>
                    <video v-if="item.type == 1" :src="item.fileurlFull" :controls="false"></video>
                </view>
            </view>
@@ -99,6 +99,7 @@
            }
            image,video{
                width: 156rpx;
                height: 156rpx;
            }
        }
        .desc{
h5/pages/operation/device.vue
@@ -6,7 +6,7 @@
                <view class="line">
                    <view class="sel_wrap" @click="showModal = true">
                        <view class="left" :class="(param.deviceName || param.deviceCode) ? '' : 'placeholder9'">
                            {{ (param.deviceName || param.deviceCode) ? `[${param.deviceCode}] ` + param.deviceName : '请选择设备' }}
                            {{ (param.deviceName || param.deviceCode) ? param.deviceName ? `[${param.deviceCode}] ` + param.deviceName : `[${param.deviceCode}]` : '请选择设备' }}
                        </view>
                        <u-icon name="arrow-right" color="#999999" size="17"></u-icon>
                    </view>
@@ -118,6 +118,25 @@
                } = this
                if (!param.deviceId) return this.showToast('请先选择要维护的设备')
                if (param.status != 0) {
                    uni.showModal({
                        title: '温馨提示',
                        content: '设备运维结果异常,是否前往提交工单?',
                        success: function(res) {
                            if (res.confirm) {
                                this.handleP()
                            } else if (res.cancel) {}
                        }
                    });
                }else{
                    this.handleP()
                }
            },
            handleP() {
                const {
                    param,
                    fileList
                } = this
                ywDeviceCreate({
                    ...param,
                    userId: uni.getStorageSync('userInfo').id,
@@ -144,7 +163,7 @@
                    activeDevice
                } = this
                if (!activeDevice.id) return this.showToast('请先选择设备')
                this.$set(this.param, 'deviceId', activeDevice.id)
                this.$set(this.param, 'deviceId', activeDevice.id)
                this.$set(this.param, 'deviceCode', activeDevice.code)
                this.$set(this.param, 'deviceName', activeDevice.name)
                this.showModal = false
@@ -413,7 +432,7 @@
        // bottom: 68rpx;
        // left: 40rpx;
        width: 670rpx;
        height: 88rpx;
        height: 88rpx;
        margin-top: 80rpx;
        background: $primaryColor;
        box-shadow: 0rpx 8rpx 20rpx 0rpx rgba(0, 104, 255, 0.3);
@@ -458,8 +477,9 @@
        }
        .modal_list {
            height: calc(100% - 360rpx);
            height: calc(100% - 360rpx);
            margin-bottom: -20rpx;
            .item {
                display: flex;
                align-items: center;
h5/pages/operation/record.vue
@@ -3,7 +3,7 @@
        <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.deviceName" @confirm="getList()" type="text" placeholder="搜索设备名称/编号"
                <input v-model="param.deviceName" @confirm="queryList" type="text" placeholder="搜索设备名称/编号"
                    placeholder-class="placeholder9" />
            </view>
            <view class="name_wrap" @click="handleMem">
@@ -75,7 +75,12 @@
            })
            
        },
        methods: {
        methods: {
            queryList() {
                this.page = 1
                this.list = []
                this.getList()
            },
            getList() {
                const {
                    page,
h5/pages/polling/detail.vue
@@ -78,9 +78,9 @@
            this.id = option.id
            this.getDetail()
        },
        onShow() {
            this.getDetail()
        },
        // onShow() {
        //     this.getDetail()
        // },
        methods: {
            itemClick(item) {
                if(!this.flag) return
@@ -94,7 +94,8 @@
                } = this
                ywPatrolDetail(id).then(res => {
                    this.info = res.data
                    let time = new Date(res.data.startDate.slice(0, 10) + ' 00:00:00').getTime()
                    let time = new Date(res.data.startDate).getTime()
                    console.log('res.data.startDate', new Date().getTime());
                    this.flag = new Date().getTime() > time
                })
                ywPatrolTaskRecord({
h5/pages/polling/task.vue
@@ -28,23 +28,23 @@
        <!--  -->
        <scroll-view scroll-y="true" class="scroll_Y" @scrolltolower="scrolltolower">
            <view class="list">
                <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="item" v-for="item in list">
                    <image @click="itemClick(item)" v-if="item.status == 0 || item.status == 1" src="@/static/side/xunjianed.png" class="icon"></image>
                    <image @click="itemClick(item)" v-else src="@/static/side/xunjian.png" class="icon"></image>
                    <view class="content">
                        <view class="name_wrap line">
                            <view class="name">{{item.planTitle}}</view>
                            <view class="status" :class="{
                            <view class="name" @click="itemClick(item)">{{item.planTitle}}</view>
                            <view class="status" @click="itemClick(item)" :class="{
                                green: item.status == 1,
                                red: item.status == 2,
                                gray: item.status == 3 || item.status == 4
                            }">{{statusM[item.status]}}</view>
                        </view>
                        <view class="line" v-if="item.startDate">任务日期:{{ item.startDate.slice(0, 11) }}</view>
                        <view class="line">执行时间:{{ item.startDate.slice(11, 16) }} 至 {{ item.endDate.slice(11, 16) }}</view>
                        <view class="line" @click="itemClick(item)" v-if="item.startDate">任务日期:{{ item.startDate.slice(0, 11) }}</view>
                        <view class="line" @click="itemClick(item)">执行时间:{{ item.startDate.slice(11, 16) }} 至 {{ item.endDate.slice(11, 16) }}</view>
                        <view class="line">
                            <view>完成情况:{{item.finishNum || 0}}/{{item.patrolNum}}</view>
                            <view class="btn">
                            <view @click="itemClick(item)">完成情况:{{item.finishNum || 0}}/{{item.patrolNum}}</view>
                            <view v-if="param.queryStatus == '0,1'" class="btn" @click="openSc(item)">
                                <image src="@/static/side/ic_saoma@2x.png" class="saoma" mode=""></image>
                                <view>扫码巡检</view>
                            </view>
@@ -54,14 +54,19 @@
            </view>
        </scroll-view>
        <!--  -->
        <!--  -->
    </view>
</template>
<script>
    import {
        ywPatrolTaskPost
    } from '@/api'
        ywPatrolTaskPost,
        getPointRecordByCode
    } from '@/api'
    import {
        Html5Qrcode
    } from 'html5-qrcode';
    export default {
        data() {
            return {
@@ -79,13 +84,57 @@
                    2: '已超期',
                    3: '已完成',
                    4: '已取消',
                }
                },
                html5Qrcode: null,
                isScaning: false,
                activeItem: {}
            };
        },
        onLoad() {
            this.getList()
        },
        methods: {
            openSc(item) {
                this.activeItem = item
                this.isScaning = true;
                Html5Qrcode.getCameras().then((devices) => {
                    if (devices && devices.length) {
                        this.html5Qrcode = new Html5Qrcode('reader');
                        this.html5Qrcode.start({
                                facingMode: 'environment'
                            }, {
                                focusMode: 'continuous', //设置连续聚焦模式
                                fps: 5, //设置扫码识别速度
                                qrbox: 280 //设置二维码扫描框大小
                            },
                            (decodeText, decodeResult) => {
                                if (decodeText) { //这里decodeText就是通过扫描二维码得到的内容
                                    this.stopScan(); //关闭扫码功能
                                    getPointRecordByCode({
                                        taskId: item.id,
                                        pointCode: decodeText
                                    }).then(ress=> {
                                        if(ress.data){
                                        }
                                    })
                                }
                            },
                            (err) => {
                                // console.log(err);  //错误信息
                            }
                        );
                    }
                });
            },
            stopScan() {
                console.log('停止扫码')
                this.isScaning = false;
                if (this.html5Qrcode) {
                    this.html5Qrcode.stop();
                }
            },
            scrolltolower() {
                const {
                    total,
h5/pages/workOrder/detail.vue
@@ -4,7 +4,7 @@
            <view class="title">
                <text>{{ info.projectName }}/{{ info.buildingName }}/{{info.roomNum || info.floorName}}</text>
                <text class="status" v-if="info.dealStatus == 0">待处理</text>
                <text class="status" v-if="info.dealStatus == 1">已指派</text>
                <text class="status" v-if="info.dealStatus == 1">待处理</text>
                <text class="status gray" v-if="info.dealStatus == 2">已处理</text>
            </view>
            <view class="desc">{{ info.content }}</view>
@@ -58,8 +58,8 @@
            </view>
        </view>
        <!--  -->
        <view class="btns" v-if="info.dealStatus == 0">
            <view class="btn">
        <view class="btns" v-if="info.dealStatus == 0 || (info.dealUserId === userInfo.id && info.dealStatus == 1)">
            <view class="btn" @click="handleCall">
                <image src="@/static/side/phoneed.png" class="icon"></image>
                <text>上报人</text>
            </view>
@@ -135,7 +135,8 @@
                info: {},
                showUpload: false,
                isShowHandle: false,
                isShowHandleDate: false,
                isShowHandleDate: false,
                userInfo: uni.getStorageSync('userInfo') || {},
                handleParam: {},
                dealFileList: []
            };
@@ -159,6 +160,12 @@
                        uni.navigateBack()
                    }
                })
            },
            handleCall() {
                const { info } = this
                uni.makePhoneCall({
                    phoneNumber: info.creatorMobile
                });
            },
            getDetail() {
                ywWorkorderD(this.id).then(res => {
h5/pages/workOrder/list.vue
@@ -73,7 +73,7 @@
                page: 1,
            };
        },
        onShow() {
        onLoad() {
            this.getList()
        },
        methods: {
h5/utils/config.js
@@ -1,7 +1,6 @@
// export const baseUrl = 'gateway_interface/'
 export const baseUrl = 'gateway_interface/'
// export const baseUrl = 'http://192.168.0.173/gateway_interface/'
export const baseUrl = 'https://zhcg.fnwtzx.com/gateway_interface/'
// export const baseUrl = 'https://zhcg.fnwtzx.com/gateway_interface/'
export const uploadAvatar = `${baseUrl}visitsAdmin/cloudService/web/public/uploadFtp.do`
export const uploadUrl = `${baseUrl}visitsAdmin/cloudService/public/uploadBatch`