mirror of
https://gitee.com/java110/PropertyApp.git
synced 2026-06-12 10:00:57 +08:00
巡检优化完成
This commit is contained in:
parent
34eceaa486
commit
054ecbf25d
@ -81,7 +81,7 @@
|
|||||||
"disableHostCheck" : true,
|
"disableHostCheck" : true,
|
||||||
"proxy" : {
|
"proxy" : {
|
||||||
"/app" : {
|
"/app" : {
|
||||||
"target" : "https://app.demo.winqi.cn", //目标接口域名
|
"target" : "http://192.168.1.16:8012", //目标接口域名https://app.demo.winqi.cn
|
||||||
"changeOrigin" : true, //是否跨域
|
"changeOrigin" : true, //是否跨域
|
||||||
"secure" : true // 设置支持https协议的代理
|
"secure" : true // 设置支持https协议的代理
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,15 +3,26 @@
|
|||||||
<view class="block__title">{{inspectionPlanName}}</view>
|
<view class="block__title">{{inspectionPlanName}}</view>
|
||||||
<view class="cu-timeline margin-left-xs margin-right-xs">
|
<view class="cu-timeline margin-left-xs margin-right-xs">
|
||||||
<view class="cu-time">巡检点</view>
|
<view class="cu-time">巡检点</view>
|
||||||
<view class="cu-item cuIcon-noticefill" :class="(item.state == '20200407'?'text-green':'')" v-for="(item,index) in taskDetails" :key="index">
|
<view class="cu-item cuIcon-noticefill" :class="(item.state == '20200407'?'text-green':'')" v-for="(item,index) in taskDetails"
|
||||||
|
:key="index">
|
||||||
<view class="content shadow-blur" :class="(item.state == '20200407'?'bg-green':'')">
|
<view class="content shadow-blur" :class="(item.state == '20200407'?'bg-green':'')">
|
||||||
{{item.inspectionName}}
|
{{item.inspectionName}}
|
||||||
</view>
|
</view>
|
||||||
|
<view class="bg-green content" v-if="item.state == '20200407'">
|
||||||
|
<text>处理意见:</text> {{item.description}}
|
||||||
|
</view>
|
||||||
|
<view class="margin-top grid text-center col-3 grid-square" v-if="item.state == '20200407' && item.photos.length > 0">
|
||||||
|
<view class="" v-for="(_itemc,index) in item.photos" :key="index">
|
||||||
|
<image mode="scaleToFill" :data-url="srcPath+_itemc.url" :src="srcPath+_itemc.url" @tap="preview(srcPath+_itemc.url)"></image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
<view class="text-right" v-if="item.state != '20200407'">
|
<view class="text-right" v-if="item.state != '20200407'">
|
||||||
<button class="cu-btn line-green block margin-tb-sm lg " @click="_excuteInspection(item)">
|
<button class="cu-btn line-green block margin-tb-sm lg " @click="_excuteInspection(item)">
|
||||||
<text class="cuIcon-upload"></text>巡检</button>
|
<text class="cuIcon-upload"></text>巡检</button>
|
||||||
</view>
|
</view>
|
||||||
<view v-else class="margin-top-sm margin-right grid text-center col-3 grid-square">
|
<view class="margin-top-sm margin-right grid text-center col-3 grid-square">
|
||||||
<view class="" v-for="(_item,index) in item.photos" :key="index">
|
<view class="" v-for="(_item,index) in item.photos" :key="index">
|
||||||
<image mode="scaleToFill" :src="_item.url" @tap="preview(_item.url)"></image>
|
<image mode="scaleToFill" :src="_item.url" @tap="preview(_item.url)"></image>
|
||||||
</view>
|
</view>
|
||||||
@ -38,21 +49,23 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
taskId:'',
|
srcPath: '',
|
||||||
inspectionPlanName:'',
|
taskId: '',
|
||||||
|
inspectionPlanName: '',
|
||||||
scroll: 0,
|
scroll: 0,
|
||||||
communityId:'',
|
communityId: '',
|
||||||
userId:'',
|
userId: '',
|
||||||
userName:'',
|
userName: '',
|
||||||
taskDetails:[],
|
taskDetails: [],
|
||||||
viewImage:false,
|
viewImage: false,
|
||||||
viewImageSrc:''
|
viewImageSrc: ''
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
this.taskId = options.taskId;
|
this.taskId = options.taskId;
|
||||||
this.inspectionPlanName = options.inspectionPlanName;
|
this.inspectionPlanName = options.inspectionPlanName;
|
||||||
|
this.srcPath = this.java110Constant.url.hcBaseUrl;
|
||||||
this.communityId = this.java110Context.getCurrentCommunity().communityId;
|
this.communityId = this.java110Context.getCurrentCommunity().communityId;
|
||||||
let _userInfo = this.java110Context.getUserInfo();
|
let _userInfo = this.java110Context.getUserInfo();
|
||||||
this.userName = _userInfo.userName;
|
this.userName = _userInfo.userName;
|
||||||
@ -63,7 +76,7 @@
|
|||||||
this._queryTaskDetail();
|
this._queryTaskDetail();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
_queryTaskDetail:function(){
|
_queryTaskDetail: function() {
|
||||||
let _that = this;
|
let _that = this;
|
||||||
|
|
||||||
_that.java110Context.request({
|
_that.java110Context.request({
|
||||||
@ -73,7 +86,8 @@
|
|||||||
data: {
|
data: {
|
||||||
communityId: _that.communityId,
|
communityId: _that.communityId,
|
||||||
page: 1,
|
page: 1,
|
||||||
row: 100
|
row: 100,
|
||||||
|
taskId: _that.taskId
|
||||||
},
|
},
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
// TODO 判断
|
// TODO 判断
|
||||||
@ -82,8 +96,8 @@
|
|||||||
// item.timeStr = item.planInsTime.replace(/:\d{1,2}$/, ' ');
|
// item.timeStr = item.planInsTime.replace(/:\d{1,2}$/, ' ');
|
||||||
// });
|
// });
|
||||||
let _inspectionTaskDetails = res.data.inspectionTaskDetails;
|
let _inspectionTaskDetails = res.data.inspectionTaskDetails;
|
||||||
_inspectionTaskDetails.forEach(function(_item){
|
_inspectionTaskDetails.forEach(function(_item) {
|
||||||
if(_item.state == '20200407'){
|
if (_item.state == '20200407') {
|
||||||
_item.photos.forEach(function(_photoTmp) {
|
_item.photos.forEach(function(_photoTmp) {
|
||||||
_photoTmp.url = _that.java110Constant.url.hcBaseUrl + _photoTmp.url;
|
_photoTmp.url = _that.java110Constant.url.hcBaseUrl + _photoTmp.url;
|
||||||
});
|
});
|
||||||
@ -96,12 +110,13 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
ScrollSteps() {
|
ScrollSteps() {
|
||||||
this.scroll= this.scroll == 9 ? 0 : this.scroll + 1
|
this.scroll = this.scroll == 9 ? 0 : this.scroll + 1
|
||||||
},
|
},
|
||||||
_excuteInspection:function(_item){
|
_excuteInspection: function(_item) {
|
||||||
console.log('巡检点',_item);
|
console.log('巡检点', _item);
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/pages/excuteOneInspection/excuteOneInspection?taskDetailId='+_item.taskDetailId+"&taskId="+_item.taskId+"&inspectionId="+_item.inspectionId+"&inspectionName="+_item.inspectionName
|
url: '/pages/excuteOneInspection/excuteOneInspection?taskDetailId=' + _item.taskDetailId + "&taskId=" + _item.taskId +
|
||||||
|
"&inspectionId=" + _item.inspectionId + "&inspectionName=" + _item.inspectionName
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
preview: function(_src) {
|
preview: function(_src) {
|
||||||
@ -120,8 +135,7 @@
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: rgba(69,90,100,.6);
|
color: rgba(69, 90, 100, .6);
|
||||||
padding: 40rpx 30rpx 20rpx;
|
padding: 40rpx 30rpx 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -82,7 +82,7 @@
|
|||||||
this.patrolType = this.patrolTypes[e.detail.value];
|
this.patrolType = this.patrolTypes[e.detail.value];
|
||||||
},
|
},
|
||||||
removePhoto: function(e) {
|
removePhoto: function(e) {
|
||||||
console.log(e.detail.index);
|
console.log(e);
|
||||||
let _imgList = [];
|
let _imgList = [];
|
||||||
this.imgList.forEach(function(item, index) {
|
this.imgList.forEach(function(item, index) {
|
||||||
if (index != e.detail.index) {
|
if (index != e.detail.index) {
|
||||||
|
|||||||
@ -70,6 +70,7 @@
|
|||||||
page: 1,
|
page: 1,
|
||||||
row: 10,
|
row: 10,
|
||||||
planUserId: _that.userId,
|
planUserId: _that.userId,
|
||||||
|
moreState:'20200405,20200406'
|
||||||
|
|
||||||
},
|
},
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user