新增的功能
parent
d63ffc1e9e
commit
6ea8ba5224
|
|
@ -20,7 +20,7 @@
|
|||
<u-icon name="bell-fill" size="30" color="#fff" @click="todetailmessgae()">
|
||||
|
||||
</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>
|
||||
</view>
|
||||
<!-- nav -->
|
||||
|
|
@ -53,12 +53,8 @@
|
|||
<span style="color: #59a7ff">{{ !level || !yjStatus ? '无' : level }}</span> -->
|
||||
<sk-info />
|
||||
</view>
|
||||
|
||||
<view class="warn">
|
||||
<ylz-list />
|
||||
</view>
|
||||
<view class="warn">
|
||||
<ylz-list />
|
||||
<view class="warn" v-for="item in Ylzlist">
|
||||
<ylz-list :item='item'/>
|
||||
</view>
|
||||
|
||||
<view class="info_24"
|
||||
|
|
@ -101,6 +97,7 @@
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
Ylzlist:[],
|
||||
monthDay: '',
|
||||
dayOfWeek: '',
|
||||
dataType,
|
||||
|
|
@ -186,7 +183,8 @@
|
|||
},
|
||||
interval: null,
|
||||
numPic: 0,
|
||||
allStatus: false
|
||||
allStatus: false,
|
||||
messagelist:[]
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
|
|
@ -355,6 +353,29 @@
|
|||
}
|
||||
},
|
||||
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() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/messageList/index'
|
||||
|
|
@ -793,6 +814,8 @@
|
|||
this.getOverview()
|
||||
this.getDataTime()
|
||||
this.getResponseLevel()
|
||||
this.getList()
|
||||
this.getYlzList()
|
||||
this.userList = uni.getStorageSync('value')
|
||||
console.log(this.userList.userName, uni.getStorageSync('value'), '=============777777');
|
||||
|
||||
|
|
|
|||
|
|
@ -11,24 +11,24 @@
|
|||
|
||||
<view class="itemC">
|
||||
<text>标题</text>
|
||||
<text>{{item.name}}</text>
|
||||
<text>{{item.title}}</text>
|
||||
</view>
|
||||
<view class="itemC">
|
||||
<text>发布时间</text>
|
||||
<text>{{item.time}}</text>
|
||||
<text>{{item.publishTime}}</text>
|
||||
</view>
|
||||
<view class="itemC">
|
||||
<text>发布人</text>
|
||||
<text>{{item.xjx}}</text>
|
||||
<text>{{item.publishUserName}}</text>
|
||||
</view>
|
||||
<view class="itemC">
|
||||
<!-- <view class="itemC">
|
||||
<text>优先级</text>
|
||||
<text>{{item.xjx}}</text>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<view class="itemNo" style="flex-direction: column;">
|
||||
<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>
|
||||
|
|
@ -52,17 +52,21 @@
|
|||
customStyle: {
|
||||
background: '#000'
|
||||
},
|
||||
list: [{
|
||||
title: '5-29日常巡检',
|
||||
state: 0,
|
||||
xjx: '上游坝面、坝顶',
|
||||
name: '王自荣',
|
||||
time: '2024-05-30 09:31:23'
|
||||
},
|
||||
list: [
|
||||
]
|
||||
};
|
||||
},
|
||||
onLoad(options){
|
||||
console.log(options);
|
||||
this.list.push(JSON.parse(options.item))
|
||||
this.yd(item)
|
||||
},
|
||||
methods: {
|
||||
yd(item){
|
||||
uni.$http.post('/gunshiApp/xyt/messageCenter/update').then(res => {
|
||||
|
||||
})
|
||||
},
|
||||
confirm(e) {
|
||||
console.log(e);
|
||||
this.model.stm = e[0]
|
||||
|
|
|
|||
|
|
@ -1,88 +1,119 @@
|
|||
<template>
|
||||
<view :style="{height:'100vh',overflow:'hidden',backgroundColor: '#f0f0f0'}">
|
||||
<u-status-bar></u-status-bar>
|
||||
<u-navbar title="预警" :autoBack="true" :titleStyle="{
|
||||
<u-navbar title="消息中心" :autoBack="true" :titleStyle="{
|
||||
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>
|
||||
<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;">
|
||||
<u--input v-model="model.stm" shape='circle' :customStyle="customStyle" placeholder="请选择开始时间"
|
||||
style="background-color: #f0f0f0;height: 30px;text-align: center;" border='none' @click="show = true;hideKeyboard()"></u--input>
|
||||
-
|
||||
<u--input v-model=" model.etm" shape='circle' placeholder="请选择结束时间"
|
||||
style="background-color: #f0f0f0;height: 30px;text-align: center;" border='none' @click="show = true;hideKeyboard()"></u--input>
|
||||
<text>搜索</text>
|
||||
<view style="padding:0 10px,backgroundColor:#fff">
|
||||
<view class="time-ranger">
|
||||
<view class="start-time">
|
||||
<text>开始时间</text>
|
||||
<text @click="showTime=true" style="margin-left:15%;color:#3399ef">{{startTime}}</text>
|
||||
</view>
|
||||
<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 class="" v-for="item in list" style="margin: 10px;background-color: #fff;padding: 10px;">
|
||||
<view class="item">
|
||||
<view class="align-center">
|
||||
<view class="blueTiao">
|
||||
|
||||
|
||||
</view>
|
||||
<view class="title">
|
||||
{{item.title}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="titleRight" @click="toDetail(item)">
|
||||
2024-05-30 09:31:23
|
||||
{{item.publishTime}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="contentItem">
|
||||
<view class="itemC">
|
||||
管理局2024年第2季度考核已经开始,请您进行上传自评结果。请您进行上传自评结果。请您进行上传自评结果。请您进行上传自评结果。
|
||||
{{item.content}}
|
||||
</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>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import moment from 'moment'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
model: {
|
||||
stm: '',
|
||||
etm: ''
|
||||
},
|
||||
showTime:false,
|
||||
showTime1:false,
|
||||
start: '请选择开始时间',
|
||||
end: '请选择结束时间',
|
||||
stm:'',
|
||||
etm:'',
|
||||
userList: uni.getStorageSync('value').data,
|
||||
customStyle: {
|
||||
background: '#000'
|
||||
},
|
||||
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'
|
||||
},
|
||||
]
|
||||
list: []
|
||||
};
|
||||
},
|
||||
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: {
|
||||
// getList(){
|
||||
// uni.$http.post('/gunshiApp/xyt/stQxWarnR/home/warn',this.model).then(res=>{
|
||||
|
||||
// })
|
||||
// },
|
||||
rightClick() {
|
||||
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) {
|
||||
console.log(e);
|
||||
this.model.start = e[0]
|
||||
|
|
@ -92,9 +123,10 @@
|
|||
cancel() {
|
||||
this.show = false
|
||||
},
|
||||
toDetail(){
|
||||
toDetail(item) {
|
||||
console.log(item);
|
||||
uni.navigateTo({
|
||||
url:'/pages/messageList/detail/index'
|
||||
url: '/pages/messageList/detail/index?item=' + JSON.stringify(item),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
@ -102,9 +134,27 @@
|
|||
</script>
|
||||
|
||||
<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;
|
||||
}
|
||||
|
||||
.myTitleStyle {
|
||||
font-size: 30px;
|
||||
background-color: red;
|
||||
|
|
@ -125,13 +175,15 @@
|
|||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.blueTiao{
|
||||
|
||||
.blueTiao {
|
||||
background-color: #2a7efa;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.title {
|
||||
border-width: 0px;
|
||||
font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑', sans-serif;
|
||||
|
|
@ -143,6 +195,7 @@
|
|||
|
||||
.titleRight {
|
||||
display: flex;
|
||||
|
||||
.border {
|
||||
border-width: 0px;
|
||||
background-color: rgba(236, 245, 255, 1);
|
||||
|
|
@ -160,8 +213,9 @@
|
|||
}
|
||||
|
||||
}
|
||||
.contentItem{
|
||||
.itemC{
|
||||
|
||||
.contentItem {
|
||||
.itemC {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
display: flex;
|
||||
|
|
|
|||
|
|
@ -1,45 +1,45 @@
|
|||
<template>
|
||||
<view :style="{height:'100vh',overflow:'hidden'}">
|
||||
<view :style="{height:'100vh',overflow:'auto'}">
|
||||
<u-status-bar></u-status-bar>
|
||||
<u-navbar title="预警" :autoBack="true" :titleStyle="{
|
||||
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;">
|
||||
<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="blueTiao">
|
||||
|
||||
</view>
|
||||
<view class="title">
|
||||
{{item.title}}
|
||||
巡检问题信息
|
||||
</view>
|
||||
</view>
|
||||
<view class="contentItem">
|
||||
|
||||
<view class="itemC">
|
||||
<text>巡查人</text>
|
||||
<text>{{item.name}}</text>
|
||||
<text>{{queItem.inspectUserName}}</text>
|
||||
</view>
|
||||
<view class="itemC">
|
||||
<text>巡查时间</text>
|
||||
<text>{{item.time}}</text>
|
||||
<text>{{queItem.finishTime}}</text>
|
||||
</view>
|
||||
<view class="itemC">
|
||||
<text>任务标题</text>
|
||||
<text>{{item.xjx}}</text>
|
||||
<text>{{queItem.taskTitle}}</text>
|
||||
</view>
|
||||
<view class="itemC">
|
||||
<text>巡检点</text>
|
||||
<text>{{item.xjx}}</text>
|
||||
<text>{{queItem.name}}</text>
|
||||
</view>
|
||||
<view class="itemC">
|
||||
<text>巡检项</text>
|
||||
<text>{{item.xjx}}</text>
|
||||
<text>{{queItem.itemDesc}}</text>
|
||||
</view>
|
||||
<view class="itemNo" style="flex-direction: column;">
|
||||
<text>巡检问题描述</text>
|
||||
<u--textarea v-model="item.xjx" placeholder="请输入内容" disabled ></u--textarea>
|
||||
<u--textarea v-model="queItem.problemDesc" placeholder="请输入内容" disabled ></u--textarea>
|
||||
</view>
|
||||
<view class="itemNo" style="flex-direction: column;">
|
||||
<text>巡检图片</text>
|
||||
|
|
@ -55,9 +55,39 @@
|
|||
</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>
|
||||
<u-calendar :show="show" mode="range" @confirm="confirm" @cancel='cancel'></u-calendar>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -75,6 +105,7 @@
|
|||
customStyle: {
|
||||
background: '#000'
|
||||
},
|
||||
queItem:{},
|
||||
list: [{
|
||||
title: '5-29日常巡检',
|
||||
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: {
|
||||
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) {
|
||||
console.log(e);
|
||||
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{
|
||||
.itemC{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
display: flex;
|
||||
color: #666666;
|
||||
color: #303133;;
|
||||
padding: 10px;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
}
|
||||
.itemNo{
|
||||
color: #666666;
|
||||
color: #303133;;
|
||||
padding: 10px;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,45 +6,55 @@
|
|||
}" :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;">
|
||||
<view style="display: flex;padding: 20px;background-color: #fff;align-items: center;">
|
||||
<u--input v-model="model.stm" shape='circle' :customStyle="customStyle" placeholder="请选择开始时间"
|
||||
style="background-color: #f0f0f0;height: 30px;text-align: center;" border='none' @click="show = true;"></u--input>
|
||||
-
|
||||
<u--input v-model=" model.etm" shape='circle' placeholder="请选择结束时间"
|
||||
style="background-color: #f0f0f0;height:30px;" border='none' @click="show = true;"></u--input>
|
||||
<text>搜索</text>
|
||||
<view style="padding:0 10px,backgroundColor:#fff">
|
||||
<view class="time-ranger">
|
||||
<view class="start-time">
|
||||
<text>开始时间</text>
|
||||
<text @click="showTime=true" style="margin-left:15%;color:#3399ef">{{startTime}}</text>
|
||||
</view>
|
||||
<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 class="" v-for="item in list" style="margin: 10px;background-color: #fff;padding: 10px;">
|
||||
<view class="item">
|
||||
<!-- {{item.title}} -->
|
||||
<view class="title">
|
||||
{{item.title}}
|
||||
{{item.taskTitle}}
|
||||
</view>
|
||||
<view class="titleRight" @click="toDetail(item)">
|
||||
<view class="border">
|
||||
待处理
|
||||
{{isHandle==0?'已处理':'待处理'}}
|
||||
</view>
|
||||
<u-icon name="arrow-right" size="20"></u-icon>
|
||||
<u-icon name="arrow-right" size="20"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="contentItem">
|
||||
<view class="itemC">
|
||||
<text>巡检项</text>
|
||||
<text>{{item.xjx}}</text>
|
||||
<text>{{item.itemDesc}}</text>
|
||||
</view>
|
||||
<view class="itemC">
|
||||
<text>巡查人</text>
|
||||
<text>{{item.name}}</text>
|
||||
<text>{{item.inspectUserName}}</text>
|
||||
</view>
|
||||
<view class="itemC">
|
||||
<text>巡查时间</text>
|
||||
<text>{{item.time}}</text>
|
||||
<text>{{item.finishTime}}</text>
|
||||
</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>
|
||||
</template>
|
||||
|
||||
|
|
@ -55,39 +65,53 @@
|
|||
data() {
|
||||
return {
|
||||
show: false,
|
||||
model: {
|
||||
stm: '',
|
||||
etm: ''
|
||||
},
|
||||
showTime:false,
|
||||
showTime1:false,
|
||||
start: '请选择开始时间',
|
||||
end: '请选择结束时间',
|
||||
stm:'',
|
||||
etm:'',
|
||||
customStyle: {
|
||||
background: '#000'
|
||||
},
|
||||
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'
|
||||
},
|
||||
list: [
|
||||
]
|
||||
};
|
||||
},
|
||||
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: {
|
||||
// getList(){
|
||||
// uni.$http.post('/gunshiApp/xyt/stQxWarnR/home/warn',this.model).then(res=>{
|
||||
|
||||
// })
|
||||
// },
|
||||
searchTm(){
|
||||
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) {
|
||||
console.log(e);
|
||||
this.model.start = e[0]
|
||||
|
|
@ -97,9 +121,9 @@
|
|||
cancel() {
|
||||
this.show = false
|
||||
},
|
||||
toDetail(){
|
||||
toDetail(item) {
|
||||
uni.navigateTo({
|
||||
url:'/pages/wtcl/detail/index'
|
||||
url: '/pages/wtcl/detail/index?item='+JSON.stringify(item)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
@ -107,6 +131,22 @@
|
|||
</script>
|
||||
|
||||
<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 {
|
||||
font-size: 30px;
|
||||
background-color: red;
|
||||
|
|
@ -138,6 +178,7 @@
|
|||
|
||||
.titleRight {
|
||||
display: flex;
|
||||
|
||||
.border {
|
||||
border-width: 0px;
|
||||
background-color: rgba(236, 245, 255, 1);
|
||||
|
|
@ -155,8 +196,9 @@
|
|||
}
|
||||
|
||||
}
|
||||
.contentItem{
|
||||
.itemC{
|
||||
|
||||
.contentItem {
|
||||
.itemC {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
display: flex;
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
<view class="skinfo">
|
||||
<view class="title">
|
||||
<view class="left">
|
||||
<text>{{123}}</text>
|
||||
<text>{{item.stnm}}</text>
|
||||
</view>
|
||||
<view class="right">
|
||||
{{123}}
|
||||
{{item.tm}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="content">
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
{{k}}
|
||||
</view>
|
||||
<view class="bottom">
|
||||
{{v}}
|
||||
{{item[k]}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -24,7 +24,12 @@
|
|||
|
||||
<script>
|
||||
export default{
|
||||
|
||||
props:{
|
||||
item:{
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
list:{
|
||||
|
|
|
|||
Loading…
Reference in New Issue