| | |
| | | body{ |
| | | font-size: 28rpx; |
| | | } |
| | | .primaryColor { |
| | | color: $primaryColor !important; |
| | | } |
| | | .flex-cb { |
| | | display: flex; |
| | | justify-content: space-between; |
| | |
| | | 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 |
| | | }) |
| | | } |
| | |
| | | "/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, // 允许跨域 |
| | |
| | | <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>
|
| | |
| | | <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> |
| | |
| | | <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"> |
| | |
| | | <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>
|
| | |
| | |
|
| | | <script> |
| | | import { |
| | | uploadUrl |
| | | uploadUrl, |
| | | ywDevicePost, |
| | | ywDeviceCreate |
| | | } from '@/api' |
| | | import dayjs from 'dayjs';
|
| | | export default {
|
| | |
| | | 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 |
| | |
| | | files: imgs, |
| | | name: 'file', |
| | | formData: { |
| | | folder: 'HIDDEN_DANGER_FILE' |
| | | folder: 'YW_DEVICE' |
| | | }, |
| | | header: { |
| | | Dm_user_token: token |
| | |
| | | i.type = 0; |
| | | i.fileurl = i.imgaddr; |
| | | i.fileurlFull = i.url; |
| | | this.submitFileList.push(i); |
| | | this.fileList.push(i); |
| | | }); |
| | | } |
| | | }, |
| | |
| | | }, |
| | | name: 'file', |
| | | formData: { |
| | | folder: 'HIDDEN_DANGER_FILE' |
| | | folder: 'YW_DEVICE' |
| | | }, |
| | | success: uploadFileRes => { |
| | | let res = JSON.parse(uploadFileRes.data); |
| | |
| | | i.type = 1; |
| | | i.fileurl = i.imgaddr; |
| | | i.fileurlFull = i.url; |
| | | this.submitFileList.push(i); |
| | | this.fileList.push(i); |
| | | }); |
| | | } |
| | | }, |
| | |
| | | <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>
|
| | |
| | | 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()
|
| | | }) |
| | |
|
| | |
| | | capacity: 10,
|
| | | model: param
|
| | | }).then(res => {
|
| | | this.list = res.data.records || []
|
| | | this.list = [...this.list, ...res.data.records] |
| | | this.total = res.data.total
|
| | | })
|
| | | }, |
| | |
| | | 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({
|
| | |
| | | <template>
|
| | | <view class="main_app">
|
| | | <view class="head_bg"></view>
|
| | | <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="true" class="icon" src="@/static/side/ic_dabiaoed.png" mode=""></image> |
| | | <image v-else class="icon" src="@/static/side/ic_dabiao.png" mode=""></image>
|
| | | <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">巡检内容最多展示两行,多的省略巡检内容最多展示两行,多的省略巡检内容最多展示两行,多的省略巡检内容最多展示两行,多的省略巡检内容最多展示两行,多的省略巡检内容最多展示两行,多的省略
|
| | | <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>
|
| | |
| | | </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()
|
| | | }, |
| | | onShow() { |
| | | this.getDetail() |
| | | },
|
| | | methods: { |
| | | itemClick() { |
| | | itemClick(item) {
|
| | | uni.navigateTo({ |
| | | url: '/pages/polling/point' |
| | | 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); |
| | | } |
| | | } |
| | | }
|
| | | }
|
| | |
| | | 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;
|
| | |
| | | margin-bottom: 40rpx;
|
| | | background: linear-gradient(#FFFFFF 0%, #FFFFFF 48%, #F0F5FF 100%);
|
| | | position: relative; |
| | |
|
| | | .icon{ |
| | | position: absolute; |
| | | right: 30rpx; |
| | |
| | | width: 160rpx; |
| | | height: 122rpx; |
| | | }
|
| | |
|
| | | .head {
|
| | | display: flex;
|
| | | justify-content: space-between;
|
| | |
| | | .status {
|
| | | color: $primaryColor;
|
| | | }
|
| | | .gray{ |
| | | color: gray; |
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | .title {
|
| | | font-weight: 600;
|
| | | font-size: 32rpx;
|
| | | color: #222222;
|
| | | margin-bottom: 30rpx;
|
| | | }
|
| | |
|
| | | .line {
|
| | |
| | | color: #666666;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | .title {
|
| | | font-weight: 600;
|
| | | font-size: 32rpx;
|
| | | color: #222222;
|
| | | margin-bottom: 30rpx;
|
| | | }
|
| | |
|
| | | .list { |
| | | height: calc( 100vh - 720rpx ) ; |
| | | overflow: auto;
|
| | |
|
| | | .item {
|
| | | width: 690rpx;
|
| | | height: 188rpx;
|
| | |
| | | display: flex;
|
| | | padding: 20rpx 30rpx 0 16rpx;
|
| | | margin-bottom: 20rpx;
|
| | |
|
| | | .line{ |
| | | margin-bottom: 10rpx; |
| | | }
|
| | | .icon {
|
| | | width: 10rpx;
|
| | | height: 148rpx;
|
| | |
| | | color: $primaryColor;
|
| | | font-weight: 400;
|
| | | }
|
| | | .gray{ |
| | | color: #999999; |
| | | }
|
| | | }
|
| | |
|
| | | .desc {
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | .footer{ |
| | | position: fixed; |
| | | bottom: 0rpx; |
| | |
| | | height: 172rpx; |
| | | background-color: #fff; |
| | | padding: 20rpx 40rpx; |
| | |
|
| | | .sub_btn { |
| | | |
| | | width: 670rpx; |
| | |
| | | <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 v-if="info.status == 1" class="content">
|
| | | <view class="title">巡检记录</view>
|
| | | <view class="desc">已经更换灯泡</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">
|
| | |
| | | </view>
|
| | |
|
| | | <view class="label">
|
| | | <text>*</text>
|
| | | 上传图片/视频
|
| | | </view>
|
| | | <view class="upload_wrap">
|
| | |
| | | <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">
|
| | |
| | |
|
| | | <script>
|
| | | import {
|
| | | uploadUrl
|
| | | uploadUrl, |
| | | ywPatrolPointDetail, |
| | | patrolData
|
| | | } from '@/api'
|
| | | import dayjs from 'dayjs';
|
| | | export default {
|
| | | data() {
|
| | | 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() {
|
| | |
|
| | | 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({
|
| | |
| | | });
|
| | | },
|
| | | 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) {
|
| | |
| | | files: imgs,
|
| | | name: 'file',
|
| | | formData: {
|
| | | folder: 'HIDDEN_DANGER_FILE'
|
| | | folder: 'YW_PATROL'
|
| | | },
|
| | | header: {
|
| | | Dm_user_token: token
|
| | |
| | | i.type = 0;
|
| | | i.fileurl = i.imgaddr;
|
| | | i.fileurlFull = i.url;
|
| | | this.submitFileList.push(i);
|
| | | this.fileList.push(i);
|
| | | });
|
| | | }
|
| | | },
|
| | |
| | | },
|
| | | name: 'file',
|
| | | formData: {
|
| | | folder: 'HIDDEN_DANGER_FILE'
|
| | | folder: 'YW_PATROL'
|
| | | },
|
| | | success: uploadFileRes => {
|
| | | let res = JSON.parse(uploadFileRes.data);
|
| | |
| | | i.type = 1;
|
| | | i.fileurl = i.imgaddr;
|
| | | i.fileurlFull = i.url;
|
| | | this.submitFileList.push(i);
|
| | | this.fileList.push(i);
|
| | | });
|
| | | }
|
| | | },
|
| | |
| | | margin-bottom: 30rpx;
|
| | | }
|
| | |
|
| | | } |
| | | .files{ |
| | | display: flex; |
| | | margin-bottom: 20rpx; |
| | | } |
| | | .adduser_list_item_ipt1_upload {
|
| | | margin-top: 24rpx;
|
| | | width: 156rpx;
|
| | |
| | | video {
|
| | | width: 100%;
|
| | | height: 100%;
|
| | | }
|
| | | }
|
| | | }
|
| | | </style> |
| | |
| | | </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> |
| | |
| | | </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> |
| | |
| | | </template>
|
| | |
|
| | | <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 |
| | | }) |
| | | }
|
| | | }
|
| | | }
|
| | |
| | | .status{ |
| | | color: $primaryColor; |
| | | } |
| | | .green{ |
| | | color: #0ADE79; |
| | | } |
| | | .gray{ |
| | | color: #999999; |
| | | } |
| | | }
|
| | | }
|
| | | }
|
| | |
| | | </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>
|
| | |
| | | </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>
|
| | |
| | | <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="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="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>
|
| | |
| | | </template>
|
| | |
|
| | | <script> |
| | | import { ywWorkorder } from '@/api'
|
| | | import {
|
| | | ywWorkorder
|
| | | } from '@/api'
|
| | | export default {
|
| | | data() {
|
| | | return {
|
| | |
| | | this.getList() |
| | | }, |
| | | onReachBottom() { |
| | | |
| | | const {total,list} = this
|
| | | if (list.length < total) {
|
| | | this.page = this.page + 1
|
| | | this.getList()
|
| | | } else {
|
| | | this.showToast('暂无更多数据')
|
| | | }
|
| | | },
|
| | | methods: {
|
| | | tabsClick(val) { |
| | |
| | | }, |
| | | 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() |
| | | },
|
| | | getList() { |
| | | const { page, total, list, activeTab } = this |
| | | const {
|
| | | page,
|
| | | total,
|
| | | list,
|
| | | activeTab,
|
| | | param, |
| | | selectAll
|
| | | } = this
|
| | | ywWorkorder({ |
| | | page, |
| | | capacity: 10, |
| | | model: { } |
| | | model: {
|
| | | ...param, |
| | | dispatchUserId: selectAll ? '' : uni.getStorageSync('userInfo').id,
|
| | | }
|
| | | }).then(res => { |
| | | this.list = res.data.records || [] |
| | | this.list = [...this.list, ...res.data.records]
|
| | | this.total = res.data.total
|
| | | }) |
| | | }
|
| | | }
|
| | |
| | | .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; |
| | |
| | | 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; |
| | |
| | | margin-top: 24rpx; |
| | | } |
| | | } |
| | |
|
| | | .active{ |
| | | font-weight: 600; |
| | | font-size: 32rpx; |
| | | color: #222222; |
| | |
|
| | | .border{ |
| | | background-color: $primaryColor; |
| | | } |
| | |
| | | } |
| | | |
| | | }
|
| | |
|
| | | .head_wrap {
|
| | | display: flex;
|
| | | align-items: center;
|
| | |
| | | background: #F7F7F7;
|
| | | border-radius: 38rpx;
|
| | | padding-left: 30rpx;
|
| | |
|
| | | input{ |
| | | flex: 1; |
| | | }
|
| | |
|
| | | .search {
|
| | | width: 28rpx;
|
| | | height: 28rpx;
|
| | |
| | | // height: 290rpx; |
| | | padding: 30rpx 0; |
| | | border-bottom: 2rpx solid #E5E5E5;
|
| | |
|
| | | .icon {
|
| | | width: 80rpx;
|
| | | height: 80rpx; |
| | |
| | | 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-size: 34rpx; |
| | | color: #222222; |
| | | } |
| | |
|
| | | .status{ |
| | | color: $primaryColor; |
| | | } |
| | |
|
| | | .gray{ |
| | | color: #999999; |
| | | } |