220 lines
4.7 KiB
Vue
220 lines
4.7 KiB
Vue
|
|
<template>
|
||
|
|
<view :style="{height:'100vh',overflow:'hidden'}">
|
||
|
|
<u-status-bar></u-status-bar>
|
||
|
|
<u-navbar :title="taskTitle" :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; height:calc(100vh - 44px)">
|
||
|
|
<view style="margin: 10px;background-color: #fff;padding: 10px;">
|
||
|
|
<view class="item">
|
||
|
|
<view class="blueTiao"></view>
|
||
|
|
<view class="title">
|
||
|
|
基本信息
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
<view class="contentItem">
|
||
|
|
<view class="itemC">
|
||
|
|
<text>任务标题1</text>
|
||
|
|
<text>{{taskTitle}}</text>
|
||
|
|
</view>
|
||
|
|
<view class="itemC">
|
||
|
|
<text>任务类型11</text>
|
||
|
|
<text>{{taskType == 1 ? "日常巡查" : taskType == 2 ? "特别检查" : taskType == 3 ? "汛前巡检" : '' }}</text>
|
||
|
|
</view>
|
||
|
|
<view class="itemC">
|
||
|
|
<text>任务内容</text>
|
||
|
|
<text>{{taskContent ? taskContent : ''}}</text>
|
||
|
|
</view>
|
||
|
|
<view class="itemC">
|
||
|
|
<text>开始日期</text>
|
||
|
|
<text>{{startDate}}</text>
|
||
|
|
</view>
|
||
|
|
<view class="itemC">
|
||
|
|
<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 class="item">
|
||
|
|
<view class="blueTiao"></view>
|
||
|
|
<view class="title">
|
||
|
|
巡检项
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
<view class="contentItem">
|
||
|
|
<db-form :xjItem="xjItem"></db-form>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</view>
|
||
|
|
</template>
|
||
|
|
|
||
|
|
<script>
|
||
|
|
import moment from 'moment'
|
||
|
|
import DbForm from './dbForm.vue'
|
||
|
|
export default {
|
||
|
|
components:{
|
||
|
|
DbForm
|
||
|
|
},
|
||
|
|
data() {
|
||
|
|
return {
|
||
|
|
taskTitle:'',
|
||
|
|
taskType:'',
|
||
|
|
taskContent:'',
|
||
|
|
startDate:'',
|
||
|
|
endDate:'',
|
||
|
|
status:'',
|
||
|
|
id:'',
|
||
|
|
btnStatus: 0,
|
||
|
|
xjItem:[],
|
||
|
|
list:["正常","异常"],
|
||
|
|
current:3
|
||
|
|
};
|
||
|
|
},
|
||
|
|
mounted() {
|
||
|
|
this.startXc()
|
||
|
|
},
|
||
|
|
methods: {
|
||
|
|
// 开始巡查
|
||
|
|
async startXc(){
|
||
|
|
try {
|
||
|
|
this.btnStatus = 1;
|
||
|
|
this.getXjItem(this.id)
|
||
|
|
} catch (error) {
|
||
|
|
uni.$showMsg();
|
||
|
|
}
|
||
|
|
},
|
||
|
|
// 获取巡查项
|
||
|
|
async getXjItem(id){
|
||
|
|
try {
|
||
|
|
const {data} = await uni.$http.get(`/gunshiApp/xyt/inspect/detail/info?taskId=${id}`)
|
||
|
|
if(data.code == 200){
|
||
|
|
this.xjItem = data.data
|
||
|
|
}
|
||
|
|
} catch (error) {
|
||
|
|
uni.$showMsg();
|
||
|
|
}
|
||
|
|
},
|
||
|
|
change(e){
|
||
|
|
this.current = e;
|
||
|
|
}
|
||
|
|
},
|
||
|
|
onLoad(option){
|
||
|
|
this.taskTitle = option.taskTitle
|
||
|
|
this.taskType = JSON.parse(option.taskType)
|
||
|
|
this.taskContent = JSON.parse(option.taskContent)
|
||
|
|
this.startDate = (option.startDate)
|
||
|
|
this.endDate = option.endDate == "null" ? "" : option.endDate
|
||
|
|
this.status = option.status
|
||
|
|
this.id = option.id
|
||
|
|
}
|
||
|
|
}
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<style lang="scss" scoped>
|
||
|
|
.myTitleStyle {
|
||
|
|
font-size: 30px;
|
||
|
|
background-color: red;
|
||
|
|
height: 200px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.tabsClass {
|
||
|
|
margin-top: 44px;
|
||
|
|
height: 44px;
|
||
|
|
padding: 0 40px;
|
||
|
|
border-top: 1px solid #eee;
|
||
|
|
border-bottom: 1px solid #eee;
|
||
|
|
}
|
||
|
|
|
||
|
|
.item {
|
||
|
|
|
||
|
|
padding-bottom: 10px;
|
||
|
|
display: flex;
|
||
|
|
align-items: center;
|
||
|
|
// justify-content: space-between;
|
||
|
|
.blueTiao{
|
||
|
|
background-color: #007aff;
|
||
|
|
width: 5px;
|
||
|
|
height: 16px;
|
||
|
|
margin-right: 10px;
|
||
|
|
}
|
||
|
|
.title {
|
||
|
|
border-width: 0px;
|
||
|
|
font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑', sans-serif;
|
||
|
|
font-weight: 700;
|
||
|
|
font-style: normal;
|
||
|
|
font-size: 15px;
|
||
|
|
color: #666666
|
||
|
|
}
|
||
|
|
|
||
|
|
.titleRight {
|
||
|
|
display: flex;
|
||
|
|
.border {
|
||
|
|
border-width: 0px;
|
||
|
|
background-color: rgba(236, 245, 255, 1);
|
||
|
|
box-sizing: border-box;
|
||
|
|
border-width: 1px;
|
||
|
|
border-style: solid;
|
||
|
|
border-color: rgba(187, 220, 255, 1);
|
||
|
|
border-radius: 5px;
|
||
|
|
box-shadow: none;
|
||
|
|
width: 58px;
|
||
|
|
height: 25px;
|
||
|
|
color: #689FFF;
|
||
|
|
text-align: center;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
.contentItem{
|
||
|
|
.itemC{
|
||
|
|
display: flex;
|
||
|
|
justify-content: space-between;
|
||
|
|
display: flex;
|
||
|
|
color: #666666;
|
||
|
|
padding: 10px;
|
||
|
|
border-bottom: 1px solid #f0f0f0;
|
||
|
|
}
|
||
|
|
.itemNo{
|
||
|
|
color: #666666;
|
||
|
|
padding: 10px;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
.circle-btn{
|
||
|
|
width: 120px;
|
||
|
|
height: 120px;
|
||
|
|
background-color: #007aff;
|
||
|
|
border-radius: 50%;
|
||
|
|
color:#fff;
|
||
|
|
text-align: center;
|
||
|
|
line-height: 120px;
|
||
|
|
}
|
||
|
|
.yuandian{
|
||
|
|
display: inline-block;
|
||
|
|
width: 10px;
|
||
|
|
height: 10px;
|
||
|
|
background-color: #409eff;
|
||
|
|
border-radius: 50%;
|
||
|
|
margin-right: 10px;
|
||
|
|
}
|
||
|
|
.xj-content{
|
||
|
|
height: 300px;
|
||
|
|
overflow-y: auto;
|
||
|
|
}
|
||
|
|
.xj-text{
|
||
|
|
margin-left: 10%;
|
||
|
|
margin-top: 2%;
|
||
|
|
}
|
||
|
|
.subsectioin{
|
||
|
|
display: flex;
|
||
|
|
column-gap: 10px;
|
||
|
|
align-items: center;
|
||
|
|
margin-top: 10px;
|
||
|
|
}
|
||
|
|
</style>
|