新增的功能
parent
d63ffc1e9e
commit
6ea8ba5224
|
|
@ -20,7 +20,7 @@
|
||||||
<u-icon name="bell-fill" size="30" color="#fff" @click="todetailmessgae()">
|
<u-icon name="bell-fill" size="30" color="#fff" @click="todetailmessgae()">
|
||||||
|
|
||||||
</u-icon>
|
</u-icon>
|
||||||
<u-badge bgColor=" #de2433" :offset='[25,20]' :value="6" :absolute='true'></u-badge>
|
<u-badge bgColor=" #de2433" :offset='[25,20]' :value="messagelist.length" :absolute='true'></u-badge>
|
||||||
</div>
|
</div>
|
||||||
</view>
|
</view>
|
||||||
<!-- nav -->
|
<!-- nav -->
|
||||||
|
|
@ -53,12 +53,8 @@
|
||||||
<span style="color: #59a7ff">{{ !level || !yjStatus ? '无' : level }}</span> -->
|
<span style="color: #59a7ff">{{ !level || !yjStatus ? '无' : level }}</span> -->
|
||||||
<sk-info />
|
<sk-info />
|
||||||
</view>
|
</view>
|
||||||
|
<view class="warn" v-for="item in Ylzlist">
|
||||||
<view class="warn">
|
<ylz-list :item='item'/>
|
||||||
<ylz-list />
|
|
||||||
</view>
|
|
||||||
<view class="warn">
|
|
||||||
<ylz-list />
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="info_24"
|
<view class="info_24"
|
||||||
|
|
@ -101,6 +97,7 @@
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
Ylzlist:[],
|
||||||
monthDay: '',
|
monthDay: '',
|
||||||
dayOfWeek: '',
|
dayOfWeek: '',
|
||||||
dataType,
|
dataType,
|
||||||
|
|
@ -186,7 +183,8 @@
|
||||||
},
|
},
|
||||||
interval: null,
|
interval: null,
|
||||||
numPic: 0,
|
numPic: 0,
|
||||||
allStatus: false
|
allStatus: false,
|
||||||
|
messagelist:[]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
|
|
@ -355,6 +353,29 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getYlzList(){
|
||||||
|
|
||||||
|
uni.$http.post('/gunshiApp/xyt/stPptnRReal/list').then(res => {
|
||||||
|
|
||||||
|
if (res.data.code == 200) {
|
||||||
|
this.Ylzlist = res.data.data
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
console.log(111);
|
||||||
|
uni.$http.post('/gunshiApp/xyt/messageCenter/list', {
|
||||||
|
start:'',
|
||||||
|
end:''
|
||||||
|
}).then(res => {
|
||||||
|
|
||||||
|
if (res.data.code == 200) {
|
||||||
|
this.messagelist = res.data.data
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
todetailmessgae() {
|
todetailmessgae() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/messageList/index'
|
url: '/pages/messageList/index'
|
||||||
|
|
@ -793,6 +814,8 @@
|
||||||
this.getOverview()
|
this.getOverview()
|
||||||
this.getDataTime()
|
this.getDataTime()
|
||||||
this.getResponseLevel()
|
this.getResponseLevel()
|
||||||
|
this.getList()
|
||||||
|
this.getYlzList()
|
||||||
this.userList = uni.getStorageSync('value')
|
this.userList = uni.getStorageSync('value')
|
||||||
console.log(this.userList.userName, uni.getStorageSync('value'), '=============777777');
|
console.log(this.userList.userName, uni.getStorageSync('value'), '=============777777');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,24 +11,24 @@
|
||||||
|
|
||||||
<view class="itemC">
|
<view class="itemC">
|
||||||
<text>标题</text>
|
<text>标题</text>
|
||||||
<text>{{item.name}}</text>
|
<text>{{item.title}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="itemC">
|
<view class="itemC">
|
||||||
<text>发布时间</text>
|
<text>发布时间</text>
|
||||||
<text>{{item.time}}</text>
|
<text>{{item.publishTime}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="itemC">
|
<view class="itemC">
|
||||||
<text>发布人</text>
|
<text>发布人</text>
|
||||||
<text>{{item.xjx}}</text>
|
<text>{{item.publishUserName}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="itemC">
|
<!-- <view class="itemC">
|
||||||
<text>优先级</text>
|
<text>优先级</text>
|
||||||
<text>{{item.xjx}}</text>
|
<text>{{item.xjx}}</text>
|
||||||
</view>
|
</view> -->
|
||||||
|
|
||||||
<view class="itemNo" style="flex-direction: column;">
|
<view class="itemNo" style="flex-direction: column;">
|
||||||
<text>消息内容</text>
|
<text>消息内容</text>
|
||||||
<u--textarea v-model="item.xjx" placeholder="请输入内容" disabled ></u--textarea>
|
<u--textarea v-model="item.content" placeholder="请输入内容" disabled ></u--textarea>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -52,17 +52,21 @@
|
||||||
customStyle: {
|
customStyle: {
|
||||||
background: '#000'
|
background: '#000'
|
||||||
},
|
},
|
||||||
list: [{
|
list: [
|
||||||
title: '5-29日常巡检',
|
|
||||||
state: 0,
|
|
||||||
xjx: '上游坝面、坝顶',
|
|
||||||
name: '王自荣',
|
|
||||||
time: '2024-05-30 09:31:23'
|
|
||||||
},
|
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
onLoad(options){
|
||||||
|
console.log(options);
|
||||||
|
this.list.push(JSON.parse(options.item))
|
||||||
|
this.yd(item)
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
yd(item){
|
||||||
|
uni.$http.post('/gunshiApp/xyt/messageCenter/update').then(res => {
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
confirm(e) {
|
confirm(e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
this.model.stm = e[0]
|
this.model.stm = e[0]
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,27 @@
|
||||||
<template>
|
<template>
|
||||||
<view :style="{height:'100vh',overflow:'hidden',backgroundColor: '#f0f0f0'}">
|
<view :style="{height:'100vh',overflow:'hidden',backgroundColor: '#f0f0f0'}">
|
||||||
<u-status-bar></u-status-bar>
|
<u-status-bar></u-status-bar>
|
||||||
<u-navbar title="预警" :autoBack="true" :titleStyle="{
|
<u-navbar title="消息中心" :autoBack="true" :titleStyle="{
|
||||||
fontSize:'18px'
|
fontSize:'18px'
|
||||||
}" :height='44' :safeAreaInsetTop=true leftIconSize='20' leftIconColor='rgb(153, 153, 153)'>
|
|
||||||
|
}" rightText="一键已读" @rightClick='rightClick' :height='44' :safeAreaInsetTop=true leftIconSize='20'
|
||||||
|
leftIconColor='rgb(153, 153, 153)'>
|
||||||
</u-navbar>
|
</u-navbar>
|
||||||
<view class="" style="margin-top: 44px;;background-color: #f0f0f0;border-top: 1px solid #f0f0f0;">
|
<view class="" style="margin-top: 44px;;background-color: #f0f0f0;border-top: 1px solid #f0f0f0;">
|
||||||
<view style="display: flex;padding: 20px;background-color: #fff;align-items: center;">
|
<view style="padding:0 10px,backgroundColor:#fff">
|
||||||
<u--input v-model="model.stm" shape='circle' :customStyle="customStyle" placeholder="请选择开始时间"
|
<view class="time-ranger">
|
||||||
style="background-color: #f0f0f0;height: 30px;text-align: center;" border='none' @click="show = true;hideKeyboard()"></u--input>
|
<view class="start-time">
|
||||||
-
|
<text>开始时间</text>
|
||||||
<u--input v-model=" model.etm" shape='circle' placeholder="请选择结束时间"
|
<text @click="showTime=true" style="margin-left:15%;color:#3399ef">{{startTime}}</text>
|
||||||
style="background-color: #f0f0f0;height: 30px;text-align: center;" border='none' @click="show = true;hideKeyboard()"></u--input>
|
</view>
|
||||||
<text>搜索</text>
|
<view class="end-time">
|
||||||
|
<text>结束时间</text>
|
||||||
|
<text @click="showTime1=true" style="margin:0 15%;color:#3399ef">{{endTime}}</text>
|
||||||
|
<view class="search-btn" @click="searchTm">
|
||||||
|
搜索
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="" v-for="item in list" style="margin: 10px;background-color: #fff;padding: 10px;">
|
<view class="" v-for="item in list" style="margin: 10px;background-color: #fff;padding: 10px;">
|
||||||
<view class="item">
|
<view class="item">
|
||||||
|
|
@ -26,12 +35,12 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="titleRight" @click="toDetail(item)">
|
<view class="titleRight" @click="toDetail(item)">
|
||||||
2024-05-30 09:31:23
|
{{item.publishTime}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="contentItem">
|
<view class="contentItem">
|
||||||
<view class="itemC">
|
<view class="itemC">
|
||||||
管理局2024年第2季度考核已经开始,请您进行上传自评结果。请您进行上传自评结果。请您进行上传自评结果。请您进行上传自评结果。
|
{{item.content}}
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -39,50 +48,72 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<u-calendar :show="show" mode="range" @confirm="confirm" @cancel='cancel'></u-calendar>
|
<u-datetime-picker :show="showTime" v-model="stm" mode="datetime" @confirm="showTime=false"
|
||||||
|
@cancel="showTime=false"></u-datetime-picker>
|
||||||
|
<u-datetime-picker :show="showTime1" v-model="etm" mode="datetime" @confirm="showTime1=false"
|
||||||
|
@cancel="showTime1=false"></u-datetime-picker>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
show: false,
|
show: false,
|
||||||
model: {
|
showTime:false,
|
||||||
stm: '',
|
showTime1:false,
|
||||||
etm: ''
|
start: '请选择开始时间',
|
||||||
},
|
end: '请选择结束时间',
|
||||||
|
stm:'',
|
||||||
|
etm:'',
|
||||||
|
userList: uni.getStorageSync('value').data,
|
||||||
customStyle: {
|
customStyle: {
|
||||||
background: '#000'
|
background: '#000'
|
||||||
},
|
},
|
||||||
list: [{
|
list: []
|
||||||
title: '5-29日常巡检',
|
|
||||||
state: 0,
|
|
||||||
xjx: '上游坝面、坝顶',
|
|
||||||
name: '王自荣',
|
|
||||||
time: '2024-05-30 09:31:23'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '5-29日常巡检',
|
|
||||||
state: 1,
|
|
||||||
xjx: '上游坝面、坝顶',
|
|
||||||
name: '王自荣',
|
|
||||||
time: '2024-05-30 09:31:23'
|
|
||||||
},
|
|
||||||
]
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
onLoad(options) {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
computed:{
|
||||||
|
startTime:function (){
|
||||||
|
|
||||||
|
return this.stm?moment(this.stm).format('YYYY-MM-DD HH:mm:ss'):this.start
|
||||||
|
},
|
||||||
|
endTime:function (){
|
||||||
|
return this.etm?moment(this.etm).format('YYYY-MM-DD HH:mm:ss'):this.end
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// getList(){
|
rightClick() {
|
||||||
// uni.$http.post('/gunshiApp/xyt/stQxWarnR/home/warn',this.model).then(res=>{
|
uni.$http.get('/gunshiApp/xyt/messageCenter/all/read', {
|
||||||
|
receiveUserId: uni.getStorageSync('value').userId
|
||||||
|
}).then(res => {
|
||||||
|
|
||||||
// })
|
if (res.data.code == 200) {
|
||||||
// },
|
this.getList()
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
searchTm() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
console.log(111);
|
||||||
|
uni.$http.post('/gunshiApp/xyt/messageCenter/list', {
|
||||||
|
start:this.stm?moment(this.stm).format('YYYY-MM-DD HH:mm:ss'):'',
|
||||||
|
end:this.etm?moment(this.etm).format('YYYY-MM-DD HH:mm:ss'):''
|
||||||
|
}).then(res => {
|
||||||
|
|
||||||
|
if (res.data.code == 200) {
|
||||||
|
this.list = res.data.data
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
confirm(e) {
|
confirm(e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
this.model.start = e[0]
|
this.model.start = e[0]
|
||||||
|
|
@ -92,9 +123,10 @@
|
||||||
cancel() {
|
cancel() {
|
||||||
this.show = false
|
this.show = false
|
||||||
},
|
},
|
||||||
toDetail(){
|
toDetail(item) {
|
||||||
|
console.log(item);
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/pages/messageList/detail/index'
|
url: '/pages/messageList/detail/index?item=' + JSON.stringify(item),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -102,9 +134,27 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.uni-input-placeholder{
|
.time-ranger {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
|
||||||
|
.start-time,
|
||||||
|
.end-time {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 10px 0;
|
||||||
|
border-bottom: 1px solid #dfdfdf;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-btn {
|
||||||
|
margin: 3px 0 0 5px;
|
||||||
|
// color: #3399ef;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-input-placeholder {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.myTitleStyle {
|
.myTitleStyle {
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
background-color: red;
|
background-color: red;
|
||||||
|
|
@ -125,13 +175,15 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
.blueTiao{
|
|
||||||
|
.blueTiao {
|
||||||
background-color: #2a7efa;
|
background-color: #2a7efa;
|
||||||
width: 8px;
|
width: 8px;
|
||||||
height: 8px;
|
height: 8px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
border-width: 0px;
|
border-width: 0px;
|
||||||
font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑', sans-serif;
|
font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑', sans-serif;
|
||||||
|
|
@ -143,6 +195,7 @@
|
||||||
|
|
||||||
.titleRight {
|
.titleRight {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
.border {
|
.border {
|
||||||
border-width: 0px;
|
border-width: 0px;
|
||||||
background-color: rgba(236, 245, 255, 1);
|
background-color: rgba(236, 245, 255, 1);
|
||||||
|
|
@ -160,8 +213,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
.contentItem{
|
|
||||||
.itemC{
|
.contentItem {
|
||||||
|
.itemC {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
||||||
|
|
@ -1,45 +1,45 @@
|
||||||
<template>
|
<template>
|
||||||
<view :style="{height:'100vh',overflow:'hidden'}">
|
<view :style="{height:'100vh',overflow:'auto'}">
|
||||||
<u-status-bar></u-status-bar>
|
<u-status-bar></u-status-bar>
|
||||||
<u-navbar title="预警" :autoBack="true" :titleStyle="{
|
<u-navbar title="预警" :autoBack="true" :titleStyle="{
|
||||||
fontSize:'18px'
|
fontSize:'18px'
|
||||||
}" :height='44' :safeAreaInsetTop=true leftIconSize='20' leftIconColor='rgb(153, 153, 153)'>
|
}" :height='44' :safeAreaInsetTop=true leftIconSize='20' leftIconColor='rgb(153, 153, 153)'>
|
||||||
</u-navbar>
|
</u-navbar>
|
||||||
<view class="" style="margin-top: 44px;;background-color: #f0f0f0;border-top: 1px solid #f0f0f0;">
|
<view class="" style="margin-top: 44px;;background-color: #f0f0f0;border-top: 1px solid #f0f0f0;">
|
||||||
<view class="" v-for="item in list" style="margin: 10px;background-color: #fff;padding: 10px;">
|
<view style="margin: 10px;background-color: #fff;padding: 10px;">
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<view class="blueTiao">
|
<view class="blueTiao">
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="title">
|
<view class="title">
|
||||||
{{item.title}}
|
巡检问题信息
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="contentItem">
|
<view class="contentItem">
|
||||||
|
|
||||||
<view class="itemC">
|
<view class="itemC">
|
||||||
<text>巡查人</text>
|
<text>巡查人</text>
|
||||||
<text>{{item.name}}</text>
|
<text>{{queItem.inspectUserName}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="itemC">
|
<view class="itemC">
|
||||||
<text>巡查时间</text>
|
<text>巡查时间</text>
|
||||||
<text>{{item.time}}</text>
|
<text>{{queItem.finishTime}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="itemC">
|
<view class="itemC">
|
||||||
<text>任务标题</text>
|
<text>任务标题</text>
|
||||||
<text>{{item.xjx}}</text>
|
<text>{{queItem.taskTitle}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="itemC">
|
<view class="itemC">
|
||||||
<text>巡检点</text>
|
<text>巡检点</text>
|
||||||
<text>{{item.xjx}}</text>
|
<text>{{queItem.name}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="itemC">
|
<view class="itemC">
|
||||||
<text>巡检项</text>
|
<text>巡检项</text>
|
||||||
<text>{{item.xjx}}</text>
|
<text>{{queItem.itemDesc}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="itemNo" style="flex-direction: column;">
|
<view class="itemNo" style="flex-direction: column;">
|
||||||
<text>巡检问题描述</text>
|
<text>巡检问题描述</text>
|
||||||
<u--textarea v-model="item.xjx" placeholder="请输入内容" disabled ></u--textarea>
|
<u--textarea v-model="queItem.problemDesc" placeholder="请输入内容" disabled ></u--textarea>
|
||||||
</view>
|
</view>
|
||||||
<view class="itemNo" style="flex-direction: column;">
|
<view class="itemNo" style="flex-direction: column;">
|
||||||
<text>巡检图片</text>
|
<text>巡检图片</text>
|
||||||
|
|
@ -55,9 +55,39 @@
|
||||||
</view>
|
</view>
|
||||||
</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'>
|
||||||
|
<view class="itemCc">
|
||||||
|
<u-form-item label="处理人" prop="handleUserName" borderBottom required >
|
||||||
|
<u--input v-model="queItem.handleUserName" disabled disabledColor="#ffffff"
|
||||||
|
placeholder="" border="none"></u--input>
|
||||||
|
</u-form-item>
|
||||||
|
<u-form-item label="处理时间" prop="handleTime" borderBottom required>
|
||||||
|
<u--input v-model="queItem.handleTime" disabled disabledColor="#ffffff"
|
||||||
|
placeholder="" border="none"></u--input>
|
||||||
|
</u-form-item>
|
||||||
|
<u-form-item label="处理内容" prop="handleDesc" borderBottom required labelPosition='top'>
|
||||||
|
<u--textarea v-model="queItem.handleDesc" placeholder="请输入内容" ></u--textarea>
|
||||||
|
</u-form-item>
|
||||||
|
<u-form-item label="处理图片" prop="handlePics" borderBottom required labelPosition='top'>
|
||||||
|
<u-upload accept="image" :fileList="queItem.handlePics"
|
||||||
|
@afterRead="(e)=>afterRead(e,queItem)"
|
||||||
|
@delete="(e)=>deletePic(e,queItem)" name="handlePics" multiple
|
||||||
|
:maxCount="10"></u-upload>
|
||||||
|
</u-form-item>
|
||||||
|
<u-form-item label="处理视频" prop="handleVideos" borderBottom labelPosition='top'>
|
||||||
|
<u-upload accept="video" :fileList="queItem.handleVideos"
|
||||||
|
@afterRead="(e)=>afterRead(e,queItem)"
|
||||||
|
@delete="(e)=>deletePic(e,queItem)" name="handleVideos" multiple
|
||||||
|
:maxCount="10"></u-upload>
|
||||||
|
</u-form-item>
|
||||||
|
</view>
|
||||||
|
<u-button type="primary" text="提交" customStyle="margin-top: 50px" @click="submit"></u-button>
|
||||||
|
</u--form>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<u-calendar :show="show" mode="range" @confirm="confirm" @cancel='cancel'></u-calendar>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -75,6 +105,7 @@
|
||||||
customStyle: {
|
customStyle: {
|
||||||
background: '#000'
|
background: '#000'
|
||||||
},
|
},
|
||||||
|
queItem:{},
|
||||||
list: [{
|
list: [{
|
||||||
title: '5-29日常巡检',
|
title: '5-29日常巡检',
|
||||||
state: 0,
|
state: 0,
|
||||||
|
|
@ -92,7 +123,66 @@
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
onLoad(options) {
|
||||||
|
this.queItem = JSON.parse(options.item)
|
||||||
|
console.log(uni.getStorageSync('value'));
|
||||||
|
this.queItem.handleUserName = uni.getStorageSync('value').userName
|
||||||
|
this.queItem.handleTime = moment().format('YYYY-MM-DD HH:mm:ss')
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
submit(){
|
||||||
|
// /inspect/detail/handle
|
||||||
|
},
|
||||||
|
// 删除图片
|
||||||
|
deletePic(event, o) {
|
||||||
|
this.queItem[event.name].splice(event.index, 1)
|
||||||
|
},
|
||||||
|
// 新增图片
|
||||||
|
async afterRead(event, o) {
|
||||||
|
// let file
|
||||||
|
// 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
|
||||||
|
console.log(event,'2342132');
|
||||||
|
let lists = [].concat(event.file)
|
||||||
|
let fileListLen = this.queItem[event.name]?.length
|
||||||
|
lists.map((item) => {
|
||||||
|
this.queItem[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)
|
||||||
|
console.log(result);
|
||||||
|
let item = this.queItem[event.name][fileListLen]
|
||||||
|
this.queItem[event.name].splice(fileListLen, 1, Object.assign(item, {
|
||||||
|
status: 'success',
|
||||||
|
message: '',
|
||||||
|
...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(() => {
|
||||||
|
// this.listData[index].children[index1][name].push({...res.data.data,url:res.data.data.filePath})
|
||||||
|
console.log(res.data)
|
||||||
|
resolve(JSON.parse(res.data).data)
|
||||||
|
}, 1000)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// resolve(a)
|
||||||
|
})
|
||||||
|
},
|
||||||
confirm(e) {
|
confirm(e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
this.model.stm = e[0]
|
this.model.stm = e[0]
|
||||||
|
|
@ -161,17 +251,28 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
.itemCc{
|
||||||
|
// display: flex;
|
||||||
|
// justify-content: space-between;
|
||||||
|
// display: flex;
|
||||||
|
|
||||||
|
padding: 10px;
|
||||||
|
border-bottom: 1px solid #f0f0f0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.contentItem{
|
.contentItem{
|
||||||
.itemC{
|
.itemC{
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
display: flex;
|
display: flex;
|
||||||
color: #666666;
|
color: #303133;;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
border-bottom: 1px solid #f0f0f0;
|
border-bottom: 1px solid #f0f0f0;
|
||||||
}
|
}
|
||||||
.itemNo{
|
.itemNo{
|
||||||
color: #666666;
|
color: #303133;;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,45 +6,55 @@
|
||||||
}" :height='44' :safeAreaInsetTop=true leftIconSize='20' leftIconColor='rgb(153, 153, 153)'>
|
}" :height='44' :safeAreaInsetTop=true leftIconSize='20' leftIconColor='rgb(153, 153, 153)'>
|
||||||
</u-navbar>
|
</u-navbar>
|
||||||
<view class="" style="margin-top: 44px;;background-color: #f0f0f0;border-top: 1px solid #f0f0f0;">
|
<view class="" style="margin-top: 44px;;background-color: #f0f0f0;border-top: 1px solid #f0f0f0;">
|
||||||
<view style="display: flex;padding: 20px;background-color: #fff;align-items: center;">
|
<view style="padding:0 10px,backgroundColor:#fff">
|
||||||
<u--input v-model="model.stm" shape='circle' :customStyle="customStyle" placeholder="请选择开始时间"
|
<view class="time-ranger">
|
||||||
style="background-color: #f0f0f0;height: 30px;text-align: center;" border='none' @click="show = true;"></u--input>
|
<view class="start-time">
|
||||||
-
|
<text>开始时间</text>
|
||||||
<u--input v-model=" model.etm" shape='circle' placeholder="请选择结束时间"
|
<text @click="showTime=true" style="margin-left:15%;color:#3399ef">{{startTime}}</text>
|
||||||
style="background-color: #f0f0f0;height:30px;" border='none' @click="show = true;"></u--input>
|
</view>
|
||||||
<text>搜索</text>
|
<view class="end-time">
|
||||||
|
<text>结束时间</text>
|
||||||
|
<text @click="showTime1=true" style="margin:0 15%;color:#3399ef">{{endTime}}</text>
|
||||||
|
<view class="search-btn" @click="searchTm">
|
||||||
|
搜索
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="" v-for="item in list" style="margin: 10px;background-color: #fff;padding: 10px;">
|
<view class="" v-for="item in list" style="margin: 10px;background-color: #fff;padding: 10px;">
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<!-- {{item.title}} -->
|
<!-- {{item.title}} -->
|
||||||
<view class="title">
|
<view class="title">
|
||||||
{{item.title}}
|
{{item.taskTitle}}
|
||||||
</view>
|
</view>
|
||||||
<view class="titleRight" @click="toDetail(item)">
|
<view class="titleRight" @click="toDetail(item)">
|
||||||
<view class="border">
|
<view class="border">
|
||||||
待处理
|
{{isHandle==0?'已处理':'待处理'}}
|
||||||
</view>
|
</view>
|
||||||
<u-icon name="arrow-right" size="20"></u-icon>
|
<u-icon name="arrow-right" size="20"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="contentItem">
|
<view class="contentItem">
|
||||||
<view class="itemC">
|
<view class="itemC">
|
||||||
<text>巡检项</text>
|
<text>巡检项</text>
|
||||||
<text>{{item.xjx}}</text>
|
<text>{{item.itemDesc}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="itemC">
|
<view class="itemC">
|
||||||
<text>巡查人</text>
|
<text>巡查人</text>
|
||||||
<text>{{item.name}}</text>
|
<text>{{item.inspectUserName}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="itemC">
|
<view class="itemC">
|
||||||
<text>巡查时间</text>
|
<text>巡查时间</text>
|
||||||
<text>{{item.time}}</text>
|
<text>{{item.finishTime}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<u-calendar :show="show" mode="range" @confirm="confirm" @cancel='cancel'></u-calendar>
|
<u-datetime-picker :show="showTime" v-model="stm" mode="datetime" @confirm="showTime=false"
|
||||||
|
@cancel="showTime=false"></u-datetime-picker>
|
||||||
|
<u-datetime-picker :show="showTime1" v-model="etm" mode="datetime" @confirm="showTime1=false"
|
||||||
|
@cancel="showTime1=false"></u-datetime-picker>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -55,39 +65,53 @@
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
show: false,
|
show: false,
|
||||||
model: {
|
showTime:false,
|
||||||
stm: '',
|
showTime1:false,
|
||||||
etm: ''
|
start: '请选择开始时间',
|
||||||
},
|
end: '请选择结束时间',
|
||||||
|
stm:'',
|
||||||
|
etm:'',
|
||||||
customStyle: {
|
customStyle: {
|
||||||
background: '#000'
|
background: '#000'
|
||||||
},
|
},
|
||||||
list: [{
|
list: [
|
||||||
title: '5-29日常巡检',
|
|
||||||
state: 0,
|
|
||||||
xjx: '上游坝面、坝顶',
|
|
||||||
name: '王自荣',
|
|
||||||
time: '2024-05-30 09:31:23'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '5-29日常巡检',
|
|
||||||
state: 1,
|
|
||||||
xjx: '上游坝面、坝顶',
|
|
||||||
name: '王自荣',
|
|
||||||
time: '2024-05-30 09:31:23'
|
|
||||||
},
|
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
onLoad() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
computed:{
|
||||||
|
startTime:function (){
|
||||||
|
|
||||||
|
return this.stm?moment(this.stm).format('YYYY-MM-DD HH:mm:ss'):this.start
|
||||||
|
},
|
||||||
|
endTime:function (){
|
||||||
|
return this.etm?moment(this.etm).format('YYYY-MM-DD HH:mm:ss'):this.end
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// getList(){
|
searchTm(){
|
||||||
// uni.$http.post('/gunshiApp/xyt/stQxWarnR/home/warn',this.model).then(res=>{
|
this.getList()
|
||||||
|
},
|
||||||
// })
|
getList() {
|
||||||
// },
|
console.log(uni.getStorageSync('value'));
|
||||||
|
let params = {
|
||||||
|
"pageSo": {
|
||||||
|
"pageSize": 10,
|
||||||
|
"pageNumber": 1
|
||||||
|
},
|
||||||
|
"dateTimeRangeSo": {
|
||||||
|
start:this.stm?moment(this.stm).format('YYYY-MM-DD HH:mm:ss'):'',
|
||||||
|
end:this.etm?moment(this.etm).format('YYYY-MM-DD HH:mm:ss'):''
|
||||||
|
},
|
||||||
|
"isHandle": 0,
|
||||||
|
"inspectUserId": uni.getStorageSync('value').userId
|
||||||
|
}
|
||||||
|
uni.$http.post('/gunshiApp/xyt/inspect/detail/page', params).then(res => {
|
||||||
|
this.list=res.data.data.records
|
||||||
|
})
|
||||||
|
},
|
||||||
confirm(e) {
|
confirm(e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
this.model.start = e[0]
|
this.model.start = e[0]
|
||||||
|
|
@ -97,9 +121,9 @@
|
||||||
cancel() {
|
cancel() {
|
||||||
this.show = false
|
this.show = false
|
||||||
},
|
},
|
||||||
toDetail(){
|
toDetail(item) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/pages/wtcl/detail/index'
|
url: '/pages/wtcl/detail/index?item='+JSON.stringify(item)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -107,6 +131,22 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.time-ranger {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
|
||||||
|
.start-time,
|
||||||
|
.end-time {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 10px 0;
|
||||||
|
border-bottom: 1px solid #dfdfdf;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-btn {
|
||||||
|
margin: 3px 0 0 5px;
|
||||||
|
// color: #3399ef;
|
||||||
|
}
|
||||||
|
}
|
||||||
.myTitleStyle {
|
.myTitleStyle {
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
background-color: red;
|
background-color: red;
|
||||||
|
|
@ -138,6 +178,7 @@
|
||||||
|
|
||||||
.titleRight {
|
.titleRight {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
.border {
|
.border {
|
||||||
border-width: 0px;
|
border-width: 0px;
|
||||||
background-color: rgba(236, 245, 255, 1);
|
background-color: rgba(236, 245, 255, 1);
|
||||||
|
|
@ -155,8 +196,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
.contentItem{
|
|
||||||
.itemC{
|
.contentItem {
|
||||||
|
.itemC {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
<view class="skinfo">
|
<view class="skinfo">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<text>{{123}}</text>
|
<text>{{item.stnm}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="right">
|
<view class="right">
|
||||||
{{123}}
|
{{item.tm}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
{{k}}
|
{{k}}
|
||||||
</view>
|
</view>
|
||||||
<view class="bottom">
|
<view class="bottom">
|
||||||
{{v}}
|
{{item[k]}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -24,7 +24,12 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default{
|
export default{
|
||||||
|
props:{
|
||||||
|
item:{
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
list:{
|
list:{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue