Merge remote-tracking branch 'origin/yjl_dev' into bjxz-wz

This commit is contained in:
moleier 2024-04-21 09:45:42 +08:00
commit e1594b6262
10 changed files with 91 additions and 42 deletions

View File

@ -65,17 +65,19 @@
<view class="uni-form-item">
<view class="uni-form-label">
司机姓名
<text class="star">*</text>司机姓名
</view>
<picker @change="bindPickerChange3" :value="driverNameIndex" :range="colorList"
range-key="locationName">
<view class="uni-form-input">
<picker @change="bindPickerChange3" :value="driverNameIndex" :range="driverNameList"
range-key="workerName">
<view class="uni-input uni-select cl" v-if="driverNameIndex==null">
请选择 <image class="icon-down" src="/static/icon-down-black.png" mode=""></image>
</view>
<view class="uni-input uni-select" v-else>{{colorList[driverNameIndex]}}
<view class="uni-input uni-select" v-else>{{driverNameList[driverNameIndex].workerName}}
<image class="icon-down" src="/static/icon-down-black.png" mode=""></image>
</view>
</picker>
</view>
<!-- <view class="uni-form-input">
<input class="uni-input" placeholder-class="cl" name="driverName" :value="form.driverName"
placeholder="请输入" />
@ -148,9 +150,9 @@
this.isAdd = false
this.pageTitle = '编辑车辆'
this.getDetails(options.id)
} else {
this.getCarTypeList()
}
this.getCarTypeList()
this.getDriverNameList();
},
methods: {
@ -213,17 +215,21 @@
getDriverNameList() {
var that = this
this.sendRequest({
url: 'xmgl/carType/list',
url: 'xmgl/workerInfo/selectWorkerInfoList',
data: {
projectSn: this.projectDetail.projectSn
projectSn: this.projectDetail.projectSn,
inserviceType: 1,
pageNo: 1,
pageSize: -1
},
method: "POST",
success(res) {
that.carTypeList = res.result
console.log(res,'车辆数据')
that.driverNameList = res.result.records
if (!that.isAdd) {
for (var i = 0; i < res.result.length; i++) {
if (that.form.carType == res.result[i].id) {
that.carTypeIndex = i;
for (var i = 0; i < res.result.records.length; i++) {
if (that.form.driverWorkerId == res.result.records[i].id) {
that.driverNameIndex = i;
break;
}
}
@ -246,6 +252,7 @@
for (var i = 0; i < res.result.length; i++) {
if (that.form.carType == res.result[i].id) {
that.carTypeIndex = i;
console.log(that.carTypeIndex,12346)
break;
}
}
@ -274,7 +281,6 @@
} else {
that.form.carPhotosUrl = ''
}
that.getCarTypeList()
}
})
},
@ -285,7 +291,7 @@
this.carTypeIndex = e.target.value
},
bindPickerChange3: function(e) {
this.carTypeIndex = e.target.value
this.driverNameIndex = e.target.value
},
bindDateChange: function(e) {
this.form.eduTime = e.target.value
@ -309,6 +315,13 @@
})
return false;
}
if (this.driverNameIndex == null) {
uni.showToast({
title: '请选择司机姓名',
icon: 'none'
})
return false;
}
if (params.carNumber == '') {
uni.showToast({
title: '请输入车牌号',
@ -338,7 +351,7 @@
}
params.carColor = this.colorList[this.selectIndex]
params.carType = this.carTypeList[this.carTypeIndex].id
params.driverWorkerId = this.driverNameList[this.driverNameIndex].id
var url = 'xmgl/carInfo/edit'
if (this.isAdd) {
url = 'xmgl/carInfo/add'

View File

@ -16,7 +16,7 @@
<view class="sum-item" v-for="(itm,idx) in JSON.parse(item.chooseResult)" :key="idx" :style="{'color': colorList[idx]}">
{{itm.name}} {{itm.num ? itm.num:'0'}}
</view>
<view class="sum-item">隐患 0</view>
<view class="sum-item">隐患 {{item.hiddenDangerNum}}</view>
</view>
</view>
<uni-icons type="arrowright" style="margin-top: 4px;" size="18"></uni-icons>

View File

@ -2,7 +2,7 @@
<view class="control">
<headers class="fixedheader" :themeType="true" :showBack="true">
<view class="headerName">
<!-- 危大验收-->
<!-- 危大验收-->
{{title}}
</view>
</headers>
@ -161,6 +161,12 @@
.uni-list-cell{
border-bottom: 1px solid #eee;
height: 80rpx;
>view:nth-child(2){
flex: 1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
}

View File

@ -125,6 +125,19 @@
// this.listData = res.result.records
// }
this.detailData = res.result
let str = '';
if(res.result.chooseTypeDescribeList){
this.detailData.describeName
res.result.chooseTypeDescribeList.map((item,index) => {
if(index == res.result.chooseTypeDescribeList.length - 1){
str = str + item.describeName
} else {
str = str + item.describeName + ','
}
})
console.log(str,123456789)
this.detailData.describeName = str;
}
console.log(this.detailData)
}
})

View File

@ -4,7 +4,7 @@
<view class="list-item" v-for="(item,index) in tableData" :key="index">
<view class="item-title" :class="{'noCheck': item.chooseType == '0'}" @click="showDetail(item)">
<view class="title-left">
{{item.checkItem}}
<view>{{item.checkItem}}</view>
</view>
<view class="tag" v-if="item.chooseType == '0'">不检查</view>
<view v-else>
@ -16,7 +16,7 @@
<view class="item-children" v-for="(item2,index2) in item.children" :key="index2">
<view class="item-title title2" :class="{'noCheck': item2.chooseType == '0'}">
<view class="title-left">
{{item2.checkContent}}
<view>{{item2.checkContent}}</view>
</view>
<view class="tag" v-if="item2.chooseType == '0'">不检查</view>
</view>
@ -24,7 +24,7 @@
<view class="item-detail" v-for="(item3,index3) in item2.children" :key="index3">
<view class="item-title title3" :class="{'noCheck': item3.chooseType == '0'}">
<view class="title-left">
{{item3.checkDetailContent}}
<view>{{item3.checkDetailContent}}</view>
</view>
<view class="tag" v-if="item3.chooseType == '0'">不检查</view>
</view>
@ -121,6 +121,13 @@
display: flex;
align-items: center;
font-size: 14px;
width: 100%;
>view{
flex: 1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.uni-icons{
margin-right: 32rpx;
}

View File

@ -2,7 +2,7 @@
<view class="control">
<headers class="fixedheader" :themeType="true" :showBack="true">
<view class="headerName">
危大验收
危大验收
</view>
</headers>
<view :style="{ 'padding-top': statusBarHeight + 45 + 'px' }">

View File

@ -34,7 +34,7 @@
</view>
<uni-icons v-if="item3.imageUrl && item3.imageUrl.split(',').length > 0 && status != 2" class="clos-btn" type="clear" color="#ff4b49" size="12" @click="removeImg(item3)"></uni-icons>
</view>
<view class="upload-img" v-if="status != 2 && (!item3.imageUrl || item3.imageUrl.split(',').length<2)" @click="uploadImg(item3)">
<view class="upload-img" v-if="status != 2 && (!item3.imageUrl || item3.imageUrl.split(',').length<1)" @click="uploadImg(item3)">
<view>
拍照
</view>
@ -209,6 +209,12 @@
let userCheckId = ""
if(this.tableData && this.tableData.length>0){
userCheckId = this.tableData[0].children[0].children[0].userCheckId
} else {
uni.showToast({
title:'内容为空',
icon: 'none'
})
return;
}
console.log(userCheckId)
this.sendRequest({

View File

@ -2,7 +2,7 @@
<view class="control">
<headers class="fixedheader" :themeType="true" :showBack="true">
<view class="headerName">
<!-- 危大验收-->
<!-- 危大验收-->
{{title}}
</view>
</headers>

View File

@ -107,7 +107,7 @@
</view>
<view class="uni-input uni-select" v-else>
{{listData[subsectionIndex].subdivisionProjectName||''}}
{{listData[subsectionIndex]?listData[subsectionIndex].subdivisionProjectName:''}}
<image class="icon-down" src="/static/icon-down-black.png"></image>
</view>
</picker>
@ -118,11 +118,11 @@
<view class="name"><text class="star"></text>分项工程</view>
<picker @change="(e)=>checkSubListData(e,2)" :value="subentryIndex" class="picker" :range="subListData"
range-key="subdivisionProjectName">
<view class="uni-input uni-select cl" v-if="subentryIndex==-1">
<view class="uni-input uni-select cl" v-if="subentryIndex==-1 || subListData.length == 0">
请选择 <image class="icon-down" src="/static/icon-down-black.png"></image>
</view>
<view class="uni-input uni-select" v-else>
{{ subListData[subentryIndex].subdivisionProjectName || '' }}
{{ subListData[subentryIndex]?subListData[subentryIndex].subdivisionProjectName : '' }}
<image class="icon-down" src="/static/icon-down-black.png"></image>
</view>
</picker>

View File

@ -213,7 +213,7 @@
</view>
</view>
<view class="form-item flex f-column a-start" style="height: 100px;">
<view class="form-item flex f-column a-start">
<view class="form-lable">
<view v-if="addForm.status == 1" style="display: inline;">*</view><text>图片</text>
</view>
@ -263,12 +263,15 @@
</view>
</template>
</dialogs>
<!-- 丢到文档流外避免占空间 -->
<view>
<!-- 隐患区域 -->
<tki-tree ref="locationTree" @confirm="(val)=>checkPointBtn(val,1)" idKey='id' :range="checkPointList"
rangeKey="regionName" confirmColor="#4e8af7" :selectParent="true" />
<canversCom v-if="openImg" @imgUrl="imgUrl" :imgList="imgList"></canversCom>
</view>
</view>
</template>
<script>
@ -522,7 +525,6 @@
})
},
imgUrl(val) {
this.openImg = false
this.imgUpload(val)
this.openImg = true
},
@ -693,7 +695,7 @@
// uni.removeStorageSync('dangerData');
// }
uni.navigateTo({
url: './dangerLibrary?type=1&taskId=' + this.taskId + '&itemId=' + this.itemId + '&engineeringId=' + this.engineeringId + '&moduleType=safeCheck'
url: './dangerLibrary?type=1&taskId=' + this.taskId + '&itemId=' + this.itemId + '&engineeringId=' + this.engineeringId + '&moduleType=' + this.moduleType
})
}
},
@ -1037,6 +1039,8 @@
<style lang="scss" scoped>
.addExamine {
position: relative;
overflow: hidden;
.fixedheader {
position: fixed;
top: 0;