master
xielei 2024-11-08 18:00:54 +08:00
parent e623aec473
commit 4b28a7bb0b
15 changed files with 164 additions and 207 deletions

View File

@ -49,9 +49,6 @@
stm: '',
etm: ''
},
customStyle: {
background: '#000'
},
list: [
]
};

View File

@ -70,9 +70,6 @@
stm:'',
etm:'',
userList: uni.getStorageSync('value').data,
customStyle: {
background: '#000'
},
list: []
};
},

View File

@ -43,14 +43,15 @@
</view>
<view class="itemNo" style="flex-direction: column;">
<text>巡检图片</text>
<view class="">
<view class="" v-for="item in queItem.inspectPics">
<image :src="item.url" style="width: 80px;height: 80px;margin: 5px;" @click="previewImage(item)"></image>
</view>
</view>
<view class="itemNo" style="flex-direction: column;">
<text>巡检视频</text>
<view class="">
<view class="" v-for="item in queItem.inspectVideos">
<video :src="item.url" style="width: 80px;height: 80px;margin: 5px;" show-fullscreen-btn></video>
</view>
</view>
</view>
@ -118,6 +119,14 @@
item1.url ='http://223.75.53.141:9102/test.by-lyf.tmp' + item1.filePath
return item1
})
this.queItem.inspectVideos?.map(item1=>{
item1.url ='http://223.75.53.141:9102/test.by-lyf.tmp' + item1.filePath
return item1
})
this.queItem.inspectPics?.map(item1=>{
item1.url ='http://223.75.53.141:9102/test.by-lyf.tmp' + item1.filePath
return item1
})
console.log(this.queItem);
},
methods: {

View File

@ -12,13 +12,13 @@
<u-form-item label="内容说明" prop="maintainContent" borderBottom labelPosition='top' required labelWidth="100px">
<u--textarea v-model="model1.maintainContent" placeholder="请输入内容" disabled></u--textarea>
</u-form-item>
<u-form-item label="现场图片" prop="fileListpics" borderBottom labelPosition='top' labelWidth="100px">
<u-upload :fileList="fileListpics" @afterRead="afterRead" @delete="deletePic" name="pics" multiple disabled
<u-form-item label="现场图片" prop="pics" borderBottom labelPosition='top' labelWidth="100px">
<u-upload :fileList="model1.pics" name="pics" multiple disabled
multiple accept='image' :maxCount="10"></u-upload>
</u-form-item>
<u-form-item label="现场视频" prop="fileListvideos" borderBottom labelPosition='top' labelWidth="100px">
<u-upload :fileList="fileListvideos" @afterRead="afterRead" @delete="deletePic" name="videos" multiple disabled
<u-form-item label="现场视频" prop="videos" borderBottom labelPosition='top' labelWidth="100px">
<u-upload :fileList="model1.videos" name="videos" multiple disabled
multiple accept='video' :maxCount="10"></u-upload>
</u-form-item>
@ -74,78 +74,18 @@
mounted() {
this.model1 = this.formData
this.model1.maintainName = this.actions.find(item=>item.value == this.formData.maintainType).name
this.model1.fileListpics = this.formData.pic
this.model1.fileListvideos = this.formData.videos
this.model1.pics?.map(item1=>{
item1.url ='http://223.75.53.141:9102/test.by-lyf.tmp' + item1.filePath
return item1
})
this.model1.videos?.map(item1=>{
item1.url ='http://223.75.53.141:9102/test.by-lyf.tmp' + item1.filePath
return item1
})
console.log(this.model1,'83498943r80432',this.formData);
},
methods: {
sexSelect(e) {
this.model1.maintainType = e.name
this.$refs.uForm.validateField('maintainType')
},
submit() {
this.$refs.uForm.validate().then(res => {
let params = {
...this.model1,
maintainType: this.actions.find(item => item.name == this.model1.maintainType).value,
}
this.$emit('submitForm', params)
}).catch(errors => {
uni.$u.toast('校验失败')
})
},
//
deletePic(event) {
this[`fileList${event.name}`].splice(event.index, 1)
},
//
async afterRead(event) {
// multiple true , file
let lists = [].concat(event.file)
console.log(`fileList${event.name}`,event);
let fileListLen = this[`fileList${event.name}`].length
lists.map((item) => {
this[`fileList${event.name}`].push({
...item,
status: 'uploading',
message: '上传中'
})
})
for (let i = 0; i < lists.length; i++) {
const result = await this.uploadFilePromise(lists[i].url,event.name)
let item = this[`fileList${event.name}`][fileListLen]
this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
status: 'success',
message: '',
url: result
}))
fileListLen++
}
},
uploadFilePromise(url,name) {
return new Promise((resolve, reject) => {
let a = uni.uploadFile({
url: 'http://local.gunshiiot.com:18083/gunshiApp/xyt/maintain/service/file/upload/singleSimple', //
filePath: url,
name: 'file',
formData: {
user: 'test'
},
success: (res) => {
setTimeout(() => {
// const obj = this.model1[name].find(item=>item.fileId==res.data.data.fileId)
// if(obj){
// }
console.log(JSON.parse(res.data),this.model1,name);
this.model1[name].push({fileId:JSON.parse(res.data).data.fileId})
resolve(res.data.data)
}, 1000)
}
});
})
},
},
onReady() {
//setRules

View File

@ -43,6 +43,7 @@ export default {
},
onLoad(options) {
this.formData=JSON.parse(options.item)
console.log(this.formData,JSON.parse(options.item));
},
methods: {
submitForm(params) {

View File

@ -97,6 +97,9 @@
}
},
methods: {
searchTm(){
this.getList()
},
toDetail(item){
uni.navigateTo({
url:'/pages/mypage/compents/wxyh/formZdy/index?item='+JSON.stringify(item)

View File

@ -33,7 +33,7 @@
</view>
<view style="display: flex;" class="itemEve">
<text>问题描述:</text>
<text>{{o.itemProblemDesc}}</text>
<text>{{o.problemDesc}}</text>
</view>
</view>
<view class="" v-if="o.isHandle == 1">
@ -243,7 +243,8 @@
<style lang="scss" scoped>
.contentItem {
height: 340px;
height: 100%;
// overflow: auto;
overflow: auto;
.itemC {
@ -281,8 +282,8 @@
}
.xj-content {
height: 300px;
overflow-y: auto;
// height: 300px;
// overflow-y: auto;
}
.xj-text {

View File

@ -5,10 +5,10 @@
fontSize:'18px'
}" :height='44' :safeAreaInsetTop=true leftIconSize='20' leftIconColor='rgb(153, 153, 153)'>
</u-navbar>
<view class=""
<!-- <view class=""
style="margin-top: 44px;;background-color: #f0f0f0;border-top: 1px solid #f0f0f0; height:calc(100vh - 44px)">
<view style="margin: 10px;background-color: #fff;padding: 10px;">
<view class="item">
<!-- <view class="item">
<view class="blueTiao"></view>
<view class="title">
基本信息
@ -35,20 +35,18 @@
<text>结束日期</text>
<text>{{endDate}}</text>
</view>
</view>
</view>
<!-- <view v-show="status == 0 && btnStatus == 0" style="display:flex;justify-content: center;margin-top: 20%;">
<view class="circle-btn" @click="startXc"></view>
</view> -->
<view style="margin: 10px;background-color: #fff;padding: 10px;">
<!-- </view> -->
<view style="margin: 10px;background-color: #fff;padding: 10px; height:calc(100vh - 50px);margin-top: 50px;">
<view class="item">
<view class="blueTiao"></view>
<view class="title">
巡检项
</view>
</view>
<view class="contentItem">
<view class="contentItem" style="height: calc(100% - 50px);">
<db-form :xjItem="xjItem"></db-form>
</view>
</view>

View File

@ -36,12 +36,12 @@
</view>
<view class="contentItem">
<view class="itemC">
<text>开始日期</text>
<text>{{item.startDate}}</text>
<text>接收时间</text>
<text>{{item.receiveTime}}</text>
</view>
<view class="itemC">
<text>结束日期</text>
<text>{{item.endDate}}</text>
<text>完成时间</text>
<text>{{item.finishTime}}</text>
</view>
</view>
</view>
@ -96,8 +96,8 @@
this.getData()
},
handleStartTime(e){
let time = moment(e.value).format("YYYY-MM-DD")
this.stm = time
let time = moment(e.value).format("YYYY-MM-D")
this.stm = time;
this.showTime = false
},
handleEndTime(e){
@ -110,8 +110,8 @@
const userId = uni.getStorageSync('value')?.userId
const params = {
dateRangeSo:{
start:moment(this.stm).format("YYYY-MM-DD"),
end:moment(this.etm).format("YYYY-MM-DD"),
start:moment(this.stm).format("YYYY-MM-DD 00:00:00"),
end:moment(this.etm).format("YYYY-MM-DD 23:59:59"),
},
inspectUserId:userId,
statusList:[2]

View File

@ -43,20 +43,21 @@
</view>
<view class="itemNo" style="flex-direction: column;">
<text>巡检图片</text>
<view class="">
<view class="" v-for="item in queItem.inspectPics">
<image :src="item.url" style="width: 80px;height: 80px;margin: 5px;" @click="previewImage(item)"></image>
</view>
</view>
<view class="itemNo" style="flex-direction: column;">
<text>巡检视频</text>
<view class="">
<view class="" v-for="item in queItem.inspectVideos">
<video :src="item.url" style="width: 80px;height: 80px;margin: 5px;" show-fullscreen-btn></video>
</view>
</view>
</view>
</view>
<view style="margin: 10px;background-color: #fff;padding: 10px;" class="">
<u--form labelPosition="left" :model="o" ref="uForm" label-width='80px'>
<u--form labelPosition="left" :model="queItem" ref="uForm" label-width='80px'>
<view class="itemCc">
<u-form-item label="处理人" prop="handleUserName" borderBottom required >
<u--input v-model="queItem.handleUserName" disabled disabledColor="#ffffff"
@ -102,9 +103,6 @@
stm: '',
etm: ''
},
customStyle: {
background: '#000'
},
queItem:{},
list: [{
title: '5-29日常巡检',
@ -129,7 +127,15 @@
this.queItem.handleUserName = uni.getStorageSync('value').nickName
this.queItem.handleTime = moment().format('YYYY-MM-DD HH:mm:ss')
this.queItem.handleUserId = uni.getStorageSync('value').userId
this.queItem.handlePics.map(item=>{
// this.queItem.handlePics.map(item=>{
// item.url ='http://223.75.53.141:9102/test.by-lyf.tmp' + item.filePath
// return item
// })
this.queItem.inspectPics.map(item=>{
item.url ='http://223.75.53.141:9102/test.by-lyf.tmp' + item.filePath
return item
})
this.queItem.inspectVideos.map(item=>{
item.url ='http://223.75.53.141:9102/test.by-lyf.tmp' + item.filePath
return item
})
@ -146,9 +152,7 @@
uni.$http.post('/gunshiApp/xyt/inspect/detail/handle', this.queItem).then(res => {
uni.$showMsg(res.data.description);
if(res.data.code == 200){
uni.redirectTo({
url:'/pages/wtcl/index'
})
uni.navigateBack()
}
})
}

View File

@ -30,7 +30,7 @@
</view>
<view class="titleRight" @click="toDetail(item)">
<view class="border">
{{isHandle==0?'已处理':'待处理'}}
{{item.isHandle==0?'待处理':'已处理'}}
</view>
<u-icon name="arrow-right" size="20"></u-icon>
</view>
@ -76,14 +76,11 @@
end: '请选择结束时间',
stm:moment().startOf('year').format('YYYY-MM-DD'),
etm:moment().format('YYYY-MM-DD'),
customStyle: {
background: '#000'
},
list: [
]
};
},
onLoad() {
onShow() {
this.getList()
},
computed:{

View File

@ -1,5 +1,5 @@
<template>
<view class="contentItem" style="height: calc(100% - 350px);">
<view class="contentItem" >
<uni-collapse>
<uni-collapse-item title-border="none" v-for="(item,index) in listData" :key="index" :border="false"
:show-animation="true">
@ -33,8 +33,8 @@
@delete="(e)=>deletePic(e,o,index,i)" name="inspectVideos" multiple
:maxCount="10"></u-upload>
</u-form-item>
<u-form-item label="问题描述" prop="itemProblemDesc" borderBottom required>
<u--textarea v-model="o.itemProblemDesc" placeholder="请输入内容"></u--textarea>
<u-form-item label="问题描述" prop="problemDesc" borderBottom required>
<u--textarea v-model="o.problemDesc" placeholder="请输入内容"></u--textarea>
</u-form-item>
<u-form-item label="处理状态" prop="isHandle" borderBottom required>
<u-subsection :list="listStatus" :current="getHandle(o.isHandle)"
@ -261,9 +261,7 @@
console.log(data,'2121');
if(data.code==200){
uni.$showMsg('提交成功');
uni.redirectTo({
url:'/pages/xcrw/index'
})
uni.navigateBack()
}
} catch (error) {
uni.$showMsg();
@ -280,7 +278,7 @@
this.listData.forEach(item => {
item.ab = item.children.filter(i => {
if (i.isNormal == 0) {
if (i.inspectPics?.length && i.itemProblemDesc) {
if (i.inspectPics?.length && i.problemDesc) {
tigger = true
} else {
tigger = false
@ -377,8 +375,8 @@
<style lang="scss" scoped>
.contentItem {
// height: 260px;
// overflow: auto;
height: 100%;
overflow: auto;
.itemC {
display: flex;
@ -415,8 +413,8 @@
}
.xj-content {
height: 300px;
overflow-y: auto;
// height: 300px;
// overflow-y: auto;
}
.xj-text {

View File

@ -5,8 +5,9 @@
fontSize:'18px'
}" :height='44' :safeAreaInsetTop=true leftIconSize='20' leftIconColor='rgb(153, 153, 153)'>
</u-navbar>
<view class="" style="margin-top: 44px;;background-color: #f0f0f0;border-top: 1px solid #f0f0f0; height:calc(100vh - 44px)">
<view style="margin: 10px;background-color: #fff;padding: 10px;">
<view class=""
style="margin-top: 44px;;background-color: #f0f0f0;border-top: 1px solid #f0f0f0; height:calc(100vh - 44px)">
<view style="margin: 10px;background-color: #fff;padding: 10px;" v-show="btnStatus == 0">
<view class="item">
<view class="blueTiao"></view>
<view class="title">
@ -38,19 +39,20 @@
</view>
<view v-show="status !== 2 && btnStatus == 0" style="display:flex;justify-content: center;margin-top: 20%;">
<view v-show="status !== 2 && btnStatus == 0" class="circle-btn" @click="startXc">{{statusType[status]}}</view>
<view v-show="status !== 2 && btnStatus == 0" class="circle-btn" @click="startXc">{{statusType[status]}}
</view>
<view class="" style="height: calc(100vh - 311px);overflow: auto;">
</view>
<view class="" style="height: calc(100vh - 50px);overflow: auto;">
<view v-show="btnStatus != 0" style="margin: 10px;background-color: #fff;padding: 10px;">
<view v-show="btnStatus != 0" style="margin: 10px;background-color: #fff;padding: 10px;height: calc(100% - 40px);">
<view class="item">
<view class="blueTiao"></view>
<view class="title">
巡检项
</view>
</view>
<view class="contentItem1" style="height: 100%;">
<view class="contentItem1" style="height: calc(100% - 32px);">
<db-form :xjItem="xjItem"></db-form>
</view>
</view>
@ -91,7 +93,9 @@
async startXc() {
try {
if (this.status == 0) {
const {data} = await uni.$http.get(`/gunshiApp/xyt/inspect/task/startInspect/${this.id}`)
const {
data
} = await uni.$http.get(`/gunshiApp/xyt/inspect/task/startInspect/${this.id}`)
if (data.code == 200) {
this.btnStatus = 1;
this.getXjItem(this.id)
@ -109,7 +113,9 @@
//
async getXjItem(id) {
try {
const {data} = await uni.$http.get(`/gunshiApp/xyt/inspect/detail/info?taskId=${id}`)
const {
data
} = await uni.$http.get(`/gunshiApp/xyt/inspect/detail/info?taskId=${id}`)
if (data.code == 200) {
this.xjItem = data.data
}
@ -143,7 +149,9 @@
//
async sendLocation(latitude, longitude) {
try {
const { data } = await uni.$http.post(`/gunshiApp/xyt/inspectTaskTrack/insert`, {
const {
data
} = await uni.$http.post(`/gunshiApp/xyt/inspectTaskTrack/insert`, {
taskId: this.id,
lttd: latitude,
lgtd: longitude
@ -183,6 +191,7 @@
border-top: 1px solid #eee;
border-bottom: 1px solid #eee;
}
.circle-btn {
width: 120px;
height: 120px;
@ -192,11 +201,13 @@
text-align: center;
line-height: 120px;
}
.item {
padding-bottom: 10px;
display: flex;
align-items: center;
// justify-content: space-between;
.blueTiao {
background-color: #007aff;
@ -204,6 +215,7 @@
height: 16px;
margin-right: 10px;
}
.title {
border-width: 0px;
font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑', sans-serif;
@ -215,6 +227,7 @@
.titleRight {
display: flex;
.border {
border-width: 0px;
background-color: rgba(236, 245, 255, 1);
@ -232,6 +245,7 @@
}
}
.contentItem {
.itemC {
display: flex;
@ -241,6 +255,7 @@
padding: 10px;
border-bottom: 1px solid #f0f0f0;
}
.itemNo {
color: #666666;
padding: 10px;

View File

@ -88,7 +88,7 @@
},
mounted() {
this.getData()
},
methods: {
searchHandle() {
@ -109,8 +109,8 @@
const userId = uni.getStorageSync('value')?.userId
const params = {
dateRangeSo: {
start: moment(this.stm).format("YYYY-MM-DD"),
end: moment(this.etm).format("YYYY-MM-DD"),
start: moment(this.stm).format("YYYY-MM-DD 00:00:00"),
end: moment(this.etm).format("YYYY-MM-DD 23:59:59"),
},
inspectUserId: userId,
statusList: [0, 1]
@ -130,8 +130,8 @@
}
},
onShow(){
this.getData()
const timer =uni.getStorageSync('timer');
console.log(timer);
if(timer){
clearInterval(timer);
uni.removeStorageSync('timer');

View File

@ -40,9 +40,6 @@
start: moment().subtract(1,'day').format('YYYY-MM-DD HH:mm:ss'),
end: moment().format('YYYY-MM-DD HH:mm:ss')
},
customStyle: {
background: '#000'
},
mapType:{
aiWarnCount:'AI告警',
rzWarn:"水位告警",