fix: 修改bug

This commit is contained in:
vce 2024-03-05 19:43:21 +08:00
parent 1a7eae17fb
commit cb31f6d770
3 changed files with 71 additions and 6 deletions

View File

@ -407,10 +407,10 @@
</view>
</view>
</view>
<!-- 标记点 -->
<!-- 检查部位 -->
<tki-tree ref="locationTree" @confirm="(val)=>checkPointBtn(val,1)" idKey='id' :range="checkPointList"
rangeKey="regionName" confirmColor="#4e8af7" selectParent="true" />
rangeKey="regionName" confirmColor="#4e8af7" :selectParent="true" />
<!-- 问题分类 -->
<tki-tree ref="issueTree" @confirm="(val)=>checkPointBtn(val,2)" idKey='id' :range="issueList"
rangeKey="dangerName" confirmColor="#4e8af7" />
@ -436,8 +436,12 @@
},
data() {
return {
startTime:'',
startTime2:'',
startTime:this.getDate({
format: true,
}),
startTime2:this.getDate({
format: true,
}),
checkedTab: 'type1',
imgList: {},
openImg: false,
@ -559,6 +563,20 @@
methods: {
getDate(type) {
const date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
if (type === 'start') {
year = year;
} else if (type === 'end') {
// year = year + 2;
}
month = month > 9 ? month : '0' + month;
day = day > 9 ? day : '0' + day;
return `${year}-${month}-${day}`;
},
imgUrl(val) {
this.openImg = false
this.imgUpload(val)

View File

@ -50,6 +50,21 @@
</view>
</view>
<!-- <view class="b-bottom" v-if="addForm.status != 1"> -->
<view class="b-bottom">
<view class="form-item flex">
<!-- <view class="form-lable"><text>检查时间</text></view> -->
<view class="form-lable">*<text>检查时间</text></view>
<picker class="form-content" :disabled="isDisabled" mode="date" :value="addForm.inspectTime"
:start="startDate" @change="bindCheckDateChange">
<view class="uni-input">
<text class="uni-input2" v-if="addForm.inspectTime ===''">请选择检查时间</text>
<text v-else>{{addForm.inspectTime}}</text>
<uni-icons v-if="!isDisabled" type="arrowright" color="#6C7178" />
</view>
</picker>
</view>
</view>
<view class="b-bottom" v-if="addForm.status != 1">
<view class="form-item flex">
@ -296,8 +311,10 @@
remark: "",
taskId: '',
itemId: '',
//inspectTime: this.getDate({
//format: true,
//}),
inspectTime: ''
},
pageType: 1,
replyData: [],
@ -351,6 +368,7 @@
this.addForm.examineLv = data.hiddenDangerLevel
this.addForm.requestContent = data.rectifyRequire
this.addForm.examineProject = data.checkSubitem
this.addForm.inspectTime = data.inspectTime
this.addForm.examineEntry = data.checkItem
this.addForm.address = data.dutyRegion
this.addForm.date = data.changeLimitTime
@ -592,6 +610,10 @@
this.addForm.date = e.detail.value
console.log(e.detail.value)
},
bindCheckDateChange(e) {
this.addForm.inspectTime = e.detail.value
console.log(e.detail.value)
},
bindPeopleId(e) {
this.addForm.dutyPeople = e.detail.value
this.addForm.dutyPeopleId = this.dutyPeopleList[e.detail.value].userId
@ -769,6 +791,7 @@
})
},
submitForm() {
if(this.addForm.inspectTime !== "") this.addForm.inspectTime += " 00:00:00"
let that = this
console.log('this.addForm1------------', this.addForm)
if (this.pageType == 1) {
@ -779,6 +802,7 @@
dangerDesc: this.addForm.remark, //
status: this.addForm.status, // 12345
dutyRegion: this.addForm.address, //
inspectTime: this.addForm.inspectTime,
engineeringId: this.engineeringId, //id
taskId: this.taskId,
itemId: this.itemId,
@ -811,6 +835,14 @@
});
return;
}
if (this.addForm.inspectTime == "") {
uni.showToast({
title: '请选择检查时间!',
icon: "none",
duration: 2000
});
return;
}
if (this.addForm.dutyPeopleId == "") {
uni.showToast({
title: '请选择整改责任人!',
@ -835,6 +867,7 @@
data.changeUser = this.addForm.dutyPeopleId
data.enterpriseSn = this.addForm.enterpriseSn
data.changeLimitTime = this.addForm.date
data.inspectTime = this.addForm.inspectTime
data.faultLevel = this.faultLevelList[this.addForm.faultLevel].id
data.recordType = 1
@ -842,6 +875,14 @@
data.checkItemResultId = this.addForm.checkItemResultId
}
} else {
if (data.inspectTime == "") {
uni.showToast({
title: '请选择检查时间!',
icon: "none",
duration: 2000
});
return;
}
if (data.dutyRegion == "") {
uni.showToast({
title: '请填写详细位置信息!',
@ -1087,6 +1128,9 @@
.uni-input {
line-height: 36rpx;
}
.uni-input2 {
color: #C0C4CC;
}
}
.a-start {

View File

@ -19,6 +19,9 @@
<view class="item-type">检查类型{{item.inspectTypeName}}</view>
<view>检查人{{item.createUserName}}</view>
</view>
<view class="item-content flex">
<view>检查时间{{item.inspectTime}}</view>
</view>
<view class="item-bottom flex">
<view class="item-address flex">
<image src="/static/safeMange/address_icon.png"></image>