排查详情表单禁用处理

main
limingtao 11 months ago
parent a9feca0131
commit 7ec85a3de7
  1. 48
      pages/investigation/task.vue

@ -162,12 +162,11 @@
<view class="point"> <view class="point">
<view class="title">重点排查</view> <view class="title">重点排查</view>
<view class='row' style="display: flex; flex-wrap: wrap; justify-content: space-between;"> <view class='row' style="display: flex; flex-wrap: wrap; justify-content: space-between;">
<view style="width: 300rpx;" v-for="item in investigationSelectList" :key="item" <view style="width: 300rpx;" v-for="item in investigationSelectList" :key="item">
>
<view class="item">{{ item.name }}</view> <view class="item">{{ item.name }}</view>
</view> </view>
<view style="width: 300rpx;"> <view style="width: 300rpx;" v-show="type!='view'">
<view class="item add" @click="showInvestigation = true"> <view class="item add" @click="showInvestigation = true">
<uni-icons type="plusempty" size="24" style="margin-right: 10rpx; color: #2663bf" /> <uni-icons type="plusempty" size="24" style="margin-right: 10rpx; color: #2663bf" />
新增排查 新增排查
@ -176,15 +175,16 @@
</view> </view>
</view> </view>
<u-checkbox-group v-model="checked" iconPlacement="right" placement="column"> <u-checkbox-group v-model="checked" iconPlacement="right" placement="column">
<u-checkbox v-for="(item,index) in troubleshootingData" :key="index" :label="item.itemname" activeColor="#2663BF" <u-checkbox v-for="(item,index) in troubleshootingData" :key="index" :label="item.itemname"
:name="item.id" @click="showInvestigationTag2(item)" style="padding: 8px 12px;"></u-checkbox> activeColor="#2663BF" :name="item.id" @click="showInvestigationTag2(item)"
style="padding: 8px 12px;"></u-checkbox>
</u-checkbox-group> </u-checkbox-group>
<u-popup :show="showInvestigation" @close="showInvestigation = false"> <u-popup :show="showInvestigation" @close="showInvestigation = false">
<InvestigationItem @select="select2"></InvestigationItem> <InvestigationItem @select="select2"></InvestigationItem>
</u-popup> </u-popup>
<u-popup :show="showInvestigation2" @close="showInvestigation2 = false"> <u-popup :show="showInvestigation2" @close="showInvestigation2 = false">
<InvestigationItem2 :json="showInvestigation2Item" :businessId="this.businessId" @show="showInvestigation2 = false" <InvestigationItem2 :json="showInvestigation2Item" :businessId="this.businessId"
@select="select3"></InvestigationItem2> @show="showInvestigation2 = false" @select="select3"></InvestigationItem2>
</u-popup> </u-popup>
<!-- <u-popup :show="showInvestigation" @close="showInvestigation = false"> <!-- <u-popup :show="showInvestigation" @close="showInvestigation = false">
<view class="custom-pop-head"> <view class="custom-pop-head">
@ -271,7 +271,7 @@
</view> </view>
</scroll-view> </scroll-view>
<u-col :span="12"> <u-col :span="12" v-show="type!='view'">
<view class="problem-item add" @click="add"> <view class="problem-item add" @click="add">
<uni-icons type="plusempty" size="24" style="margin-right: 10rpx; color: #2663bf" /> <uni-icons type="plusempty" size="24" style="margin-right: 10rpx; color: #2663bf" />
新增隐患 新增隐患
@ -342,25 +342,18 @@
</view> </view>
<view class="blank" /> <view class="blank" />
</view> </view>
<bottom-button-two :type="type" v-if="active === 1" @cancel="isEdit = !isEdit" :cancelText="isEdit?'取消':'更改'" @confirm=" <bottom-button-two :type="type" v-if="active === 1" @cancel="isEdit = !isEdit" :cancelText="isEdit?'取消':'更改'"
@confirm="
isEdit = false; isEdit = false;
active = 2; active = 2;
" /> " />
<bottom-button :type="type" v-else-if="active === 2" :secondText="isEditStep2?'取消':'更改'" @second="isEditStep2 = !isEditStep2" <bottom-button :type="type" v-else-if="active === 2" :secondText="isEditStep2?'取消':'更改'"
@first="active = 1" @last="active = 3" /> @second="isEditStep2 = !isEditStep2" @first="active = 1" @last="active = 3" />
<bottom-button isSubmit :type="type" v-else-if="active === 3" :secondText="'暂存'" @first="active = 2" @second="submit(false)" <bottom-button isSubmit :type="type" v-else-if="active === 3" :secondText="'暂存'" @first="active = 2"
@last="submit(true)" /> @second="submit(false)" @last="submit(true)" />
<u-modal <u-modal :show="modalShow" content="您未录入任何隐患问题,该点段将以“无隐患”结论提交结果,请确认是否提交?" confirm-text="确定" cancel-text="取消"
:show="modalShow" :showConfirmButton="true" :showCancelButton="true" @confirm="postSaveManualInvestigation"
content="您未录入任何隐患问题,该点段将以“无隐患”结论提交结果,请确认是否提交?" @cancel="modalShow = false" :closeOnClickOverlay="false"></u-modal>
confirm-text="确定"
cancel-text="取消"
:showConfirmButton="true"
:showCancelButton="true"
@confirm="postSaveManualInvestigation"
@cancel="modalShow = false"
:closeOnClickOverlay="false"
></u-modal>
</view> </view>
</template> </template>
@ -1040,7 +1033,10 @@
} }
}, },
submit(temporary) { submit(temporary) {
//
if (this.type == 'view') {
return uni.navigateBack();
}
let checkedArr = this.troubleshootingData.filter(r => this.checked.includes(r.id)) let checkedArr = this.troubleshootingData.filter(r => this.checked.includes(r.id))
console.log(checkedArr) console.log(checkedArr)
@ -1452,6 +1448,7 @@
padding: 0 20rpx; padding: 0 20rpx;
overflow-x: auto; overflow-x: auto;
} }
.u-checkbox-group--row { .u-checkbox-group--row {
flex-direction: column; flex-direction: column;
padding: 0 20rpx; padding: 0 20rpx;
@ -1484,6 +1481,7 @@
box-shadow: inset 0 0 5rpx rgba(0, 0, 0, 0.2) !important; box-shadow: inset 0 0 5rpx rgba(0, 0, 0, 0.2) !important;
background-color: #dad8d8 !important; background-color: #dad8d8 !important;
} }
.formInput { .formInput {
width: 90%; width: 90%;
margin-right: 4px; margin-right: 4px;

Loading…
Cancel
Save