| | |
| | | # 路由方式 |
| | | VUE_APP_ROUTER_MODE = 'hash' |
| | | |
| | | # 项目上下文路径 fn_admin/#/ |
| | | VUE_APP_CONTEXT_PATH = '/' |
| | | # 项目上下文路径 |
| | | VUE_APP_CONTEXT_PATH = '/fn_admin' |
| | | |
| | | # 接口前缀 |
| | | VUE_APP_API_PREFIX = '/gateway_interface' |
| | |
| | | url: 'visitsAdmin/cloudService/business/category/page', |
| | | data |
| | | }) |
| | | } |
| | | // |
| | | export const getPointRecordByCode = (data) => { |
| | | return http({ |
| | | url: 'visitsAdmin/cloudService/business/ywPatrolTaskRecord/getPointRecordByCode', |
| | | data |
| | | }) |
| | | } |
| | |
| | | "/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" : "" |
| | |
| | | code: ''
|
| | | },
|
| | | downTime: 0,
|
| | | // code: '011dfEkl2PzcFe4ZxSnl22NKXz4dfEkQ' |
| | | code: ''
|
| | | code: '111' |
| | | // code: ''
|
| | | }
|
| | | },
|
| | |
|
| | |
| | | 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)
|
| | |
| | | <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>
|
| | |
| | | <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> |
| | |
| | | } |
| | | image,video{ |
| | | width: 156rpx; |
| | | height: 156rpx; |
| | | } |
| | | } |
| | | .desc{ |
| | |
| | | <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>
|
| | |
| | | } = 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,
|
| | |
| | | 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
|
| | |
| | | // 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);
|
| | |
| | | }
|
| | |
|
| | | .modal_list {
|
| | | height: calc(100% - 360rpx); |
| | | height: calc(100% - 360rpx);
|
| | | margin-bottom: -20rpx;
|
| | |
|
| | | .item {
|
| | | display: flex;
|
| | | align-items: center;
|
| | |
| | | <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">
|
| | |
| | | }) |
| | |
|
| | | },
|
| | | methods: {
|
| | | methods: { |
| | | queryList() { |
| | | this.page = 1 |
| | | this.list = [] |
| | | this.getList() |
| | | },
|
| | | getList() {
|
| | | const {
|
| | | page,
|
| | |
| | | this.id = option.id
|
| | | this.getDetail()
|
| | | }, |
| | | onShow() { |
| | | this.getDetail() |
| | | },
|
| | | // onShow() { |
| | | // this.getDetail() |
| | | // },
|
| | | methods: {
|
| | | itemClick(item) { |
| | | if(!this.flag) return
|
| | |
| | | } = 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({
|
| | |
| | | <!-- -->
|
| | | <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>
|
| | |
| | | </view>
|
| | | </scroll-view>
|
| | |
|
| | | <!-- -->
|
| | | <!-- --> |
| | | |
| | | </view>
|
| | | </template>
|
| | |
|
| | | <script>
|
| | | import {
|
| | | ywPatrolTaskPost
|
| | | } from '@/api'
|
| | | ywPatrolTaskPost, |
| | | getPointRecordByCode
|
| | | } from '@/api' |
| | | import { |
| | | Html5Qrcode |
| | | } from 'html5-qrcode';
|
| | | export default {
|
| | | data() {
|
| | | return {
|
| | |
| | | 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, |
| | |
| | | <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>
|
| | |
| | | </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>
|
| | |
| | | info: {},
|
| | | showUpload: false,
|
| | | isShowHandle: false,
|
| | | isShowHandleDate: false,
|
| | | isShowHandleDate: false, |
| | | userInfo: uni.getStorageSync('userInfo') || {},
|
| | | handleParam: {},
|
| | | dealFileList: []
|
| | | };
|
| | |
| | | uni.navigateBack() |
| | | } |
| | | })
|
| | | }, |
| | | handleCall() { |
| | | const { info } = this |
| | | uni.makePhoneCall({ |
| | | phoneNumber: info.creatorMobile |
| | | }); |
| | | },
|
| | | getDetail() {
|
| | | ywWorkorderD(this.id).then(res => {
|
| | |
| | | page: 1,
|
| | | };
|
| | | },
|
| | | onShow() {
|
| | | onLoad() {
|
| | | this.getList()
|
| | | },
|
| | | methods: { |
| | |
| | | |
| | | // 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` |