mirror of
https://gitee.com/java110/PropertyApp.git
synced 2026-02-23 21:36:39 +08:00
optimize
This commit is contained in:
parent
1e83de6e57
commit
26d44d2490
@ -4,40 +4,40 @@
|
|||||||
巡检任务(补检)
|
巡检任务(补检)
|
||||||
</view>
|
</view>
|
||||||
<view class="cu-form-group arrow" >
|
<view class="cu-form-group arrow" >
|
||||||
<view class="title">补检日期</view>
|
<view class="title" style="width: 200upx;">补检日期</view>
|
||||||
<uni-datetime-picker type="date" :clear-icon="false" v-model="planInsTime" @change="maskClick" :border="false"/>
|
<uni-datetime-picker type="date" :clear-icon="false" v-model="planInsTime" @change="maskClick" :border="false"/>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="noData==false">
|
<view v-if="tasks && tasks.length>0" class="margin-top">
|
||||||
<view v-for="(item,index) in tasks" :key="index" class="bg-white margin-bottom margin-right-xs radius margin-left-xs padding-top padding-left padding-right">
|
<view v-for="(item,index) in tasks" :key="index" class="bg-white margin-bottom margin-right-xs radius margin-left-xs padding-top padding-left padding-right">
|
||||||
<view class="flex padding-bottom-xs solid-bottom justify-between">
|
<view class="flex padding-bottom-xs solid-bottom justify-between">
|
||||||
<view>{{item.taskId}}</view>
|
<view>{{item.taskId}}</view>
|
||||||
<view class="text-gray">{{item.stateName}}</view>
|
<view class="text-gray">{{item.stateName}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="flex margin-top justify-between">
|
||||||
|
<view class="text-gray">巡检计划</view>
|
||||||
|
<view class="text-gray">{{item.inspectionPlanName}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="flex margin-top-xs justify-between">
|
||||||
|
<view class="text-gray">计划编码</view>
|
||||||
|
<view class="text-gray">{{item.inspectionPlanId}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="flex margin-top-xs justify-between">
|
||||||
|
<view class="text-gray">巡检人</view>
|
||||||
|
<view class="text-gray">{{item.planUserName}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="flex margin-top-xs justify-between">
|
||||||
|
<view class="text-gray">巡检时间</view>
|
||||||
|
<view class="text-gray">{{item.planInsTime }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="flex margin-top-xs justify-between">
|
||||||
|
<view class="text-gray">巡检方式</view>
|
||||||
|
<view class="text-gray">{{item.signTypeName}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="solid-top flex justify-end margin-top padding-top-sm padding-bottom-sm">
|
||||||
|
<!-- <button class="cu-btn sm bg-blue margin-left" @click="_transferInspection(item)">流转</button> -->
|
||||||
|
<button class="cu-btn sm bg-green margin-left" @click="_startInspection(item)">补检</button>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex margin-top justify-between">
|
|
||||||
<view class="text-gray">巡检计划</view>
|
|
||||||
<view class="text-gray">{{item.inspectionPlanName}}</view>
|
|
||||||
</view>
|
|
||||||
<view class="flex margin-top-xs justify-between">
|
|
||||||
<view class="text-gray">计划编码</view>
|
|
||||||
<view class="text-gray">{{item.inspectionPlanId}}</view>
|
|
||||||
</view>
|
|
||||||
<view class="flex margin-top-xs justify-between">
|
|
||||||
<view class="text-gray">巡检人</view>
|
|
||||||
<view class="text-gray">{{item.planUserName}}</view>
|
|
||||||
</view>
|
|
||||||
<view class="flex margin-top-xs justify-between">
|
|
||||||
<view class="text-gray">巡检时间</view>
|
|
||||||
<view class="text-gray">{{item.planInsTime }}</view>
|
|
||||||
</view>
|
|
||||||
<view class="flex margin-top-xs justify-between">
|
|
||||||
<view class="text-gray">巡检方式</view>
|
|
||||||
<view class="text-gray">{{item.signTypeName}}</view>
|
|
||||||
</view>
|
|
||||||
<view class="solid-top flex justify-end margin-top padding-top-sm padding-bottom-sm">
|
|
||||||
<!-- <button class="cu-btn sm bg-blue margin-left" @click="_transferInspection(item)">流转</button> -->
|
|
||||||
<button class="cu-btn sm bg-green margin-left" @click="_startInspection(item)">补检</button>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view v-else>
|
<view v-else>
|
||||||
<no-data-page></no-data-page>
|
<no-data-page></no-data-page>
|
||||||
@ -82,13 +82,6 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
_startInspection:function(_item){
|
_startInspection:function(_item){
|
||||||
// if(dateUtil.compareDate(_item.planInsTime.replace(/-/g, '/'), dateUtil.getCurrentDateTime().replace(/-/g, '/'))){
|
|
||||||
// uni.showToast({
|
|
||||||
// title: "尚未开始",
|
|
||||||
// icon: "none"
|
|
||||||
// });
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
console.log('开始巡检',_item);
|
console.log('开始巡检',_item);
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/pages/excuteInspection/excuteInspection?taskId='+_item.taskId+'&inspectionPlanName='+_item.inspectionPlanName
|
url:'/pages/excuteInspection/excuteInspection?taskId='+_item.taskId+'&inspectionPlanName='+_item.inspectionPlanName
|
||||||
@ -96,7 +89,6 @@
|
|||||||
},
|
},
|
||||||
_queryInstpectionTasks: function() {
|
_queryInstpectionTasks: function() {
|
||||||
let _that = this;
|
let _that = this;
|
||||||
|
|
||||||
_that.java110Context.request({
|
_that.java110Context.request({
|
||||||
header: _that.java110Context.getHeaders(),
|
header: _that.java110Context.getHeaders(),
|
||||||
url: url.listInspectionTasks,
|
url: url.listInspectionTasks,
|
||||||
@ -104,17 +96,17 @@
|
|||||||
data: {
|
data: {
|
||||||
communityId: _that.communityId,
|
communityId: _that.communityId,
|
||||||
page: 1,
|
page: 1,
|
||||||
row: 10,
|
row: 20,
|
||||||
planUserId: _that.userId,
|
planUserId: _that.userId,
|
||||||
moreState:'20200405,20200406',
|
moreState:'20200405,20200406',
|
||||||
canReexamine:'2000',
|
canReexamine:'2000',
|
||||||
planInsTime: _that.planInsTime,
|
planInsTime: _that.planInsTime,
|
||||||
isToday: 1
|
//isToday: 1
|
||||||
},
|
},
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
// TODO 判断
|
// TODO 判断
|
||||||
console.log(res);
|
console.log(res);
|
||||||
res.data.inspectionTasks.forEach(function(item, index) {
|
res.data.inspectionTasks.forEach(item => {
|
||||||
item.timeStr = item.planInsTime.replace(/:\d{1,2}$/, ' ');
|
item.timeStr = item.planInsTime.replace(/:\d{1,2}$/, ' ');
|
||||||
});
|
});
|
||||||
_that.tasks = res.data.inspectionTasks;
|
_that.tasks = res.data.inspectionTasks;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user